后台服务
Você não pode selecionar mais de 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.

61 linhas
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.SysMonitorMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.SysMonitor">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="name" jdbcType="VARCHAR" property="name" />
  7. <result column="url" jdbcType="VARCHAR" property="url" />
  8. <result column="type" jdbcType="INTEGER" property="type" />
  9. <result column="deploy" jdbcType="INTEGER" property="deploy" />
  10. <result column="enable" jdbcType="INTEGER" property="enable" />
  11. <result column="err_msg" jdbcType="VARCHAR" property="errMsg" />
  12. </resultMap>
  13. <sql id="allColumns">
  14. `id`,`name`,`url`,`type`,`deploy`,`enable`,`err_msg`
  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` = #{name}
  23. </if>
  24. <if test=" null != url ">
  25. and `url` = #{url}
  26. </if>
  27. <if test=" null != type ">
  28. and `type` = #{type}
  29. </if>
  30. <if test=" null != deploy ">
  31. and `deploy` = #{deploy}
  32. </if>
  33. <if test=" null != enable ">
  34. and `enable` = #{enable}
  35. </if>
  36. <if test=" null != errMsg ">
  37. and `err_msg` like concat('%', #{errMsg},'%')
  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.SysMonitor" resultMap="BaseResultMap">
  48. select <include refid="allColumns" /> from sys_monitor
  49. <include refid="dynamicWhereConditions" />
  50. </select>
  51. </mapper>