UPD:修复合伙人交易金额统计汇总重复

master
duLingLing 5 years ago
parent 7fe7eef17e
commit 585c9d5dcd

@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId>
<version>1.2.2</version>
<version>1.2.3</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

@ -198,7 +198,7 @@ public class BDAnalysisServiceImpl implements BDAnalysisService {
List<JSONObject> bdSaleList = bdAnalysisMapper.getOneDayBDSaleList(params);
if (bdSaleList.size() != 0) {
for (JSONObject item : bdSaleList) {
JSONObject existBDSalesReport = bdSalesReportMapper.findByBDIdAndLogDate(item.getString("bd_id"),beginTime,0);
JSONObject existBDSalesReport = bdSalesReportMapper.findByBDIdAndLogDate(item.getString("org_id"),item.getString("bd_id"),beginTime,0);
if(existBDSalesReport==null){
JSONObject object = new JSONObject(item);
object.put("log_id", UUID.randomUUID().toString());
@ -216,7 +216,7 @@ public class BDAnalysisServiceImpl implements BDAnalysisService {
List<JSONObject> orgSaleList= transactionAnalysisMapper.getOneDayOrgMerchantSaleList(params);
if (orgSaleList.size() != 0) {
for (JSONObject item : orgSaleList) {
JSONObject existOrgSalesReport = bdSalesReportMapper.findByBDIdAndLogDate(item.getString("bd_id"),beginTime,1);
JSONObject existOrgSalesReport = bdSalesReportMapper.findByBDIdAndLogDate(item.getString("org_id"),item.getString("bd_id"),beginTime,1);
if(existOrgSalesReport==null){
JSONObject object = new JSONObject(item);
object.put("log_id", UUID.randomUUID().toString());

@ -22,7 +22,7 @@ public interface StatisticsBDSalesReportMapper {
List<JSONObject> getPartnerAmountList(JSONObject params);
JSONObject findByBDIdAndLogDate(@Param("bd_id") String bd_id, @Param("log_date")Date beginTime,@Param("isOrg") int isOrg);
JSONObject findByBDIdAndLogDate(@Param("org_id") String org_id,@Param("bd_id") String bd_id, @Param("log_date")Date beginTime,@Param("isOrg") int isOrg);
@AutoSql(type = SqlType.UPDATE)
void update(JSONObject existBDSalesReport);

@ -1044,10 +1044,10 @@
AND org.org_id = #{org_id}
</if>
<if test="begin != null">
AND trans.create_time &gt;= #{begin}
AND trans.transaction_time &gt;= #{begin}
</if>
<if test="end != null">
AND trans.create_time &lt; #{end}
AND trans.transaction_time &lt; #{end}
</if>

@ -79,7 +79,10 @@
create_time,
clearing_amount
FROM statistics_bd_sales
WHERE bd_id = #{bd_id} AND log_date = #{log_date} AND isOrg = #{isOrg}
WHERE org_id = #{org_id}
AND log_date = #{log_date}
AND isOrg = #{isOrg}
<if test="bd_id != null"> AND bd_id = #{bd_id}</if>
</select>
</mapper>
Loading…
Cancel
Save