运营端充值 分账修改

This commit is contained in:
张松
2025-10-30 10:43:23 +08:00
parent 96ecb86d42
commit cd9acb3678
2 changed files with 4 additions and 1 deletions

View File

@@ -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);

View File

@@ -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);
}
}