From b0254c5a17b3915eb00fdcb33f0eea222cff78ee Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期三, 06 三月 2024 15:06:54 +0800 Subject: [PATCH] Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/PlayPai --- cloud-server-management/src/main/resources/mapper/TStoreMapper.xml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 45 insertions(+), 0 deletions(-) diff --git a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml index a7a4536..3dae29d 100644 --- a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml +++ b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml @@ -190,4 +190,49 @@ </if> </select> + + + + <select id="listStoreAll" resultType="map"> + select + a.id, + CONCAT(a.province, a.city) as province, + b.name as operator, + a.name, + c.gate + from t_store a + left join t_operator b on (a.operatorId = b.id) + left join (select GROUP_CONCAT(id) as gate, storeId from t_gate group by storeId) c on (a.id = c.storeId) + where a.state = 1 + <if test="null != name and '' != name"> + and a.name like CONCAT('%', #{name}, '%') + </if> + <if test="null != operator"> + and a.operatorId = #{operator} + </if> + <if test="null != provinceCode and '' != provinceCode"> + and a.provinceCode = #{provinceCode} + </if> + <if test="null != cityCode and '' != cityCode"> + and a.cityCode = #{cityCode} + </if> + </select> + + + + <select id="listStoreAllByIds" resultType="map"> + select + a.id, + CONCAT(a.province, a.city) as province, + b.name as operator, + a.name, + c.gate + from t_store a + left join t_operator b on (a.operatorId = b.id) + left join (select GROUP_CONCAT(id) as gate, storeId from t_gate group by storeId) c on (a.id = c.storeId) + where a.id in + <foreach collection="ids" item="item" index="index" open="(" separator="," close=")"> + #{item} + </foreach> + </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1