分销修改

This commit is contained in:
张松 2025-11-06 14:23:03 +08:00
parent 51f0a2b71c
commit 01bfff0f25
1 changed files with 2 additions and 2 deletions

View File

@ -590,7 +590,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
}
// 上上级分销员
if (currentShopUser.getDistributionUserId() != null) {
if (currentShopUser != null && currentShopUser.getDistributionUserId() != null) {
MkDistributionUser parent = getOne(new QueryWrapper().eq(MkDistributionUser::getId, currentShopUser.getDistributionUserId()));
try {
deepReward(orderSourceShopUser, level, config, parent, amount, sourceId, type, orderNo, currentLevel + 1);
@ -600,7 +600,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
}
AssertUtil.isNull(level, "分销等级不存在");
log.info("当前分销员: {}, 上级分销员: {}, 分销等级: {}", currentDistributionUser.getId(), currentShopUser.getDistributionUserId(), level.getId());
log.info("当前分销员: {}, 上级分销员: {}, 分销等级: {}", currentDistributionUser.getId(), currentShopUser == null ? null : currentShopUser.getDistributionUserId(), level.getId());
if (config.getRewardCount() != null && config.getRewardCount() > 0) {
long count = distributionFlowService.count(new QueryWrapper().eq(MkDistributionFlow::getSourceShopUserId, currentDistributionUser.getId())