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