后台服务
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ThDevInfoMapper.xml 2.2 KiB

há 2 anos
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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.ThDevInfoMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.ThDevInfo">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="dev_id" jdbcType="VARCHAR" property="devId" />
  7. <result column="name" jdbcType="VARCHAR" property="name" />
  8. <result column="type" jdbcType="INTEGER" property="type" />
  9. <result column="req_key" jdbcType="VARCHAR" property="reqKey" />
  10. <result column="res_key" jdbcType="VARCHAR" property="resKey" />
  11. <result column="state" jdbcType="INTEGER" property="state" />
  12. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  13. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  14. </resultMap>
  15. <sql id="allColumns">
  16. `id`,`dev_id`,`name`,`type`,`req_key`,`res_key`,`state`,`create_date`,`update_date`
  17. </sql>
  18. <sql id="dynamicWhereConditions">
  19. where 1 = 1
  20. <if test=" null != id ">
  21. and `id` = #{id}
  22. </if>
  23. <if test=" null != devId ">
  24. and `dev_id` like concat('%', #{devId},'%')
  25. </if>
  26. <if test=" null != name ">
  27. and `name` like concat('%', #{name},'%')
  28. </if>
  29. <if test=" null != type ">
  30. and `type` = #{type}
  31. </if>
  32. <if test=" null != reqKey ">
  33. and `req_key` like concat('%', #{reqKey},'%')
  34. </if>
  35. <if test=" null != resKey ">
  36. and `res_key` like concat('%', #{resKey},'%')
  37. </if>
  38. <if test=" null != state ">
  39. and `state` = #{state}
  40. </if>
  41. <if test=" null != createDate ">
  42. and `create_date` = #{createDate}
  43. </if>
  44. <if test=" null != updateDate ">
  45. and `update_date` = #{updateDate}
  46. </if>
  47. <if test=" null != ids ">
  48. and id in
  49. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  50. #{idItem}
  51. </foreach>
  52. </if>
  53. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  54. </sql>
  55. <select id="findList" parameterType="com.iformall.domain.po.ThDevInfo" resultMap="BaseResultMap">
  56. select <include refid="allColumns" /> from th_dev_info
  57. <include refid="dynamicWhereConditions" />
  58. </select>
  59. </mapper>