|
@@ -609,16 +609,18 @@ public class UserTicketOrderServiceImpl extends
|
|
|
TicketBox ticketBox = ticketBoxService.getById(channelCommParam.getBoxId());
|
|
|
|
|
|
// 如果有推广员则先给推广员分佣
|
|
|
- Channel channel = new Channel();
|
|
|
if (channelCommParam.getPromoterId() != null && channelCommParam.getPromoterId() > 0) {
|
|
|
- channel = channelService.getById(channelCommParam.getPromoterId());
|
|
|
- if (channel == null) {
|
|
|
- channel = channelService.getById(channelCommParam.getChannelId());
|
|
|
+ Channel promoter = channelService.getById(channelCommParam.getPromoterId());
|
|
|
+ if (promoter != null) {
|
|
|
+ ChannelCommission siteCommission = saveSiteCommAmt(channelCommParam, ticketBox, promoter);
|
|
|
+ // 推广员账户余额增加
|
|
|
+ changeMoney(promoter, siteCommission);
|
|
|
}
|
|
|
- } else {
|
|
|
- channel = channelService.getById(channelCommParam.getChannelId());
|
|
|
}
|
|
|
|
|
|
+ // 给门店分佣
|
|
|
+ Channel channel = channelService.getById(channelCommParam.getChannelId());
|
|
|
+
|
|
|
ChannelCommission siteCommission = saveSiteCommAmt(channelCommParam, ticketBox, channel);
|
|
|
// 经销商账户余额增加
|
|
|
changeMoney(channel, siteCommission);
|