DicChkplatCellMapper.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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.mvc.dao.DicChkplatCellMapper">
  4. <resultMap id="BaseResultMap" type="com.mvc.entity.DicChkplatCell">
  5. <id column="ID" jdbcType="INTEGER" property="id" />
  6. <result column="CELL_ID" jdbcType="VARCHAR" property="cellId" />
  7. <result column="PLAT_ID" jdbcType="VARCHAR" property="platId" />
  8. <result column="CELL_NAME" jdbcType="VARCHAR" property="cellName" />
  9. <result column="STATIC_FLAG" jdbcType="CHAR" property="staticFlag" />
  10. <result column="STD_VALUE" jdbcType="INTEGER" property="stdValue" />
  11. <result column="USED_FLAG" jdbcType="CHAR" property="usedFlag" />
  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="(" prefixOverrides="and" suffix=")">
  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 close=")" collection="criterion.value" item="listItem" open="(" 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="(" prefixOverrides="and" suffix=")">
  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 close=")" collection="criterion.value" item="listItem" open="(" 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. ID, CELL_ID, PLAT_ID, CELL_NAME, STATIC_FLAG, STD_VALUE, USED_FLAG
  73. </sql>
  74. <select id="selectByExample" parameterType="com.mvc.entity.DicChkplatCellExample" resultMap="BaseResultMap">
  75. select
  76. <if test="distinct">
  77. distinct
  78. </if>
  79. <include refid="Base_Column_List" />
  80. from dic_chkplat_cell
  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. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  89. select
  90. <include refid="Base_Column_List" />
  91. from dic_chkplat_cell
  92. where ID = #{id,jdbcType=INTEGER}
  93. </select>
  94. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  95. delete from dic_chkplat_cell
  96. where ID = #{id,jdbcType=INTEGER}
  97. </delete>
  98. <delete id="deleteByExample" parameterType="com.mvc.entity.DicChkplatCellExample">
  99. delete from dic_chkplat_cell
  100. <if test="_parameter != null">
  101. <include refid="Example_Where_Clause" />
  102. </if>
  103. </delete>
  104. <insert id="insert" parameterType="com.mvc.entity.DicChkplatCell" useGeneratedKeys="true" keyProperty="id">
  105. insert into dic_chkplat_cell (ID, CELL_ID, PLAT_ID,
  106. CELL_NAME, STATIC_FLAG, STD_VALUE,
  107. USED_FLAG)
  108. values (#{id,jdbcType=INTEGER}, #{cellId,jdbcType=VARCHAR}, #{platId,jdbcType=VARCHAR},
  109. #{cellName,jdbcType=VARCHAR}, #{staticFlag,jdbcType=CHAR}, #{stdValue,jdbcType=INTEGER},
  110. #{usedFlag,jdbcType=CHAR})
  111. </insert>
  112. <insert id="insertSelective" parameterType="com.mvc.entity.DicChkplatCell">
  113. insert into dic_chkplat_cell
  114. <trim prefix="(" suffix=")" suffixOverrides=",">
  115. <if test="id != null">
  116. ID,
  117. </if>
  118. <if test="cellId != null">
  119. CELL_ID,
  120. </if>
  121. <if test="platId != null">
  122. PLAT_ID,
  123. </if>
  124. <if test="cellName != null">
  125. CELL_NAME,
  126. </if>
  127. <if test="staticFlag != null">
  128. STATIC_FLAG,
  129. </if>
  130. <if test="stdValue != null">
  131. STD_VALUE,
  132. </if>
  133. <if test="usedFlag != null">
  134. USED_FLAG,
  135. </if>
  136. </trim>
  137. <trim prefix="values (" suffix=")" suffixOverrides=",">
  138. <if test="id != null">
  139. #{id,jdbcType=INTEGER},
  140. </if>
  141. <if test="cellId != null">
  142. #{cellId,jdbcType=VARCHAR},
  143. </if>
  144. <if test="platId != null">
  145. #{platId,jdbcType=VARCHAR},
  146. </if>
  147. <if test="cellName != null">
  148. #{cellName,jdbcType=VARCHAR},
  149. </if>
  150. <if test="staticFlag != null">
  151. #{staticFlag,jdbcType=CHAR},
  152. </if>
  153. <if test="stdValue != null">
  154. #{stdValue,jdbcType=INTEGER},
  155. </if>
  156. <if test="usedFlag != null">
  157. #{usedFlag,jdbcType=CHAR},
  158. </if>
  159. </trim>
  160. </insert>
  161. <select id="countByExample" parameterType="com.mvc.entity.DicChkplatCellExample" resultType="java.lang.Long">
  162. select count(*) from dic_chkplat_cell
  163. <if test="_parameter != null">
  164. <include refid="Example_Where_Clause" />
  165. </if>
  166. </select>
  167. <update id="updateByExampleSelective" parameterType="map">
  168. update dic_chkplat_cell
  169. <set>
  170. <if test="record.id != null">
  171. ID = #{record.id,jdbcType=INTEGER},
  172. </if>
  173. <if test="record.cellId != null">
  174. CELL_ID = #{record.cellId,jdbcType=VARCHAR},
  175. </if>
  176. <if test="record.platId != null">
  177. PLAT_ID = #{record.platId,jdbcType=VARCHAR},
  178. </if>
  179. <if test="record.cellName != null">
  180. CELL_NAME = #{record.cellName,jdbcType=VARCHAR},
  181. </if>
  182. <if test="record.staticFlag != null">
  183. STATIC_FLAG = #{record.staticFlag,jdbcType=CHAR},
  184. </if>
  185. <if test="record.stdValue != null">
  186. STD_VALUE = #{record.stdValue,jdbcType=INTEGER},
  187. </if>
  188. <if test="record.usedFlag != null">
  189. USED_FLAG = #{record.usedFlag,jdbcType=CHAR},
  190. </if>
  191. </set>
  192. <if test="_parameter != null">
  193. <include refid="Update_By_Example_Where_Clause" />
  194. </if>
  195. </update>
  196. <update id="updateByExample" parameterType="map">
  197. update dic_chkplat_cell
  198. set ID = #{record.id,jdbcType=INTEGER},
  199. CELL_ID = #{record.cellId,jdbcType=VARCHAR},
  200. PLAT_ID = #{record.platId,jdbcType=VARCHAR},
  201. CELL_NAME = #{record.cellName,jdbcType=VARCHAR},
  202. STATIC_FLAG = #{record.staticFlag,jdbcType=CHAR},
  203. STD_VALUE = #{record.stdValue,jdbcType=INTEGER},
  204. USED_FLAG = #{record.usedFlag,jdbcType=CHAR}
  205. <if test="_parameter != null">
  206. <include refid="Update_By_Example_Where_Clause" />
  207. </if>
  208. </update>
  209. <update id="updateByPrimaryKeySelective" parameterType="com.mvc.entity.DicChkplatCell">
  210. update dic_chkplat_cell
  211. <set>
  212. <if test="cellId != null">
  213. CELL_ID = #{cellId,jdbcType=VARCHAR},
  214. </if>
  215. <if test="platId != null">
  216. PLAT_ID = #{platId,jdbcType=VARCHAR},
  217. </if>
  218. <if test="cellName != null">
  219. CELL_NAME = #{cellName,jdbcType=VARCHAR},
  220. </if>
  221. <if test="staticFlag != null">
  222. STATIC_FLAG = #{staticFlag,jdbcType=CHAR},
  223. </if>
  224. <if test="stdValue != null">
  225. STD_VALUE = #{stdValue,jdbcType=INTEGER},
  226. </if>
  227. <if test="usedFlag != null">
  228. USED_FLAG = #{usedFlag,jdbcType=CHAR},
  229. </if>
  230. </set>
  231. where ID = #{id,jdbcType=INTEGER}
  232. </update>
  233. <update id="updateByPrimaryKey" parameterType="com.mvc.entity.DicChkplatCell">
  234. update dic_chkplat_cell
  235. set CELL_ID = #{cellId,jdbcType=VARCHAR},
  236. PLAT_ID = #{platId,jdbcType=VARCHAR},
  237. CELL_NAME = #{cellName,jdbcType=VARCHAR},
  238. STATIC_FLAG = #{staticFlag,jdbcType=CHAR},
  239. STD_VALUE = #{stdValue,jdbcType=INTEGER},
  240. USED_FLAG = #{usedFlag,jdbcType=CHAR}
  241. where ID = #{id,jdbcType=INTEGER}
  242. </update>
  243. </mapper>