From 366d407470b8953170b2579ae6f4a79a34fbbddf Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 01 八月 2023 18:59:36 +0800 Subject: [PATCH] 更新部分课包管理 --- cloud-server-management/src/main/resources/mapper/TStoreMapper.xml | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml index c560076..6d5396a 100644 --- a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml +++ b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml @@ -4,11 +4,23 @@ <select id="queryProvince" resultType="map"> - select * from (select provinceCode as code, province as name from t_store where state = 1 group by provinceCode) as aa order by aa.code + select * from ( + select provinceCode as code, province as name from t_store where state = 1 + <if test="null != cityCode and '' != cityCode"> + and cityCode = #{cityCode} + </if> + group by provinceCode + ) as aa order by aa.code </select> <select id="queryCity" resultType="map"> - select * from (select cityCode as code, city as name from t_store where state = 1 and provinceCode = #{provinceCode} group by cityCode) as aa order by aa.code + select * from ( + select cityCode as code, city as name from t_store where state = 1 and provinceCode = #{provinceCode} + <if test="null != cityCode and '' != cityCode"> + and cityCode = #{cityCode} + </if> + group by cityCode + ) as aa order by aa.code </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1