|
|
@@ -151,13 +151,15 @@
|
|
|
order by kll.generate_time desc
|
|
|
</select>
|
|
|
<select id="countSum" resultType="com.sckw.payment.model.vo.res.LedgerCountSumVo">
|
|
|
- select count(1) "ledgerCount",
|
|
|
- sum(kll.total_price) "totalPrice"
|
|
|
+ select IFNULL(count(1), 0) "ledgerCount",
|
|
|
+ sum(kll.total_price) "totalPrice"
|
|
|
from kwp_ledger_logistics kll
|
|
|
inner join kwp_ledger_logistics_unit kllu
|
|
|
- on kll.id = kllu.l_ledger_id and kllu.del_flag = 0 and kllu.unit_type = #{logisticsReq.unitType,jdbcType=INTEGER}
|
|
|
+ on kll.id = kllu.l_ledger_id and kllu.del_flag = 0 and
|
|
|
+ kllu.unit_type = #{logisticsReq.unitType,jdbcType=INTEGER}
|
|
|
inner join kwp_ledger_logistics_unit kllu2
|
|
|
- on kll.id = kllu2.l_ledger_id and kllu2.del_flag = 0 and kllu2.unit_type = #{logisticsReq.unitTypeTwo,jdbcType=INTEGER}
|
|
|
+ on kll.id = kllu2.l_ledger_id and kllu2.del_flag = 0 and
|
|
|
+ kllu2.unit_type = #{logisticsReq.unitTypeTwo,jdbcType=INTEGER}
|
|
|
<where>
|
|
|
kll.del_flag = 0
|
|
|
and kllu2.top_ent_id = #{logisticsReq.entId,jdbcType=BIGINT}
|