Merge remote-tracking branch 'origin/master'

# Conflicts:
#	pluss-dao-bundle/src/main/java/cn/pluss/platform/mapper/MerchantOrderMapper.java
#	pluss-dao-bundle/src/main/resources/mapper/MerchantProfit-sqlmap.xml
#	pluss-service-bundle/src/main/java/cn/pluss/platform/app/impl/PromoterMainPageServiceImpl.java
This commit is contained in:
liuyingfang 2023-07-21 19:33:56 +08:00
commit ae628adba4
2 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,7 @@ public interface MerchantProfitMapper extends BaseMapper<MerchantProfit> {
List<MerchantProfit> selectGroupMercProfit(@Param("userIdList") List<Long> userIdList);
@Select("SELECT SUM(`price`) FROM tb_pluss_merchant_profit WHERE `status` = '1' AND userId = #{userId}")
@Select("SELECT SUM(`price`) FROM tb_pluss_merchant_profit WHERE `status` = '5' AND userId = #{userId}")
BigDecimal selectSumValidProfit(@Param("userId") String userId);
MerchantProfit queryMerchantProfit(MerchantProfit merchantProfit);

View File

@ -283,6 +283,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");
@ -310,7 +311,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);