|
|
@@ -2009,13 +2009,16 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
userBenefitsService.recordBalanceBySource(user.getId(), BigDecimal.valueOf(-balance.longValue()), UserBalanceSourceRecord.Source.payment);
|
|
|
}
|
|
|
//特殊渠道推广优惠. 360
|
|
|
- if(orderDon.getPopularizeId() != null && orderDon.getPopularizeId() != 0L){
|
|
|
- String name = channelPopularizeMapper.selectChannelByPid(orderDon.getPopularizeId());
|
|
|
- if (Constant.CHANNEL_NAME_360.equals(name)) {
|
|
|
- SysConfig sysConfig = sysConfigService.getBaseMapper().selectOne(Wrappers.lambdaQuery(SysConfig.class).eq(SysConfig::getSysKey, Constant.CHANNEL_360_DISCOUNT));
|
|
|
- if (sysConfig != null) {
|
|
|
- BigDecimal discountMoney = orderDon.getMoney().multiply(BigDecimal.valueOf(Double.valueOf(sysConfig.getSysValue())));
|
|
|
- orderDon.setMoney(discountMoney);
|
|
|
+ if (orderDon.getPopularizeId() != null && orderDon.getPopularizeId() != 0L) {
|
|
|
+ //使用了优惠券 不再使用360渠道 折扣
|
|
|
+ if (couponUser == null) {
|
|
|
+ String name = channelPopularizeMapper.selectChannelByPid(orderDon.getPopularizeId());
|
|
|
+ if (Constant.CHANNEL_NAME_360.equals(name)) {
|
|
|
+ SysConfig sysConfig = sysConfigService.getBaseMapper().selectOne(Wrappers.lambdaQuery(SysConfig.class).eq(SysConfig::getSysKey, Constant.CHANNEL_360_DISCOUNT));
|
|
|
+ if (sysConfig != null) {
|
|
|
+ BigDecimal discountMoney = orderDon.getMoney().multiply(BigDecimal.valueOf(Double.valueOf(sysConfig.getSysValue())));
|
|
|
+ orderDon.setMoney(discountMoney);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|