|
|
|
@ -1094,20 +1094,20 @@ public interface HighOrderMapperExt { |
|
|
|
|
@Select({ |
|
|
|
|
"<script> " + |
|
|
|
|
" select" + |
|
|
|
|
" case when sum(b.gas_refuel_price) is not null then sum(b.gas_refuel_price) else 0 end refuelPrice," + |
|
|
|
|
" case when sum(a.gas_refuel_price) is not null then sum(a.gas_refuel_price) else 0 end refuelPrice," + |
|
|
|
|
" count(1) refuelNum," + |
|
|
|
|
" case when sum(a.gas_oil_liters) is not null then sum(a.gas_oil_liters) else 0 end refuelLiters" + |
|
|
|
|
" from high_gas_order a" + |
|
|
|
|
" where " + |
|
|
|
|
" <if test='param.storeId != null'> and goods_id in (${param.storeId}) </if>" + |
|
|
|
|
" <if test='param.gasStaffId != null'> and a.gas_staff_id = #{param.gasStaffId}</if>" + |
|
|
|
|
" <if test='param.gasOilNo != null'> and a.gas_oil_no = #{param.gasOilNo}</if>" + |
|
|
|
|
" <if test='param.status != null'> and b.order_status in (${param.status} )</if>" + |
|
|
|
|
" <if test='param.createTimeS != null'> <![CDATA[ and b.create_time >= #{param.createTimeS} ]]> </if>", |
|
|
|
|
" <if test='param.createTimeE != null'> <![CDATA[ and b.create_time <= #{param.createTimeE} ]]> </if>", |
|
|
|
|
" <if test='param.payTimeS != null'> <![CDATA[ and b.pay_time >= #{param.payTimeS} ]]> </if>", |
|
|
|
|
" <if test='param.payTimeE != null'> <![CDATA[ and b.pay_time <= #{param.payTimeE} ]]> </if>", |
|
|
|
|
" <if test='param.orderNo != null'> and b.order_no LIKE concat('%', #{param.orderNo}, '%')</if>" + |
|
|
|
|
" where 1 = 1" + |
|
|
|
|
" <if test='param.storeId != null'> and store_id in (${param.storeId}) </if>" + |
|
|
|
|
" <if test='param.gasStaffId != null'> and gas_staff_id = #{param.gasStaffId}</if>" + |
|
|
|
|
" <if test='param.gasOilNo != null'> and gas_oil_no = #{param.gasOilNo}</if>" + |
|
|
|
|
" <if test='param.status != null'> and status in (${param.status} )</if>" + |
|
|
|
|
" <if test='param.createTimeS != null'> <![CDATA[ and create_time >= #{param.createTimeS} ]]> </if>", |
|
|
|
|
" <if test='param.createTimeE != null'> <![CDATA[ and create_time <= #{param.createTimeE} ]]> </if>", |
|
|
|
|
" <if test='param.payTimeS != null'> <![CDATA[ and pay_time >= #{param.payTimeS} ]]> </if>", |
|
|
|
|
" <if test='param.payTimeE != null'> <![CDATA[ and pay_time <= #{param.payTimeE} ]]> </if>", |
|
|
|
|
" <if test='param.orderNo != null'> and order_no LIKE concat('%', #{param.orderNo}, '%')</if>" + |
|
|
|
|
" ORDER BY create_time desc" + |
|
|
|
|
"</script>" |
|
|
|
|
}) |
|
|
|
|