From 624c9eec90d59297800f03276f8518daa1bd9f94 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 04 八月 2023 09:23:02 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- cloud-server-management/src/main/resources/mapper/TStoreMapper.xml | 37 +++++++++++++++++++++++++++++++++++++ 1 files changed, 37 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 972c608..131ad0c 100644 --- a/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml +++ b/cloud-server-management/src/main/resources/mapper/TStoreMapper.xml @@ -2,6 +2,43 @@ <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.dsh.course.mapper.StoreMapper"> + <select id="listAll" resultType="com.dsh.guns.modular.system.model.TStoreListVo"> + select t1.*,t2.name userName,t2.phone userPhone from t_store t1 left join sys_user t2 on t1.storeStaffId = t2.id + where 1=1 + <if test="provinceCode !=null and provinceCode !=''"> + and t1.provinceCode = #{provinceCode} + </if> + <if test="cityCode !=null and cityCode !=''"> + and t1.cityCode = #{cityCode} + </if> + <if test="name !=null and name !=''"> + and t2.name like concat("%",#{name},"%") + </if> + <if test="phone !=null and phone !=''"> + and t2.phone like concat("%",#{phone},"%") + </if> + <if test="shopName !=null and shopName !=''"> + and t1.name like concat("%",#{shopName},"%") + </if> + </select> + <select id="queryProvince" resultType="map"> + 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} + <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