TLightinfoMapper.xml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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.grainsituation.mapper.TLightinfoMapper" >
  4. <resultMap id="BaseResultMap" type="com.chinaitop.depot.intelligent.grainsituation.model.TLightinfo" >
  5. <result column="vLightCode" property="vlightcode" jdbcType="VARCHAR" />
  6. <result column="vLightName" property="vlightname" jdbcType="VARCHAR" />
  7. <result column="vCfCode" property="vcfcode" jdbcType="VARCHAR" />
  8. <result column="iTdh" property="itdh" jdbcType="INTEGER" />
  9. <result column="vStaute" property="vstaute" jdbcType="INTEGER" />
  10. <result column="vUpdateTime" property="vupdatetime" jdbcType="TIMESTAMP" />
  11. <result column="vRemark" property="vremark" jdbcType="VARCHAR" />
  12. </resultMap>
  13. <sql id="Example_Where_Clause" >
  14. <where >
  15. <foreach collection="oredCriteria" item="criteria" separator="or" >
  16. <if test="criteria.valid" >
  17. <trim prefix="(" suffix=")" prefixOverrides="and" >
  18. <foreach collection="criteria.criteria" item="criterion" >
  19. <choose >
  20. <when test="criterion.noValue" >
  21. and ${criterion.condition}
  22. </when>
  23. <when test="criterion.singleValue" >
  24. and ${criterion.condition} #{criterion.value}
  25. </when>
  26. <when test="criterion.betweenValue" >
  27. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  28. </when>
  29. <when test="criterion.listValue" >
  30. and ${criterion.condition}
  31. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  32. #{listItem}
  33. </foreach>
  34. </when>
  35. </choose>
  36. </foreach>
  37. </trim>
  38. </if>
  39. </foreach>
  40. </where>
  41. </sql>
  42. <sql id="Update_By_Example_Where_Clause" >
  43. <where >
  44. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  45. <if test="criteria.valid" >
  46. <trim prefix="(" suffix=")" prefixOverrides="and" >
  47. <foreach collection="criteria.criteria" item="criterion" >
  48. <choose >
  49. <when test="criterion.noValue" >
  50. and ${criterion.condition}
  51. </when>
  52. <when test="criterion.singleValue" >
  53. and ${criterion.condition} #{criterion.value}
  54. </when>
  55. <when test="criterion.betweenValue" >
  56. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  57. </when>
  58. <when test="criterion.listValue" >
  59. and ${criterion.condition}
  60. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  61. #{listItem}
  62. </foreach>
  63. </when>
  64. </choose>
  65. </foreach>
  66. </trim>
  67. </if>
  68. </foreach>
  69. </where>
  70. </sql>
  71. <sql id="Base_Column_List" >
  72. vLightCode, vLightName, vCfCode, iTdh, vStaute, vUpdateTime, vRemark
  73. </sql>
  74. <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLightinfoExample" >
  75. select
  76. <if test="distinct" >
  77. distinct
  78. </if>
  79. <include refid="Base_Column_List" />
  80. from t_lightinfo
  81. <if test="_parameter != null" >
  82. <include refid="Example_Where_Clause" />
  83. </if>
  84. <if test="orderByClause != null" >
  85. order by ${orderByClause}
  86. </if>
  87. </select>
  88. <delete id="deleteByExample" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLightinfoExample" >
  89. delete from t_lightinfo
  90. <if test="_parameter != null" >
  91. <include refid="Example_Where_Clause" />
  92. </if>
  93. </delete>
  94. <insert id="insert" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLightinfo" >
  95. insert into t_lightinfo (vLightCode, vLightName, vCfCode,
  96. iTdh, vStaute, vUpdateTime,
  97. vRemark)
  98. values (#{vlightcode,jdbcType=VARCHAR}, #{vlightname,jdbcType=VARCHAR}, #{vcfcode,jdbcType=VARCHAR},
  99. #{itdh,jdbcType=INTEGER}, #{vstaute,jdbcType=INTEGER}, #{vupdatetime,jdbcType=TIMESTAMP},
  100. #{vremark,jdbcType=VARCHAR})
  101. </insert>
  102. <insert id="insertSelective" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLightinfo" >
  103. insert into t_lightinfo
  104. <trim prefix="(" suffix=")" suffixOverrides="," >
  105. <if test="vlightcode != null" >
  106. vLightCode,
  107. </if>
  108. <if test="vlightname != null" >
  109. vLightName,
  110. </if>
  111. <if test="vcfcode != null" >
  112. vCfCode,
  113. </if>
  114. <if test="itdh != null" >
  115. iTdh,
  116. </if>
  117. <if test="vstaute != null" >
  118. vStaute,
  119. </if>
  120. <if test="vupdatetime != null" >
  121. vUpdateTime,
  122. </if>
  123. <if test="vremark != null" >
  124. vRemark,
  125. </if>
  126. </trim>
  127. <trim prefix="values (" suffix=")" suffixOverrides="," >
  128. <if test="vlightcode != null" >
  129. #{vlightcode,jdbcType=VARCHAR},
  130. </if>
  131. <if test="vlightname != null" >
  132. #{vlightname,jdbcType=VARCHAR},
  133. </if>
  134. <if test="vcfcode != null" >
  135. #{vcfcode,jdbcType=VARCHAR},
  136. </if>
  137. <if test="itdh != null" >
  138. #{itdh,jdbcType=INTEGER},
  139. </if>
  140. <if test="vstaute != null" >
  141. #{vstaute,jdbcType=INTEGER},
  142. </if>
  143. <if test="vupdatetime != null" >
  144. #{vupdatetime,jdbcType=TIMESTAMP},
  145. </if>
  146. <if test="vremark != null" >
  147. #{vremark,jdbcType=VARCHAR},
  148. </if>
  149. </trim>
  150. </insert>
  151. <select id="countByExample" parameterType="com.chinaitop.depot.intelligent.grainsituation.model.TLightinfoExample" resultType="java.lang.Integer" >
  152. select count(*) from t_lightinfo
  153. <if test="_parameter != null" >
  154. <include refid="Example_Where_Clause" />
  155. </if>
  156. </select>
  157. <update id="updateByExampleSelective" parameterType="map" >
  158. update t_lightinfo
  159. <set >
  160. <if test="record.vlightcode != null" >
  161. vLightCode = #{record.vlightcode,jdbcType=VARCHAR},
  162. </if>
  163. <if test="record.vlightname != null" >
  164. vLightName = #{record.vlightname,jdbcType=VARCHAR},
  165. </if>
  166. <if test="record.vcfcode != null" >
  167. vCfCode = #{record.vcfcode,jdbcType=VARCHAR},
  168. </if>
  169. <if test="record.itdh != null" >
  170. iTdh = #{record.itdh,jdbcType=INTEGER},
  171. </if>
  172. <if test="record.vstaute != null" >
  173. vStaute = #{record.vstaute,jdbcType=INTEGER},
  174. </if>
  175. <if test="record.vupdatetime != null" >
  176. vUpdateTime = #{record.vupdatetime,jdbcType=TIMESTAMP},
  177. </if>
  178. <if test="record.vremark != null" >
  179. vRemark = #{record.vremark,jdbcType=VARCHAR},
  180. </if>
  181. </set>
  182. <if test="_parameter != null" >
  183. <include refid="Update_By_Example_Where_Clause" />
  184. </if>
  185. </update>
  186. <update id="updateByExample" parameterType="map" >
  187. update t_lightinfo
  188. set vLightCode = #{record.vlightcode,jdbcType=VARCHAR},
  189. vLightName = #{record.vlightname,jdbcType=VARCHAR},
  190. vCfCode = #{record.vcfcode,jdbcType=VARCHAR},
  191. iTdh = #{record.itdh,jdbcType=INTEGER},
  192. vStaute = #{record.vstaute,jdbcType=INTEGER},
  193. vUpdateTime = #{record.vupdatetime,jdbcType=TIMESTAMP},
  194. vRemark = #{record.vremark,jdbcType=VARCHAR}
  195. <if test="_parameter != null" >
  196. <include refid="Update_By_Example_Where_Clause" />
  197. </if>
  198. </update>
  199. </mapper>