后台服务
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

61 řádky
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.iformall.mapper.WxGameTemplateMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxGameTemplate">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="name" jdbcType="VARCHAR" property="name" />
  7. <result column="url" jdbcType="VARCHAR" property="url" />
  8. <result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
  9. <result column="option_limit" jdbcType="INTEGER" property="optionLimit" />
  10. <result column="rules" jdbcType="VARCHAR" property="rules" />
  11. <result column="type" jdbcType="INTEGER" property="type" />
  12. </resultMap>
  13. <sql id="allColumns">
  14. `id`,`name`,`url`,`img_url`,`option_limit`,`rules`,`type`
  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 != name ">
  22. and `name` like concat('%', #{name},'%')
  23. </if>
  24. <if test=" null != url ">
  25. and `url` like concat('%', #{url},'%')
  26. </if>
  27. <if test=" null != imgUrl ">
  28. and `img_url` like concat('%', #{imgUrl},'%')
  29. </if>
  30. <if test=" null != optionLimit ">
  31. and `option_limit` = #{optionLimit}
  32. </if>
  33. <if test=" null != rules ">
  34. and `rules` like concat('%', #{rules},'%')
  35. </if>
  36. <if test=" null != type ">
  37. and `type` = #{type}
  38. </if>
  39. <if test=" null != ids ">
  40. and id in
  41. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  42. #{idItem}
  43. </foreach>
  44. </if>
  45. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  46. </sql>
  47. <select id="findList" parameterType="com.iformall.domain.po.WxGameTemplate" resultMap="BaseResultMap">
  48. select <include refid="allColumns" /> from wx_game_template
  49. <include refid="dynamicWhereConditions" />
  50. </select>
  51. </mapper>