## 拓展收益烧伤拆分两条数据处理;
This commit is contained in:
parent
6b2dcbac8c
commit
9c279b788e
|
@ -978,7 +978,6 @@ public class BonusSettleFirstPurchaseHandle extends BonusSettleHandle {
|
|||
BigDecimal maxIncome = ComputeUtil.computeBonusMultiply(cuMemberBonusExpand.getCalAchieve(), gradeExpandRatio);
|
||||
// actualIncome = 业绩 * 等级扩展比例
|
||||
BigDecimal actualIncome = ComputeUtil.computeBonusMultiply(cuMemberBonusExpand.getCalAchieve(), countryExpandRatio);
|
||||
// log.info("首购. maxIncome: {}, gradeExpandRatio: {}; actualIncome: {}, countryExpandRatio: {}", maxIncome, gradeExpandRatio, actualIncome, countryExpandRatio);
|
||||
|
||||
// K值设置
|
||||
if (riskControlMap.containsKey(cuMemberBonus.getPkMember())) {
|
||||
|
|
|
@ -382,7 +382,7 @@ public class BonusSettleNewExpandHandle extends BonusSettleHandle {
|
|||
packageCuMemberBonusExpand(cuMemberBonusExpand, cuMemberBonus, bdGrade.getExpandCapping(), realIncome, realIncome);
|
||||
|
||||
CuMemberBonusExpand fireCuMemberBonusExpand = BeanUtil.copyProperties(cuMemberBonusExpand, CuMemberBonusExpand.class);
|
||||
BigDecimal fireIncome = ComputeUtil.computeSubtract(maxIncome, realIncome);
|
||||
BigDecimal fireIncome = ComputeUtil.computeSubtract(actualIncome, realIncome);
|
||||
if (EBonusIncomeStatus.NORMAL.getValue() == fireCuMemberBonusExpand.getIncomeStatus()) {
|
||||
// V3 V4 没有烧伤,改为延缓发放
|
||||
if (EGrade.VIP.getValue() == bdGrade.getGradeValue()
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.hzs.common.core.constant.CacheConstants;
|
||||
import com.hzs.common.core.enums.EBonusItems;
|
||||
import com.hzs.common.core.enums.EYesNo;
|
||||
import com.hzs.common.core.service.RedisService;
|
||||
import com.hzs.common.core.utils.ComputeUtil;
|
||||
import com.hzs.common.core.utils.StringUtils;
|
||||
|
@ -32,18 +33,21 @@ public class BdBonusItemsServiceImpl extends ServiceImpl<BdBonusItemsMapper, BdB
|
|||
public boolean generate(BdBonusItems bonusItems) {
|
||||
Integer pkCountry = SecurityUtils.getPkCountry();
|
||||
for (EBonusItems value : EBonusItems.values()) {
|
||||
bonusItems.setBonusName(value.getLabel());
|
||||
bonusItems.setBonusValue(value.getValue());
|
||||
bonusItems.setPkCountry(pkCountry);
|
||||
bonusItems.setPkCreator(SecurityUtils.getUserId());
|
||||
bonusItems.setCreationTime(new Date());
|
||||
LambdaQueryWrapper<BdBonusItems> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdBonusItems::getBonusValue, value.getValue());
|
||||
queryWrapper.eq(BdBonusItems::getPkCountry, pkCountry);
|
||||
BdBonusItems items = baseMapper.selectOne(queryWrapper);
|
||||
if (StringUtils.isNull(items)) {
|
||||
baseMapper.insert(bonusItems);
|
||||
redisService.deleteObject(CacheConstants.BD_BONUS_ITEMS + SecurityUtils.getPkCountry());
|
||||
if (EYesNo.YES.getIntValue() == value.getEnable()) {
|
||||
// 只创建启用的奖项
|
||||
bonusItems.setBonusName(value.getLabel());
|
||||
bonusItems.setBonusValue(value.getValue());
|
||||
bonusItems.setPkCountry(pkCountry);
|
||||
bonusItems.setPkCreator(SecurityUtils.getUserId());
|
||||
bonusItems.setCreationTime(new Date());
|
||||
LambdaQueryWrapper<BdBonusItems> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(BdBonusItems::getBonusValue, value.getValue());
|
||||
queryWrapper.eq(BdBonusItems::getPkCountry, pkCountry);
|
||||
BdBonusItems items = baseMapper.selectOne(queryWrapper);
|
||||
if (StringUtils.isNull(items)) {
|
||||
baseMapper.insert(bonusItems);
|
||||
redisService.deleteObject(CacheConstants.BD_BONUS_ITEMS + SecurityUtils.getPkCountry());
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -35,7 +35,7 @@ public enum EBonusItems {
|
|||
/**
|
||||
* 分红收益
|
||||
*/
|
||||
DIVIDEND_INCOME(6, "分红收益", 0),
|
||||
DIVIDEND_INCOME(6, "分红收益", 1),
|
||||
/**
|
||||
* 服务补贴
|
||||
*/
|
||||
|
@ -111,12 +111,12 @@ public enum EBonusItems {
|
|||
/**
|
||||
* 见点收益
|
||||
*/
|
||||
REPURCHASE_POINT_INCOME(25, "见点收益", 0),
|
||||
REPURCHASE_POINT_INCOME(26, "见点收益", 0),
|
||||
|
||||
/**
|
||||
* 区域收益
|
||||
*/
|
||||
REPURCHASE_AREA_INCOME(25, "区域收益", 0),
|
||||
REPURCHASE_AREA_INCOME(27, "区域收益", 0),
|
||||
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in New Issue