修改分佣
This commit is contained in:
@@ -5,6 +5,8 @@ import cn.pluss.platform.app.MainPageService;
|
||||
import cn.pluss.platform.entity.MerchantOrderStatistics;
|
||||
import cn.pluss.platform.entity.UserApp;
|
||||
import cn.pluss.platform.exception.MsgException;
|
||||
import cn.pluss.platform.mapper.MerchantOrderMapper;
|
||||
import cn.pluss.platform.merchantOrder.MerchantOrderService;
|
||||
import cn.pluss.platform.merchantOrder.MerchantOrderStatisticsService;
|
||||
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
||||
import cn.pluss.platform.userApp.UserAppService;
|
||||
@@ -37,6 +39,9 @@ public class PromoterMainPageServiceImpl implements MainPageService {
|
||||
@Lazy
|
||||
private MerchantOrderStatisticsService mosService;
|
||||
|
||||
@Autowired
|
||||
private MerchantOrderMapper merchantOrderMapper;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getSpreadData(String userId) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
|
||||
@@ -204,6 +204,7 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
log.error("订单号:{},分润结束,获取分润数为:{}",order.getOrderNumber(),profits.size());
|
||||
return;
|
||||
}
|
||||
log.info("userId:{},rate:{},amount:{}",nowUserApp.getUserId(),profitRate,order.getConsumeFee());
|
||||
|
||||
BigDecimal profitAmt = profitRate.divide(BigDecimal.valueOf(100)).multiply(BigDecimal.valueOf(order.getConsumeFee())).setScale(4, BigDecimal.ROUND_DOWN);
|
||||
MerchantProfit profit = new MerchantProfit(nowUserApp, nowUserApp, order, profitAmt, profitRate, "5", "1");
|
||||
@@ -231,7 +232,7 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
log.error("订单号:{},分润结束,获取分润数为:{}",order.getOrderNumber(),profits.size());
|
||||
return;
|
||||
}
|
||||
|
||||
log.info("userId:{},rate:{},amount:{}",nowUserApp.getUserId(),profitRate,order.getConsumeFee());
|
||||
BigDecimal profitAmt = profitRate.divide(BigDecimal.valueOf(100)).multiply(BigDecimal.valueOf(order.getConsumeFee())).setScale(4, BigDecimal.ROUND_DOWN);
|
||||
MerchantProfit profit = new MerchantProfit(nowUserApp,nowUserApp , order, profitAmt, profitRate, "5", "1");
|
||||
profits.add(profit);
|
||||
|
||||
Reference in New Issue
Block a user