后台服务
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WxBankProvinceCityMapper.xml 1.6 KiB

2 년 전
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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.iformall.mapper.WxBankProvinceCityMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBankProvinceCity">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="parent_id" jdbcType="BIGINT" property="parentId" />
  7. <result column="region_code" jdbcType="VARCHAR" property="regionCode"/>
  8. <result column="province_code" jdbcType="INTEGER" property="provinceCode" />
  9. <result column="province_name" jdbcType="VARCHAR" property="provinceName" />
  10. <result column="city_code" jdbcType="INTEGER" property="cityCode" />
  11. <result column="city_name" jdbcType="VARCHAR" property="cityName" />
  12. </resultMap>
  13. <sql id="allColumns">
  14. `id`,`parent_id`,`region_code`,`province_code`,`province_name`,`city_code`,`city_name`
  15. </sql>
  16. <sql id="dynamicWhereConditions">
  17. where 1 = 1
  18. <if test=" null != id ">
  19. and `id` = #{id}
  20. </if>
  21. <if test=" null != parentId">
  22. and `parent_id` = #{parentId}
  23. </if>
  24. <if test=" null != regionCode and '' != regionCode">
  25. and `region_code` = #{regionCode}
  26. </if>
  27. <if test=" null != provinceCode">
  28. and `province_code` = #{provinceCode}
  29. </if>
  30. <if test=" null != cityCode">
  31. and `city_code` = #{cityCode}
  32. </if>
  33. </sql>
  34. <select id="findList" parameterType="com.iformall.domain.po.WxBankProvinceCity" resultMap="BaseResultMap">
  35. select
  36. <include refid="allColumns"/>
  37. from wx_bank_province_city
  38. <include refid="dynamicWhereConditions"/>
  39. </select>
  40. </mapper>