update 查询首页数据

This commit is contained in:
2023-05-13 17:41:05 +08:00
parent 3f8405d3d2
commit 42d206e446
11 changed files with 79 additions and 5 deletions

View File

@@ -330,10 +330,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and t1.station_id = #{IndexQueryDTO.stationId,jdbcType=VARCHAR}
</if>
<!-- 数据范围过滤 -->
<if test="IndexQueryDTO.stationDeptIds != null and IndexQueryDTO.stationDeptIds.size() != 0">
<if test="IndexQueryDTO.stationIdList != null and IndexQueryDTO.stationIdList.size() != 0">
and t1.station_id in
<foreach collection="IndexQueryDTO.stationDeptIds" item="stationDeptId" open="(" separator="," close=")">
#{stationDeptId}
<foreach collection="IndexQueryDTO.stationIdList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
group by t4.totalMemberAmount

View File

@@ -264,4 +264,18 @@
where
app_id = #{appId,jdbcType=VARCHAR}
</select>
<select id="queryByMerchantDeptIds" resultType="java.lang.String">
SELECT
t2.id
FROM
pile_merchant_info t1
LEFT JOIN pile_station_info t2 ON t2.merchant_id = t1.id and t2.del_flag = '0'
WHERE
t1.del_flag = '0'
AND t1.dept_id IN
<foreach collection="merchantDeptIds" item="item" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</select>
</mapper>

View File

@@ -373,4 +373,14 @@
<include refid="selectPileStationInfoVo"/>
where public_flag = '1'
</select>
<select id="queryByStationDeptIds" resultType="java.lang.String">
select id
from pile_station_info
where del_flag = '0'
and dept_id in
<foreach collection="stationDeptIds" item="item" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</select>
</mapper>