liujie
2023-08-02 b64d67ef01e81a857046f19dd556b4e4f0695e1c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.dsh.other.mapper.StoreMapper">
 
 
    <select id="queryProvince" resultType="com.dsh.other.model.ProvinceAndCityVo">
        select province as name, provinceCode as code from t_store where state = 1 group by province, provinceCode
    </select>
 
 
    <select id="queryCity" resultType="com.dsh.other.model.ProvinceAndCityVo">
        select city as name, cityCode as code from t_store where state = 1
        <if test="null != pcode and '' != pcode">
            and provinceCode = #{pcode}
        </if>
        group by city, cityCode
    </select>
 
    <select id="queryStoreByCityCode" resultType="com.dsh.other.model.BaseVo">
        select id, name from t_store where state = 1 and cityCode = #{cityCode}
    </select>
</mapper>