123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?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.huiju.estateagents.mapper.TdCityMapper">
- <select id="selectCity" resultType="com.huiju.estateagents.entity.TdCity">
- SELECT
- *,
- LEFT(pinyin,1) AS initial
- FROM
- td_city
- <where>
- 1=1
- <if test="null != status and status != '' ">
- and status = #{status}
- </if>
- <if test="leveltype != null and leveltype != ''">
- and leveltype = #{leveltype}
- </if>
- </where>
- ORDER BY
- pinyin
- </select>
-
-
- <select id="selectWxCity" resultType="com.huiju.estateagents.entity.TdCity">
-
- SELECT
- c.id,
- c.name,
- c.parentid,
- c.shortname,
- c.leveltype,
- c.citycode,
- c.zipcode,
- c.lng,
- c.lat,
- c.pinyin,
- oc.org_id,
- oc.`status`,
- LEFT (c.pinyin, 1) AS initial
- FROM
- ta_org_city oc
- INNER JOIN td_city c ON oc.city_id = c.id
- WHERE
- oc.org_id = #{orgId}
- and oc.parentid !=100000
- and oc.status = 1
- ORDER BY
- c.pinyin
- </select>
-
- </mapper>
|