puzhibing
2023-07-17 f195cf48cf57635c8848b2bc32afd4541c4090ed
cloud-server-other/src/main/resources/mapper/StoreMapper.xml
@@ -3,4 +3,20 @@
<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>