|
@@ -607,7 +607,15 @@ public class UserTicketOrderServiceImpl extends
|
|
|
if (null != channelCommParam.getChannelId()) {
|
|
|
// 线下购票,优先给当前票的经销商渠道分润
|
|
|
TicketBox ticketBox = ticketBoxService.getById(channelCommParam.getBoxId());
|
|
|
- Channel channel = channelService.getById(channelCommParam.getChannelId());
|
|
|
+
|
|
|
+ // 如果有推广员则先给推广员分佣
|
|
|
+ Channel channel = new Channel();
|
|
|
+ if (channelCommParam.getPromoterId() != null && channelCommParam.getPromoterId() > 0) {
|
|
|
+ channel = channelService.getById(channelCommParam.getPromoterId());
|
|
|
+ } else {
|
|
|
+ channel = channelService.getById(channelCommParam.getChannelId());
|
|
|
+ }
|
|
|
+
|
|
|
ChannelCommission siteCommission = saveSiteCommAmt(channelCommParam, ticketBox, channel);
|
|
|
// 经销商账户余额增加
|
|
|
changeMoney(channel, siteCommission);
|