bugfix 修复保险金额统计错误

This commit is contained in:
Lemon
2026-04-01 09:07:31 +08:00
parent 79738d2e57
commit da17b5151d

View File

@@ -3614,22 +3614,16 @@
<select id="getInsuranceAmount" resultType="com.jsowell.pile.vo.web.IndexPlatformProfitVO"> <select id="getInsuranceAmount" resultType="com.jsowell.pile.vo.web.IndexPlatformProfitVO">
select select
DATE_FORMAT(settlement_time, '%Y-%m-%d') as tradeDate, DATE_FORMAT(create_time, '%Y-%m-%d') as tradeDate,
sum(insurance_amount) as insuranceAmount sum(trade_amount) as insuranceAmount
from from
`order_basic_info` `order_insurance_info`
WHERE WHERE
`del_flag` = '0' `del_flag` = '0'
AND `insurance_amount` > 0 AND `refund_status` = '0'
AND NOT EXISTS ( AND `trade_amount` > 0
SELECT 1 and `create_time` BETWEEN #{dto.startTime,jdbcType=VARCHAR} and #{dto.endTime,jdbcType=VARCHAR}
FROM order_insurance_info insurance_info group by DATE_FORMAT(create_time, '%Y-%m-%d');
WHERE insurance_info.order_code = order_basic_info.order_code
AND insurance_info.del_flag = '0'
AND insurance_info.refund_status = '1'
)
and `settlement_time` BETWEEN #{dto.startTime,jdbcType=VARCHAR} and #{dto.endTime,jdbcType=VARCHAR}
group by DATE_FORMAT(settlement_time, '%Y-%m-%d');
</select> </select>
<select id="batchQueryChargingConnectorInfo" <select id="batchQueryChargingConnectorInfo"