|
|
|
@@ -222,8 +222,13 @@ public class WxVtwoActivityGrantSettlementServiceImpl extends ServiceImpl<WxVtwo |
|
|
|
public WxVtwoSettlementStatistics activitySettlementStatistics(WxVtwoActivityStatisticsVo statisticsVo) { |
|
|
|
WxVtwoActivityGrantSettlement grantSettlement = handleStatisticsVo(statisticsVo); |
|
|
|
WxVtwoSettlementStatistics settlementStatistics = wxVtwoActivityGrantSettlementMapper.settlementStatistics(grantSettlement); |
|
|
|
settlementStatistics.setMallRatio(settlementStatistics.getMallPrice().divide(settlementStatistics.getGrantPrice(),4,RoundingMode.HALF_UP).doubleValue()); |
|
|
|
settlementStatistics.setMerchantRatio(1-settlementStatistics.getMallRatio()); |
|
|
|
if(settlementStatistics.getGrantPrice() != null && settlementStatistics.getGrantPrice().compareTo(BigDecimal.ZERO) > 0){ |
|
|
|
settlementStatistics.setMallRatio(settlementStatistics.getMallPrice().divide(settlementStatistics.getGrantPrice(),4,RoundingMode.HALF_UP).doubleValue()); |
|
|
|
settlementStatistics.setMerchantRatio(1-settlementStatistics.getMallRatio()); |
|
|
|
}else{ |
|
|
|
settlementStatistics.setMallRatio(0); |
|
|
|
settlementStatistics.setMerchantRatio(0); |
|
|
|
} |
|
|
|
return settlementStatistics; |
|
|
|
} |
|
|
|
|
|
|
|
|