WmAccMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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.WmAccMapper">
  4. <resultMap id="BaseResultMap" type="com.mvc.entity.WmAcc">
  5. <id column="ID" jdbcType="INTEGER" property="id" />
  6. <result column="WM_ID" jdbcType="VARCHAR" property="wmId" />
  7. <result column="STATION_CODE" jdbcType="VARCHAR" property="stationCode" />
  8. <result column="WM_INDEX" jdbcType="INTEGER" property="wmIndex" />
  9. <result column="INIT_VOL_FLAG" jdbcType="CHAR" property="initVolFlag" />
  10. <result column="INIT_VOL" jdbcType="INTEGER" property="initVol" />
  11. <result column="DN_TYPE" jdbcType="INTEGER" property="dnType" />
  12. <result column="UINT_TYPE" jdbcType="VARCHAR" property="uintType" />
  13. <result column="DIGIT_NUM" jdbcType="INTEGER" property="digitNum" />
  14. <result column="WHELL_NUM" jdbcType="INTEGER" property="whellNum" />
  15. <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
  16. <result column="EXP_DATE" jdbcType="TIMESTAMP" property="expDate" />
  17. <result column="USE_FLAG" jdbcType="CHAR" property="useFlag" />
  18. </resultMap>
  19. <sql id="Example_Where_Clause">
  20. <where>
  21. <foreach collection="oredCriteria" item="criteria" separator="or">
  22. <if test="criteria.valid">
  23. <trim prefix="(" prefixOverrides="and" suffix=")">
  24. <foreach collection="criteria.criteria" item="criterion">
  25. <choose>
  26. <when test="criterion.noValue">
  27. and ${criterion.condition}
  28. </when>
  29. <when test="criterion.singleValue">
  30. and ${criterion.condition} #{criterion.value}
  31. </when>
  32. <when test="criterion.betweenValue">
  33. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  34. </when>
  35. <when test="criterion.listValue">
  36. and ${criterion.condition}
  37. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  38. #{listItem}
  39. </foreach>
  40. </when>
  41. </choose>
  42. </foreach>
  43. </trim>
  44. </if>
  45. </foreach>
  46. </where>
  47. </sql>
  48. <sql id="Update_By_Example_Where_Clause">
  49. <where>
  50. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  51. <if test="criteria.valid">
  52. <trim prefix="(" prefixOverrides="and" suffix=")">
  53. <foreach collection="criteria.criteria" item="criterion">
  54. <choose>
  55. <when test="criterion.noValue">
  56. and ${criterion.condition}
  57. </when>
  58. <when test="criterion.singleValue">
  59. and ${criterion.condition} #{criterion.value}
  60. </when>
  61. <when test="criterion.betweenValue">
  62. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  63. </when>
  64. <when test="criterion.listValue">
  65. and ${criterion.condition}
  66. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  67. #{listItem}
  68. </foreach>
  69. </when>
  70. </choose>
  71. </foreach>
  72. </trim>
  73. </if>
  74. </foreach>
  75. </where>
  76. </sql>
  77. <sql id="Base_Column_List">
  78. ID, WM_ID, STATION_CODE, WM_INDEX, INIT_VOL_FLAG, INIT_VOL, DN_TYPE, UINT_TYPE, DIGIT_NUM,
  79. WHELL_NUM, CREATE_DATE, EXP_DATE, USE_FLAG
  80. </sql>
  81. <select id="selectByExample" parameterType="com.mvc.entity.WmAccExample" resultMap="BaseResultMap">
  82. select
  83. <if test="distinct">
  84. distinct
  85. </if>
  86. <include refid="Base_Column_List" />
  87. from wm_acc
  88. <if test="_parameter != null">
  89. <include refid="Example_Where_Clause" />
  90. </if>
  91. <if test="orderByClause != null">
  92. order by ${orderByClause}
  93. </if>
  94. </select>
  95. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  96. select
  97. <include refid="Base_Column_List" />
  98. from wm_acc
  99. where ID = #{id,jdbcType=INTEGER}
  100. </select>
  101. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  102. delete from wm_acc
  103. where ID = #{id,jdbcType=INTEGER}
  104. </delete>
  105. <delete id="deleteByExample" parameterType="com.mvc.entity.WmAccExample">
  106. delete from wm_acc
  107. <if test="_parameter != null">
  108. <include refid="Example_Where_Clause" />
  109. </if>
  110. </delete>
  111. <insert id="insert" parameterType="com.mvc.entity.WmAcc" useGeneratedKeys="true" keyProperty="id">
  112. insert into wm_acc (ID, WM_ID, STATION_CODE,
  113. WM_INDEX, INIT_VOL_FLAG, INIT_VOL,
  114. DN_TYPE, UINT_TYPE, DIGIT_NUM,
  115. WHELL_NUM, CREATE_DATE, EXP_DATE,
  116. USE_FLAG)
  117. values (#{id,jdbcType=INTEGER}, #{wmId,jdbcType=VARCHAR}, #{stationCode,jdbcType=VARCHAR},
  118. #{wmIndex,jdbcType=INTEGER}, #{initVolFlag,jdbcType=CHAR}, #{initVol,jdbcType=INTEGER},
  119. #{dnType,jdbcType=INTEGER}, #{uintType,jdbcType=VARCHAR}, #{digitNum,jdbcType=INTEGER},
  120. #{whellNum,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{expDate,jdbcType=TIMESTAMP},
  121. #{useFlag,jdbcType=CHAR})
  122. </insert>
  123. <insert id="insertSelective" parameterType="com.mvc.entity.WmAcc">
  124. insert into wm_acc
  125. <trim prefix="(" suffix=")" suffixOverrides=",">
  126. <if test="id != null">
  127. ID,
  128. </if>
  129. <if test="wmId != null">
  130. WM_ID,
  131. </if>
  132. <if test="stationCode != null">
  133. STATION_CODE,
  134. </if>
  135. <if test="wmIndex != null">
  136. WM_INDEX,
  137. </if>
  138. <if test="initVolFlag != null">
  139. INIT_VOL_FLAG,
  140. </if>
  141. <if test="initVol != null">
  142. INIT_VOL,
  143. </if>
  144. <if test="dnType != null">
  145. DN_TYPE,
  146. </if>
  147. <if test="uintType != null">
  148. UINT_TYPE,
  149. </if>
  150. <if test="digitNum != null">
  151. DIGIT_NUM,
  152. </if>
  153. <if test="whellNum != null">
  154. WHELL_NUM,
  155. </if>
  156. <if test="createDate != null">
  157. CREATE_DATE,
  158. </if>
  159. <if test="expDate != null">
  160. EXP_DATE,
  161. </if>
  162. <if test="useFlag != null">
  163. USE_FLAG,
  164. </if>
  165. </trim>
  166. <trim prefix="values (" suffix=")" suffixOverrides=",">
  167. <if test="id != null">
  168. #{id,jdbcType=INTEGER},
  169. </if>
  170. <if test="wmId != null">
  171. #{wmId,jdbcType=VARCHAR},
  172. </if>
  173. <if test="stationCode != null">
  174. #{stationCode,jdbcType=VARCHAR},
  175. </if>
  176. <if test="wmIndex != null">
  177. #{wmIndex,jdbcType=INTEGER},
  178. </if>
  179. <if test="initVolFlag != null">
  180. #{initVolFlag,jdbcType=CHAR},
  181. </if>
  182. <if test="initVol != null">
  183. #{initVol,jdbcType=INTEGER},
  184. </if>
  185. <if test="dnType != null">
  186. #{dnType,jdbcType=INTEGER},
  187. </if>
  188. <if test="uintType != null">
  189. #{uintType,jdbcType=VARCHAR},
  190. </if>
  191. <if test="digitNum != null">
  192. #{digitNum,jdbcType=INTEGER},
  193. </if>
  194. <if test="whellNum != null">
  195. #{whellNum,jdbcType=INTEGER},
  196. </if>
  197. <if test="createDate != null">
  198. #{createDate,jdbcType=TIMESTAMP},
  199. </if>
  200. <if test="expDate != null">
  201. #{expDate,jdbcType=TIMESTAMP},
  202. </if>
  203. <if test="useFlag != null">
  204. #{useFlag,jdbcType=CHAR},
  205. </if>
  206. </trim>
  207. </insert>
  208. <select id="countByExample" parameterType="com.mvc.entity.WmAccExample" resultType="java.lang.Long">
  209. select count(*) from wm_acc
  210. <if test="_parameter != null">
  211. <include refid="Example_Where_Clause" />
  212. </if>
  213. </select>
  214. <update id="updateByExampleSelective" parameterType="map">
  215. update wm_acc
  216. <set>
  217. <if test="record.id != null">
  218. ID = #{record.id,jdbcType=INTEGER},
  219. </if>
  220. <if test="record.wmId != null">
  221. WM_ID = #{record.wmId,jdbcType=VARCHAR},
  222. </if>
  223. <if test="record.stationCode != null">
  224. STATION_CODE = #{record.stationCode,jdbcType=VARCHAR},
  225. </if>
  226. <if test="record.wmIndex != null">
  227. WM_INDEX = #{record.wmIndex,jdbcType=INTEGER},
  228. </if>
  229. <if test="record.initVolFlag != null">
  230. INIT_VOL_FLAG = #{record.initVolFlag,jdbcType=CHAR},
  231. </if>
  232. <if test="record.initVol != null">
  233. INIT_VOL = #{record.initVol,jdbcType=INTEGER},
  234. </if>
  235. <if test="record.dnType != null">
  236. DN_TYPE = #{record.dnType,jdbcType=INTEGER},
  237. </if>
  238. <if test="record.uintType != null">
  239. UINT_TYPE = #{record.uintType,jdbcType=VARCHAR},
  240. </if>
  241. <if test="record.digitNum != null">
  242. DIGIT_NUM = #{record.digitNum,jdbcType=INTEGER},
  243. </if>
  244. <if test="record.whellNum != null">
  245. WHELL_NUM = #{record.whellNum,jdbcType=INTEGER},
  246. </if>
  247. <if test="record.createDate != null">
  248. CREATE_DATE = #{record.createDate,jdbcType=TIMESTAMP},
  249. </if>
  250. <if test="record.expDate != null">
  251. EXP_DATE = #{record.expDate,jdbcType=TIMESTAMP},
  252. </if>
  253. <if test="record.useFlag != null">
  254. USE_FLAG = #{record.useFlag,jdbcType=CHAR},
  255. </if>
  256. </set>
  257. <if test="_parameter != null">
  258. <include refid="Update_By_Example_Where_Clause" />
  259. </if>
  260. </update>
  261. <update id="updateByExample" parameterType="map">
  262. update wm_acc
  263. set ID = #{record.id,jdbcType=INTEGER},
  264. WM_ID = #{record.wmId,jdbcType=VARCHAR},
  265. STATION_CODE = #{record.stationCode,jdbcType=VARCHAR},
  266. WM_INDEX = #{record.wmIndex,jdbcType=INTEGER},
  267. INIT_VOL_FLAG = #{record.initVolFlag,jdbcType=CHAR},
  268. INIT_VOL = #{record.initVol,jdbcType=INTEGER},
  269. DN_TYPE = #{record.dnType,jdbcType=INTEGER},
  270. UINT_TYPE = #{record.uintType,jdbcType=VARCHAR},
  271. DIGIT_NUM = #{record.digitNum,jdbcType=INTEGER},
  272. WHELL_NUM = #{record.whellNum,jdbcType=INTEGER},
  273. CREATE_DATE = #{record.createDate,jdbcType=TIMESTAMP},
  274. EXP_DATE = #{record.expDate,jdbcType=TIMESTAMP},
  275. USE_FLAG = #{record.useFlag,jdbcType=CHAR}
  276. <if test="_parameter != null">
  277. <include refid="Update_By_Example_Where_Clause" />
  278. </if>
  279. </update>
  280. <update id="updateByPrimaryKeySelective" parameterType="com.mvc.entity.WmAcc">
  281. update wm_acc
  282. <set>
  283. <if test="wmId != null">
  284. WM_ID = #{wmId,jdbcType=VARCHAR},
  285. </if>
  286. <if test="stationCode != null">
  287. STATION_CODE = #{stationCode,jdbcType=VARCHAR},
  288. </if>
  289. <if test="wmIndex != null">
  290. WM_INDEX = #{wmIndex,jdbcType=INTEGER},
  291. </if>
  292. <if test="initVolFlag != null">
  293. INIT_VOL_FLAG = #{initVolFlag,jdbcType=CHAR},
  294. </if>
  295. <if test="initVol != null">
  296. INIT_VOL = #{initVol,jdbcType=INTEGER},
  297. </if>
  298. <if test="dnType != null">
  299. DN_TYPE = #{dnType,jdbcType=INTEGER},
  300. </if>
  301. <if test="uintType != null">
  302. UINT_TYPE = #{uintType,jdbcType=VARCHAR},
  303. </if>
  304. <if test="digitNum != null">
  305. DIGIT_NUM = #{digitNum,jdbcType=INTEGER},
  306. </if>
  307. <if test="whellNum != null">
  308. WHELL_NUM = #{whellNum,jdbcType=INTEGER},
  309. </if>
  310. <if test="createDate != null">
  311. CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
  312. </if>
  313. <if test="expDate != null">
  314. EXP_DATE = #{expDate,jdbcType=TIMESTAMP},
  315. </if>
  316. <if test="useFlag != null">
  317. USE_FLAG = #{useFlag,jdbcType=CHAR},
  318. </if>
  319. </set>
  320. where ID = #{id,jdbcType=INTEGER}
  321. </update>
  322. <update id="updateByPrimaryKey" parameterType="com.mvc.entity.WmAcc">
  323. update wm_acc
  324. set WM_ID = #{wmId,jdbcType=VARCHAR},
  325. STATION_CODE = #{stationCode,jdbcType=VARCHAR},
  326. WM_INDEX = #{wmIndex,jdbcType=INTEGER},
  327. INIT_VOL_FLAG = #{initVolFlag,jdbcType=CHAR},
  328. INIT_VOL = #{initVol,jdbcType=INTEGER},
  329. DN_TYPE = #{dnType,jdbcType=INTEGER},
  330. UINT_TYPE = #{uintType,jdbcType=VARCHAR},
  331. DIGIT_NUM = #{digitNum,jdbcType=INTEGER},
  332. WHELL_NUM = #{whellNum,jdbcType=INTEGER},
  333. CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
  334. EXP_DATE = #{expDate,jdbcType=TIMESTAMP},
  335. USE_FLAG = #{useFlag,jdbcType=CHAR}
  336. where ID = #{id,jdbcType=INTEGER}
  337. </update>
  338. </mapper>