Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 

51 wiersze
1.4 KiB

  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.simple.mapper.WxMerchantEtcpMapper">
  4. <resultMap id="BaseResultMap" type="com.simple.domain.po.WxMerchantEtcp">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="merchant_id" jdbcType="INTEGER" property="merchantId" />
  7. <result column="etcp_merchant_id" jdbcType="VARCHAR" property="etcpMerchantId" />
  8. </resultMap>
  9. <sql id="allColumns">
  10. `id`,`merchant_id`,`etcp_merchant_id`
  11. </sql>
  12. <sql id="dynamicWhereConditions">
  13. where 1 = 1
  14. <if test=" null != id ">
  15. and `id` = #{id}
  16. </if>
  17. <if test=" null != merchantId ">
  18. and `merchant_id` = #{merchantId}
  19. </if>
  20. <if test=" null != etcpMerchantId ">
  21. and `etcp_merchant_id` like concat('%', #{etcpMerchantId},'%')
  22. </if>
  23. <if test=" null != ids ">
  24. and id in
  25. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  26. #{idItem}
  27. </foreach>
  28. </if>
  29. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  30. </sql>
  31. <select id="findList" parameterType="com.simple.domain.po.WxMerchantEtcp" resultMap="BaseResultMap">
  32. select <include refid="allColumns" /> from wx_merchant_etcp
  33. <include refid="dynamicWhereConditions" />
  34. </select>
  35. </mapper>