25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 

81 satır
2.3 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.iformall.mapper.WxCouponSpreadMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxCouponSpread">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="coupon_id" jdbcType="BIGINT" property="couponId" />
  7. <result column="title" jdbcType="VARCHAR" property="title" />
  8. <result column="content" jdbcType="VARCHAR" property="content" />
  9. <result column="image" jdbcType="VARCHAR" property="image" />
  10. <result column="link_url" jdbcType="VARCHAR" property="linkUrl" />
  11. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  12. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  13. </resultMap>
  14. <sql id="allColumns">
  15. `id`,`coupon_id`,`title`,`content`,`image`,`link_url`,`create_date`,`update_date`
  16. </sql>
  17. <sql id="dynamicWhereConditions">
  18. where 1 = 1
  19. <if test=" null != id ">
  20. and `id` = #{id}
  21. </if>
  22. <if test=" null != couponId ">
  23. and `coupon_id` = #{couponId}
  24. </if>
  25. <if test=" null != title ">
  26. and `title` like concat('%', #{title},'%')
  27. </if>
  28. <if test=" null != content ">
  29. and `content` like concat('%', #{content},'%')
  30. </if>
  31. <if test=" null != image ">
  32. and `image` like concat('%', #{image},'%')
  33. </if>
  34. <if test=" null != linkUrl ">
  35. and `link_url` like concat('%', #{linkUrl},'%')
  36. </if>
  37. <if test=" null != createDate ">
  38. and `create_date` = #{createDate}
  39. </if>
  40. <if test=" null != updateDate ">
  41. and `update_date` = #{updateDate}
  42. </if>
  43. <if test=" null != ids ">
  44. and id in
  45. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  46. #{idItem}
  47. </foreach>
  48. </if>
  49. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  50. </sql>
  51. <select id="findList" parameterType="com.iformall.domain.po.WxCouponSpread" resultMap="BaseResultMap">
  52. select <include refid="allColumns" /> from wx_coupon_spread
  53. <include refid="dynamicWhereConditions" />
  54. </select>
  55. </mapper>