注册相关,查询用户详情,后台切换通道相关
This commit is contained in:
parent
b426dfa12e
commit
5beafd2970
|
|
@ -27,8 +27,7 @@ public class IntroduceController {
|
|||
private AppGuideService appGuideService;
|
||||
|
||||
@GetMapping({"/common", "/common/{code}"})
|
||||
public Result<String> billIntro(@PathVariable(value = "code", required = false) String code, HttpServletRequest httpServletRequest,
|
||||
@RequestParam String typeCode) {
|
||||
public Result<String> billIntro(@PathVariable(value = "code", required = false) String code, HttpServletRequest httpServletRequest) {
|
||||
if (StringUtils.isEmpty(code)) {
|
||||
String html = "<p><img src=\"https://www.shouyinbei.net/resources/images/upload/82031620725808697.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/86751620725811158.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/38401620725814105.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/14561620725816223.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/45071620725822267.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/31221620725827105.jpg\" style=\"\"/></p><p><img src=\"https://www.shouyinbei.net/resources/images/upload/68211620725829889.jpg\" style=\"\"/></p><p><br/></p>";
|
||||
return ResultGenerator.genSuccessResult(html);
|
||||
|
|
@ -43,7 +42,7 @@ public class IntroduceController {
|
|||
String type = httpServletRequest.getHeader("type");
|
||||
//TODO 暂时安卓开发IOS不开
|
||||
if ("1".equals(type)){
|
||||
return ResultGenerator.genSuccessResult(image(typeCode));
|
||||
return ResultGenerator.genSuccessResult(entity.getContent());
|
||||
}else if ("2".equals(type)){
|
||||
return ResultGenerator.genFailResult("");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -382,7 +382,14 @@ public class UserAppController {
|
|||
QueryWrapper<UserPromotion> QueryWrapper = new QueryWrapper<>();
|
||||
QueryWrapper.eq("user_id", result.getUserId());
|
||||
UserPromotion userPromotion = userPromotionService.getOne(QueryWrapper);
|
||||
result.setTypeCode(userPromotion==null?"null":userPromotion.getTypeCode());
|
||||
result.setTypeCode(userPromotion == null?"null":userPromotion.getTypeCode());
|
||||
result.setMinFee(userPromotion == null?"null":userPromotion.getCurrentFee());
|
||||
|
||||
QueryWrapper.clear();
|
||||
QueryWrapper.eq("user_id","244");
|
||||
userPromotion = userPromotionService.getOne(QueryWrapper);
|
||||
result.setMaxFee(userPromotion == null?"null":userPromotion.getCurrentFee());
|
||||
|
||||
return ResultGenerator.genSuccessResult(result);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,19 @@
|
|||
spring:
|
||||
# datasource:
|
||||
# url: jdbc:mysql://60.205.224.68:3306/chaozhanggui?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: CZGmysqlroot@123
|
||||
# driver-class-name: com.mysql.jdbc.Driver
|
||||
datasource:
|
||||
url: jdbc:mysql://rm-bp19ib8x213kh9t450o.rwlb.rds.aliyuncs.com:3306/chaozhanggui?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: prodCZGmysqlroot@123
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
url: jdbc:mysql://60.205.224.68:3306/chaozhanggui?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: CZGmysqlroot@123
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
# datasource:
|
||||
# url: jdbc:mysql://rm-bp19ib8x213kh9t450o.rwlb.rds.aliyuncs.com:3306/chaozhanggui?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: prodCZGmysqlroot@123
|
||||
# driver-class-name: com.mysql.jdbc.Driver
|
||||
# datasource:
|
||||
# url: jdbc:mysql://60.205.224.68:3306/ysk_test?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: CZGmysqlroot@123
|
||||
# driver-class-name: com.mysql.jdbc.Driver
|
||||
parameter:
|
||||
### 这个根据自己的情况配置
|
||||
domain: https://ky.sxczgkj.cn
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ spring:
|
|||
profiles:
|
||||
### 将一些固定的配置放到下级文件夹下的yml文件中
|
||||
include: common, ryx, ys
|
||||
active: prod
|
||||
active: dev
|
||||
mvc:
|
||||
view:
|
||||
prefix: /WEB-INF/jsp/
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import cn.pluss.platform.entity.AppVersionInfo;
|
|||
import cn.pluss.platform.entity.BestNewActivity;
|
||||
import cn.pluss.platform.entity.MerchantChannelStatus;
|
||||
import cn.pluss.platform.entity.UserApp;
|
||||
import cn.pluss.platform.exception.MsgException;
|
||||
import cn.pluss.platform.merchantChannelStatus.MerchantChannelStatusService;
|
||||
import cn.pluss.platform.util.PageUtils;
|
||||
import cn.pluss.platform.vo.ChannelStatusVO;
|
||||
|
|
@ -45,13 +46,14 @@ public class ChannelController extends BaseNoModelController {
|
|||
return ResultGenerator.genSuccessResult(pageData);
|
||||
}
|
||||
|
||||
// @GetMapping("/update/{merchantCode}")
|
||||
// @ResponseBody
|
||||
// public Result<Object> update(@PathVariable(value = "merchantCode") String merchantCode){
|
||||
// UpdateWrapper<MerchantChannelStatus> UpdateWrapper = new UpdateWrapper<MerchantChannelStatus>();
|
||||
// UpdateWrapper.eq("merchantCode", merchantCode);
|
||||
// UpdateWrapper.set("")
|
||||
//
|
||||
// merchantChannelStatusService.update();
|
||||
// }
|
||||
@GetMapping("/update/{merchantCode}")
|
||||
@ResponseBody
|
||||
public Result<Object> update(@PathVariable(value = "merchantCode") String merchantCode){
|
||||
try {
|
||||
merchantChannelStatusService.updateValid(merchantCode);
|
||||
return ResultGenerator.genSuccessResult();
|
||||
}catch (Exception e){
|
||||
return ResultGenerator.genFailResult("更改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ spring:
|
|||
# username: root
|
||||
# password: prodCZGmysqlroot@123
|
||||
# driver-class-name: com.mysql.jdbc.Driver
|
||||
# datasource:
|
||||
# url: jdbc:mysql://60.205.224.68:3306/ysk_test?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: CZGmysqlroot@123
|
||||
# driver-class-name: com.mysql.jdbc.Driver
|
||||
logging:
|
||||
config: classpath:log4j2-dev.xml
|
||||
|
||||
|
|
|
|||
|
|
@ -336,6 +336,12 @@ public class UserApp {
|
|||
@TableField(exist = false)
|
||||
private String typeCode;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String maxFee;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String minFee;
|
||||
|
||||
// /**
|
||||
// * 有效状态 1:有效 -1:无效
|
||||
// */
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -236,4 +237,17 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
|
|||
UpdateWrapper<MerchantChannelStatus> objectUpdateWrapper = new UpdateWrapper<MerchantChannelStatus>()
|
||||
.eq("merchantCode",merchantCode);
|
||||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
default void updateValid(String merchantCode){
|
||||
MerchantChannelStatus validData = getValidData(merchantCode);
|
||||
|
||||
UpdateWrapper<MerchantChannelStatus> UpdateWrapper1 = new UpdateWrapper<MerchantChannelStatus>();
|
||||
UpdateWrapper1.eq("id", validData.getId());
|
||||
UpdateWrapper1.set("valid",0);
|
||||
|
||||
UpdateWrapper<MerchantChannelStatus> UpdateWrapper = new UpdateWrapper<MerchantChannelStatus>();
|
||||
UpdateWrapper.eq("merchantCode", merchantCode)
|
||||
.eq("valid",-1);
|
||||
UpdateWrapper.set("valid",1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,10 +124,7 @@ public class UserInfoServiceImpl extends BaseUserInfoService {
|
|||
}
|
||||
userInfo.setCreateTime(new Date());
|
||||
save(userInfo);
|
||||
// 可能和数据库存储的数据不一致
|
||||
userInfo.setCreateTime(null);
|
||||
// 获取当前用户的id保存用户的角色信息
|
||||
userInfo = queryUserInfo(userInfo);
|
||||
|
||||
userInfo.setInviteCode(inviteCode);
|
||||
RoleUserInfo role = new RoleUserInfo();
|
||||
role.setRoleId(roleId);
|
||||
|
|
@ -163,6 +160,11 @@ public class UserInfoServiceImpl extends BaseUserInfoService {
|
|||
promotion.setIsExtend(userInfo.getTypeCode().equals("MC")?"0":"1");
|
||||
promotion.setCreateTime(new Date());
|
||||
userPromotionMapper.insert(promotion);
|
||||
// 可能和数据库存储的数据不一致
|
||||
userInfo.setCreateTime(null);
|
||||
// 获取当前用户的id保存用户的角色信息
|
||||
userInfo = queryUserInfo(userInfo);
|
||||
|
||||
// 保存信息
|
||||
userAppService.save(userApp);
|
||||
roleUserInfoService.saveRoleUserInfo(role);
|
||||
|
|
@ -209,7 +211,9 @@ public class UserInfoServiceImpl extends BaseUserInfoService {
|
|||
private UserPromotionMapper userPromotionMapper;
|
||||
|
||||
private UserPromotion getUserPromotionByUserId(String userId){
|
||||
UserPromotion promotion= userPromotionMapper.selectById(userId);
|
||||
UserPromotion userPromotion = new UserPromotion();
|
||||
userPromotion.setUserId(Long.valueOf(userId));
|
||||
UserPromotion promotion= userPromotionMapper.selectOne(new QueryWrapper<>(userPromotion));
|
||||
|
||||
if(ObjectUtil.isNotEmpty(promotion)){
|
||||
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import cn.pluss.platform.user.UserIpRecordService;
|
|||
import cn.pluss.platform.userInfo.UserInfoService;
|
||||
import cn.pluss.platform.util.MD5Util;
|
||||
import cn.pluss.platform.util.StringUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -104,8 +105,7 @@ public class UserInfoServiceNewImpl extends BaseUserInfoService {
|
|||
saveUserInfo(userInfo);
|
||||
// 可能和数据库存储的数据不一致
|
||||
userInfo.setCreateTime(null);
|
||||
// 获取当前用户的id保存用户的角色信息
|
||||
userInfo = queryUserInfo(userInfo);
|
||||
|
||||
RoleUserInfo role = new RoleUserInfo();
|
||||
role.setRoleId(roleId);
|
||||
role.setUserId(userInfo.getId());
|
||||
|
|
@ -114,11 +114,17 @@ public class UserInfoServiceNewImpl extends BaseUserInfoService {
|
|||
userApp.setParentId(new Long(244));
|
||||
userApp.setInviteNum(getRandomNum());
|
||||
//查找代理
|
||||
if (userInfo.getTypeCode() == null){
|
||||
userInfo.setTypeCode("MG");
|
||||
}
|
||||
if (userInfo.getCurrentFee() == null){
|
||||
userInfo.setCurrentFee("0.38");
|
||||
}
|
||||
UserPromotion promotion= getUserPromotionByUserId(String.valueOf(244));
|
||||
String parenId=promotion.getUserId().toString();
|
||||
promotion=new UserPromotion();
|
||||
promotion.setUserId(userInfo.getId());
|
||||
promotion.setParentUserId(parenId);
|
||||
UserPromotion promotionNew = new UserPromotion();
|
||||
promotionNew.setUserId(userInfo.getId());
|
||||
promotionNew.setParentUserId(parenId);
|
||||
if(userInfo.getTypeCode().equals("FB")){
|
||||
if (promotion.getCurrentFee().compareTo(userInfo.getCurrentFee()) >0||
|
||||
userInfo.getCurrentFee().compareTo(getUserPromotionByUserId("244").getCurrentFee()) < 0){
|
||||
|
|
@ -132,12 +138,13 @@ public class UserInfoServiceNewImpl extends BaseUserInfoService {
|
|||
MsgException.checkNull(null,"错误的费率信息");
|
||||
}
|
||||
}
|
||||
promotion.setCurrentFee(promotion.getCurrentFee());
|
||||
promotion.setTypeCode(userInfo.getTypeCode());
|
||||
promotion.setIsExtend(userInfo.getTypeCode().equals("MC")?"0":"1");
|
||||
promotion.setCreateTime(new Date());
|
||||
userPromotionMapper.insert(promotion);
|
||||
|
||||
promotionNew.setCurrentFee(promotion.getCurrentFee());
|
||||
promotionNew.setTypeCode(userInfo.getTypeCode());
|
||||
promotionNew.setIsExtend(userInfo.getTypeCode().equals("MC")?"0":"1");
|
||||
promotionNew.setCreateTime(new Date());
|
||||
userPromotionMapper.insert(promotionNew);
|
||||
// 获取当前用户的id保存用户的角色信息
|
||||
userInfo = queryUserInfo(userInfo);
|
||||
// 保存信息
|
||||
userAppService.save(userApp);
|
||||
roleUserInfoService.saveRoleUserInfo(role);
|
||||
|
|
@ -193,7 +200,9 @@ public class UserInfoServiceNewImpl extends BaseUserInfoService {
|
|||
private UserPromotionMapper userPromotionMapper;
|
||||
|
||||
private UserPromotion getUserPromotionByUserId(String userId){
|
||||
UserPromotion promotion= userPromotionMapper.selectById(userId);
|
||||
UserPromotion userPromotion = new UserPromotion();
|
||||
userPromotion.setUserId(Long.valueOf(userId));
|
||||
UserPromotion promotion= userPromotionMapper.selectOne(new QueryWrapper<>(userPromotion));
|
||||
|
||||
if(ObjectUtil.isNotEmpty(promotion)){
|
||||
if("MG".equals(promotion.getTypeCode())||"FB".equals(promotion.getTypeCode())||
|
||||
|
|
|
|||
Loading…
Reference in New Issue