DataKcglKcswDefaultMapper.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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.chinaitop.depot.intelligent.ventilation.mapper.DataKcglKcswDefaultMapper">
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefault">
  5. <id column="DataID" jdbcType="CHAR" property="dataid" />
  6. <result column="UnitID" jdbcType="CHAR" property="unitid" />
  7. <result column="PeriodID" jdbcType="CHAR" property="periodid" />
  8. <result column="RoundID" jdbcType="TINYINT" property="roundid" />
  9. <result column="ModifyDate" jdbcType="TIMESTAMP" property="modifydate" />
  10. <result column="builder" jdbcType="CHAR" property="builder" />
  11. <result column="lkmc" jdbcType="VARCHAR" property="lkmc" />
  12. <result column="lkbm" jdbcType="VARCHAR" property="lkbm" />
  13. <result column="hwxz" jdbcType="CHAR" property="hwxz" />
  14. <result column="ch" jdbcType="INTEGER" property="ch" />
  15. <result column="hwh" jdbcType="INTEGER" property="hwh" />
  16. <result column="pz" jdbcType="CHAR" property="pz" />
  17. <result column="mxpz" jdbcType="CHAR" property="mxpz" />
  18. <result column="dj" jdbcType="CHAR" property="dj" />
  19. <result column="rq" jdbcType="TIMESTAMP" property="rq" />
  20. <result column="wjh" jdbcType="VARCHAR" property="wjh" />
  21. <result column="kcsl" jdbcType="DOUBLE" property="kcsl" />
  22. <result column="cjsj" jdbcType="TIMESTAMP" property="cjsj" />
  23. </resultMap>
  24. <sql id="Example_Where_Clause">
  25. <where>
  26. <foreach collection="oredCriteria" item="criteria" separator="or">
  27. <if test="criteria.valid">
  28. <trim prefix="(" prefixOverrides="and" suffix=")">
  29. <foreach collection="criteria.criteria" item="criterion">
  30. <choose>
  31. <when test="criterion.noValue">
  32. and ${criterion.condition}
  33. </when>
  34. <when test="criterion.singleValue">
  35. and ${criterion.condition} #{criterion.value}
  36. </when>
  37. <when test="criterion.betweenValue">
  38. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  39. </when>
  40. <when test="criterion.listValue">
  41. and ${criterion.condition}
  42. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  43. #{listItem}
  44. </foreach>
  45. </when>
  46. </choose>
  47. </foreach>
  48. </trim>
  49. </if>
  50. </foreach>
  51. </where>
  52. </sql>
  53. <sql id="Update_By_Example_Where_Clause">
  54. <where>
  55. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  56. <if test="criteria.valid">
  57. <trim prefix="(" prefixOverrides="and" suffix=")">
  58. <foreach collection="criteria.criteria" item="criterion">
  59. <choose>
  60. <when test="criterion.noValue">
  61. and ${criterion.condition}
  62. </when>
  63. <when test="criterion.singleValue">
  64. and ${criterion.condition} #{criterion.value}
  65. </when>
  66. <when test="criterion.betweenValue">
  67. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  68. </when>
  69. <when test="criterion.listValue">
  70. and ${criterion.condition}
  71. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  72. #{listItem}
  73. </foreach>
  74. </when>
  75. </choose>
  76. </foreach>
  77. </trim>
  78. </if>
  79. </foreach>
  80. </where>
  81. </sql>
  82. <sql id="Base_Column_List">
  83. DataID, UnitID, PeriodID, RoundID, ModifyDate, builder, lkmc, lkbm, hwxz, ch, hwh,
  84. pz, mxpz, dj, rq, wjh, kcsl, cjsj
  85. </sql>
  86. <select id="selectByExample" parameterType="com.chinaitop.depot.intelligent.ventilation.model.DataKcglKcswDefaultExample" resultMap="BaseResultMap">
  87. select
  88. <if test="distinct">
  89. distinct
  90. </if>
  91. <include refid="Base_Column_List" />
  92. from lsreport_ts.data_kcgl_kcsw_default
  93. <if test="_parameter != null">
  94. <include refid="Example_Where_Clause" />
  95. </if>
  96. <if test="orderByClause != null">
  97. order by ${orderByClause}
  98. </if>
  99. </select>
  100. </mapper>