后台服务
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

45 righe
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.iformall.mapper.WxDataRuleTargetMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxDataRuleTarget">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="parent" jdbcType="BIGINT" property="parent"/>
  7. <result column="name" jdbcType="VARCHAR" property="name"/>
  8. <result column="tag" jdbcType="VARCHAR" property="tag"/>
  9. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  10. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  11. </resultMap>
  12. <sql id="allColumns">
  13. `id`,`parent`,`name`,`tag`,`create_time`,`update_time`
  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 != name ">
  21. and `name` like concat('%',#{name},'%')
  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.iformall.domain.po.WxDataRuleTarget" resultMap="BaseResultMap">
  32. select
  33. <include refid="allColumns"/>
  34. from wx_data_rule_target
  35. <include refid="dynamicWhereConditions"/>
  36. </select>
  37. </mapper>