运营端充值 分账修改
This commit is contained in:
@@ -447,6 +447,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@CacheEvict(key = "#id")
|
||||
@Override
|
||||
public BigDecimal updateAmount(Long id, BigDecimal amount) {
|
||||
ShopInfo shopInfo = getShopInfo(id);
|
||||
|
||||
@@ -580,6 +580,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
||||
if (currentShopUser.getDistributionUserId() != null) {
|
||||
MkDistributionUser parent = getOne(new QueryWrapper().eq(MkDistributionUser::getId, currentDistributionUser.getDistributionLevelId()));
|
||||
if (parent == null) {
|
||||
log.info("上级分销员不存在: {}", currentDistributionUser.getDistributionLevelId());
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -626,6 +627,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
||||
|
||||
if (delayTime == null) {
|
||||
mkDistributionFlow.setStatus(TableValueConstant.DistributionFlow.Status.SUCCESS.getCode());
|
||||
log.info("即时分销开始");
|
||||
try {
|
||||
updateShopInfoAmount(currentDistributionUser.getShopId(), rewardAmount, mkDistributionFlow.getId());
|
||||
updateIncome(BigDecimal.ZERO, rewardAmount, BigDecimal.ZERO, currentDistributionUser.getId(), shopUser.getUserId(), shopUser.getMainShopId(), currentLevel == 1 ? 1 : 2);
|
||||
@@ -634,8 +636,8 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
||||
distributionFlowService.updateById(mkDistributionFlow);
|
||||
}
|
||||
}else {
|
||||
log.info("延时分销开始");
|
||||
updateIncome(rewardAmount, BigDecimal.ZERO, BigDecimal.ZERO, currentDistributionUser.getId(), shopUser.getUserId(), shopUser.getMainShopId(), currentLevel == 1 ? 1 : 2);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user