Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

69 строки
1.9 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.WxFlashSaleMapper">
  4. <resultMap id="BaseResultMap" type="com.simple.domain.po.WxFlashSale">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="activity_id" jdbcType="BIGINT" property="activityId" />
  8. <result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
  9. <result column="uptime" jdbcType="TIMESTAMP" property="uptime" />
  10. <result column="is_enable" jdbcType="INTEGER" property="isEnable" />
  11. </resultMap>
  12. <sql id="allColumns">
  13. `id`,`tenant_id`,`activity_id`,`createtime`,`uptime`,`is_enable`
  14. </sql>
  15. <sql id="dynamicWhereConditions">
  16. where 1 = 1
  17. <if test=" null != id ">
  18. and `id` = #{id}
  19. </if>
  20. <if test=" null != tenantId ">
  21. and `tenant_id` like concat('%', #{tenantId},'%')
  22. </if>
  23. <if test=" null != activityId ">
  24. and `activity_id` = #{activityId}
  25. </if>
  26. <if test=" null != createtime ">
  27. and `createtime` = #{createtime}
  28. </if>
  29. <if test=" null != uptime ">
  30. and `uptime` = #{uptime}
  31. </if>
  32. <if test=" null != isEnable ">
  33. and `is_enable` = #{isEnable}
  34. </if>
  35. <if test=" null != ids ">
  36. and id in
  37. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  38. #{idItem}
  39. </foreach>
  40. </if>
  41. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  42. </sql>
  43. <select id="findList" parameterType="com.simple.domain.po.WxFlashSale" resultMap="BaseResultMap">
  44. select <include refid="allColumns" /> from wx_flash_sale
  45. <include refid="dynamicWhereConditions" />
  46. </select>
  47. </mapper>