分销金额

This commit is contained in:
张松
2025-10-29 19:55:02 +08:00
parent 4cae2309c6
commit f8cf41b9fc

View File

@@ -572,7 +572,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
return; return;
} }
try { try {
deepReward(orderSourceShopUser, config, shopUserService.getById(parent.getId()), amount, sourceId, type, orderNo, ++currentLevel); deepReward(orderSourceShopUser, config, shopUserService.getById(parent.getId()), amount, sourceId, type, orderNo, currentLevel + 1);
} catch (Exception e) { } catch (Exception e) {
log.warn("分销奖励失败: {}", e.getMessage()); log.warn("分销奖励失败: {}", e.getMessage());
} }
@@ -620,7 +620,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
distributionFlowService.save(mkDistributionFlow); distributionFlowService.save(mkDistributionFlow);
updateIncome(!flag ? rewardAmount : BigDecimal.ZERO, updateIncome(!flag ? rewardAmount : BigDecimal.ZERO,
flag ? rewardAmount : BigDecimal.ZERO, BigDecimal.ZERO, distributionUser.getId(), shopUser.getUserId(), shopUser.getMainShopId(), currentLevel == 1 ? 1 : 2); flag ? rewardAmount : BigDecimal.ZERO, BigDecimal.ZERO, distributionUser.getId(), shopUser.getUserId(), shopUser.getMainShopId(), currentLevel == 1 ? 1 : 2);
if (flag) { if (flag) {
distributionAmountFlowService.save(new MkDistributionAmountFlow() distributionAmountFlowService.save(new MkDistributionAmountFlow()