12345678910111213141516171819202122232425262728293031323334353637
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.huiju.estateagents.mapper.TaOrgCityMapper">
  4. <select id="selectByIdCity" resultType="string">
  5. select city_id from ta_org_city where parentid != 100000 and org_id = #{orgId}
  6. </select>
  7. <select id="selectAdminTdCityList" resultType="com.huiju.estateagents.entity.TaOrgCity">
  8. SELECT
  9. oc.city_id AS id,
  10. oc.`name` AS name,
  11. oc.org_id,
  12. oc.`status`,
  13. oc.parentid,
  14. LEFT (c.pinyin, 1) AS initial
  15. FROM
  16. ta_org_city oc
  17. LEFT JOIN td_city c ON oc.city_id = c.id
  18. WHERE
  19. oc.org_id = #{orgId}
  20. and oc.parentid !=100000
  21. and oc.status = 1
  22. ORDER BY
  23. c.pinyin
  24. </select>
  25. <select id="selectAdminTdAreaCityList" resultType="com.huiju.estateagents.entity.TaOrgCity">
  26. SELECT
  27. id,
  28. NAME,
  29. parentid,
  30. LEFT ( pinyin, 1 ) AS initial
  31. FROM
  32. td_city
  33. WHERE
  34. parentid = #{cityId}
  35. </select>
  36. </mapper>