Przeglądaj źródła

//activity v.2

release_toaliyun_real
xiaohu 1 rok temu
rodzic
commit
24472c7b29
2 zmienionych plików z 8 dodań i 3 usunięć
  1. +7
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxVtwoActivityGrantSettlementServiceImpl.java
  2. +1
    -1
      mallinkService/src/main/resources/mapper/WxVtwoActivityGrantAwardMapper.xml

+ 7
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxVtwoActivityGrantSettlementServiceImpl.java Wyświetl plik

@@ -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;
}



+ 1
- 1
mallinkService/src/main/resources/mapper/WxVtwoActivityGrantAwardMapper.xml Wyświetl plik

@@ -135,7 +135,7 @@
<select id="awardItemStatistics" parameterType="com.iformall.domain.po.WxVtwoActivityGrantAward" resultType="com.iformall.domain.vo.WxVtwoAwardGrantStatistics">
SELECT award_id as 'awardId',
IFNULL(sum(award_count),0) as 'awardCount',
IFNULL(sum(grant_price),0) as 'awardPrice',
IFNULL(sum(grant_price),0) as 'awardPrice'
FROM wx_vtwo_activity_grant_award
<include refid="dynamicWhereConditions" />
group by award_id


Ładowanie…
Anuluj
Zapisz