运营商查询订单报表方法添加站点名称并分页

This commit is contained in:
Lemon
2023-06-15 17:39:23 +08:00
parent 0b16ac9d06
commit 6dd8e2f51e
7 changed files with 130 additions and 18 deletions

View File

@@ -123,21 +123,34 @@
</foreach>
</delete>
<select id="getMerchantOrderReport" resultMap="SettleOrderReportResult">
<select id="getMerchantOrderReport" resultType="com.jsowell.pile.vo.web.SettleOrderReportVO">
select
<include refid="Base_Column_List"/>
t1.id,
t1.merchant_id as merchantId,
t1.station_id as stationId,
t2.station_name as stationName,
t1.use_electricity as useElectricity,
t1.charge_num as chargeNum,
t1.charge_time as chargeTime,
t1.electricity_amount as electricityAmount,
t1.service_amount as serviceAmount,
t1.total_amount as totalAmount,
t1.virtual_amount as virtualAmount,
t1.trade_date as tradeDate,
t1.trade_amount as tradeAmount,
t1.trade_fee as tradeFee
from
settle_order_report
settle_order_report t1 join pile_station_info t2 on t1.station_id = t2.id
where
del_flag = '0'
t1.del_flag = '0'
<if test="dto.merchantId != null and dto.merchantId != ''">
and merchant_id = #{dto.merchantId,jdbcType=VARCHAR}
and t1.merchant_id = #{dto.merchantId,jdbcType=VARCHAR}
</if>
<if test="dto.startTime != null and dto.startTime != ''">
and trade_date <![CDATA[ >= ]]> #{dto.startTime,jdbcType=VARCHAR}
and t1.trade_date <![CDATA[ >= ]]> #{dto.startTime,jdbcType=VARCHAR}
</if>
<if test="dto.endTime != null and dto.endTime != ''">
and trade_date <![CDATA[ <= ]]> #{dto.endTime,jdbcType=VARCHAR}
and t1.trade_date <![CDATA[ <= ]]> #{dto.endTime,jdbcType=VARCHAR}
</if>
</select>
</mapper>