升级创客

This commit is contained in:
韩鹏辉
2023-07-10 17:14:18 +08:00
parent c131dc051b
commit d47550f8df
6 changed files with 99 additions and 1 deletions

View File

@@ -179,7 +179,7 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
nowRate = new BigDecimal(userPromotion.getCurrentFee());
}
if("0".equals(userPromotion.getIsExtend())||"3".equals(userPromotion.getIsExtend())){
if(!"1".equals(userPromotion.getIsExtend())||!"2".equals(userPromotion.getIsExtend())){
createUserV3Profit(order,userPromotion.getParentUserId(),profits,nowRate);
}

View File

@@ -398,5 +398,9 @@ public interface UserAppService extends IService<UserApp> {
* @return
*/
UserApp getUserAppByPhone(String phone, UserApp userApp);
void applyMarker(UserApp userApp);
}

View File

@@ -1,5 +1,6 @@
package cn.pluss.platform.userApp.impl;
import cn.hutool.core.util.ObjectUtil;
import cn.pluss.platform.IdCardService;
import cn.pluss.platform.ali.AliService;
import cn.pluss.platform.api.PageInfo;
@@ -1911,4 +1912,43 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
MsgException.check(userApp.getUserId().equals(app.getUserId()), "无法选择自己");
return app;
}
@Autowired
@Lazy
UserMarkerMapper userMarkerMapper;
@Autowired
@Lazy
UserPromotionMapper userPromotionMapper;
@Override
public void applyMarker(UserApp userApp) {
UserMarker marker= userMarkerMapper.selectById(userApp.getUserId());
if(ObjectUtil.isNotEmpty(marker)){
if(marker.getStatus().equals("2")){
marker.setStatus("0");
}else {
MsgException.checkNull(null,"等待审核完成之后再申请");
}
}else {
marker=new UserMarker();
marker.setName(userApp.getUserName());
marker.setPhone(userApp.getPhone());
marker.setUserId(userApp.getUserId().intValue());
marker.setStatus("0");
marker.setCreateTime(new Date());
userMarkerMapper.insert(marker);
}
UserPromotion userPromotion= userPromotionMapper.selectById(userApp.getUserId());
if(ObjectUtil.isEmpty(userPromotion)){
MsgException.checkNull(null,"用户信息错误");
}
userPromotion.setIsExtend("3");
userPromotion.setUpdateTime(new Date());
userPromotionMapper.updateById(userPromotion);
}
}