TStkinMapper.xml 14 KB

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