查询时间段内订单总金额和总用电量V2

This commit is contained in:
2023-08-11 15:59:26 +08:00
parent de21084aec
commit 70dff61eef
10 changed files with 74 additions and 49 deletions

View File

@@ -808,7 +808,8 @@
</select>
<select id="selectByStationIdAndDate" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
select
<include refid="Base_Column_List" />
from settle_order_report
where del_flag = '0'
and station_id = #{stationId,jdbcType=VARCHAR}
@@ -816,10 +817,23 @@
</select>
<select id="selectByMerchantIdAndDate" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
select
<include refid="Base_Column_List" />
from settle_order_report
where del_flag = '0'
and merchant_id = #{merchantId,jdbcType=VARCHAR}
and trade_date = #{date,jdbcType=VARCHAR}
</select>
<select id="queryOrderReport" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from settle_order_report
where del_flag = '0'
and station_id in
<foreach collection="stationIdList" item="stationId" open="(" separator="," close=")">
#{stationId,jdbcType=VARCHAR}
</foreach>
and trade_date between #{startDate,jdbcType=VARCHAR} and #{endDate,jdbcType=VARCHAR}
</select>
</mapper>