RecordMedicineApproveNewMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  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="cn.ourwill.module.house.entity.new_entity.RecordMedicineApproveNewMapper" >
  4. <resultMap id="BaseResultMap" type="cn.ourwill.module.house.entity.new_entity.RecordMedicineApproveNew" >
  5. <id column="id" property="id" jdbcType="INTEGER" />
  6. <result column="grain_id" property="grainId" jdbcType="INTEGER" />
  7. <result column="apply_date" property="applyDate" jdbcType="VARCHAR" />
  8. <result column="apply_code" property="applyCode" jdbcType="VARCHAR" />
  9. <result column="name" property="name" jdbcType="VARCHAR" />
  10. <result column="pro_business" property="proBusiness" jdbcType="VARCHAR" />
  11. <result column="number" property="number" jdbcType="VARCHAR" />
  12. <result column="price" property="price" jdbcType="VARCHAR" />
  13. <result column="remark" property="remark" jdbcType="VARCHAR" />
  14. <result column="chief_idea" property="chiefIdea" jdbcType="VARCHAR" />
  15. <result column="chief_state" property="chiefState" jdbcType="VARCHAR" />
  16. <result column="head_idea" property="headIdea" jdbcType="VARCHAR" />
  17. <result column="head_state" property="headState" jdbcType="VARCHAR" />
  18. <result column="header_idea" property="headerIdea" jdbcType="VARCHAR" />
  19. <result column="header_state" property="headerState" jdbcType="VARCHAR" />
  20. <result column="c_id" property="cId" jdbcType="INTEGER" />
  21. <result column="uuid" property="uuid" jdbcType="VARCHAR" />
  22. <result column="c_time" property="cTime" jdbcType="TIMESTAMP" />
  23. <result column="u_id" property="uId" jdbcType="INTEGER" />
  24. <result column="u_time" property="uTime" jdbcType="TIMESTAMP" />
  25. <result column="state" property="state" jdbcType="VARCHAR" />
  26. </resultMap>
  27. <sql id="Example_Where_Clause" >
  28. <where >
  29. <foreach collection="oredCriteria" item="criteria" separator="or" >
  30. <if test="criteria.valid" >
  31. <trim prefix="(" suffix=")" prefixOverrides="and" >
  32. <foreach collection="criteria.criteria" item="criterion" >
  33. <choose >
  34. <when test="criterion.noValue" >
  35. and ${criterion.condition}
  36. </when>
  37. <when test="criterion.singleValue" >
  38. and ${criterion.condition} #{criterion.value}
  39. </when>
  40. <when test="criterion.betweenValue" >
  41. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  42. </when>
  43. <when test="criterion.listValue" >
  44. and ${criterion.condition}
  45. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  46. #{listItem}
  47. </foreach>
  48. </when>
  49. </choose>
  50. </foreach>
  51. </trim>
  52. </if>
  53. </foreach>
  54. </where>
  55. </sql>
  56. <sql id="Update_By_Example_Where_Clause" >
  57. <where >
  58. <foreach collection="example.oredCriteria" item="criteria" separator="or" >
  59. <if test="criteria.valid" >
  60. <trim prefix="(" suffix=")" prefixOverrides="and" >
  61. <foreach collection="criteria.criteria" item="criterion" >
  62. <choose >
  63. <when test="criterion.noValue" >
  64. and ${criterion.condition}
  65. </when>
  66. <when test="criterion.singleValue" >
  67. and ${criterion.condition} #{criterion.value}
  68. </when>
  69. <when test="criterion.betweenValue" >
  70. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  71. </when>
  72. <when test="criterion.listValue" >
  73. and ${criterion.condition}
  74. <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
  75. #{listItem}
  76. </foreach>
  77. </when>
  78. </choose>
  79. </foreach>
  80. </trim>
  81. </if>
  82. </foreach>
  83. </where>
  84. </sql>
  85. <sql id="Base_Column_List" >
  86. id, grain_id, apply_date, apply_code, name, pro_business, number, price, remark,
  87. chief_idea, chief_state, head_idea, head_state, header_idea, header_state, c_id,
  88. c_time, u_id, u_time, state
  89. </sql>
  90. <select id="selectByExample" resultMap="BaseResultMap" parameterType="cn.ourwill.module.house.entity.new_entity.RecordMedicineApproveNewExample" >
  91. select
  92. <if test="distinct" >
  93. distinct
  94. </if>
  95. <include refid="Base_Column_List" />
  96. from record_medicine_approve_new
  97. <if test="_parameter != null" >
  98. <include refid="Example_Where_Clause" />
  99. </if>
  100. <if test="orderByClause != null" >
  101. order by ${orderByClause}
  102. </if>
  103. </select>
  104. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  105. select
  106. <include refid="Base_Column_List" />
  107. from record_medicine_approve_new
  108. where id = #{id,jdbcType=INTEGER}
  109. </select>
  110. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  111. delete from record_medicine_approve_new
  112. where id = #{id,jdbcType=INTEGER}
  113. </delete>
  114. <delete id="deleteByExample" parameterType="cn.ourwill.module.house.entity.new_entity.RecordMedicineApproveNewExample" >
  115. delete from record_medicine_approve_new
  116. <if test="_parameter != null" >
  117. <include refid="Example_Where_Clause" />
  118. </if>
  119. </delete>
  120. <insert id="insert" parameterType="cn.ourwill.module.house.entity.new_entity.RecordMedicineApproveNew" >
  121. insert into record_medicine_approve_new (id, grain_id, apply_date,
  122. apply_code, name, pro_business,
  123. number, price, remark,
  124. chief_idea, chief_state, head_idea,
  125. head_state, header_idea, header_state,
  126. c_id, c_time, u_id,
  127. u_time, state)
  128. values (#{id,jdbcType=INTEGER}, #{grainId,jdbcType=INTEGER}, #{applyDate,jdbcType=VARCHAR},
  129. #{applyCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{proBusiness,jdbcType=VARCHAR},
  130. #{number,jdbcType=VARCHAR}, #{price,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
  131. #{chiefIdea,jdbcType=VARCHAR}, #{chiefState,jdbcType=VARCHAR}, #{headIdea,jdbcType=VARCHAR},
  132. #{headState,jdbcType=VARCHAR}, #{headerIdea,jdbcType=VARCHAR}, #{headerState,jdbcType=VARCHAR},
  133. #{cId,jdbcType=INTEGER}, #{cTime,jdbcType=TIMESTAMP}, #{uId,jdbcType=INTEGER},
  134. #{uTime,jdbcType=TIMESTAMP}, #{state,jdbcType=VARCHAR})
  135. </insert>
  136. <insert id="insertSelective" parameterType="cn.ourwill.module.house.entity.new_entity.RecordMedicineApproveNew" >
  137. insert into record_medicine_approve_new
  138. <trim prefix="(" suffix=")" suffixOverrides="," >
  139. <if test="id != null" >
  140. id,
  141. </if>
  142. <if test="grainId != null" >
  143. grain_id,
  144. </if>
  145. <if test="applyDate != null" >
  146. apply_date,
  147. </if>
  148. <if test="applyCode != null" >
  149. apply_code,
  150. </if>
  151. <if test="name != null" >
  152. name,
  153. </if>
  154. <if test="proBusiness != null" >
  155. pro_business,
  156. </if>
  157. <if test="number != null" >
  158. number,
  159. </if>
  160. <if test="price != null" >
  161. price,
  162. </if>
  163. <if test="remark != null" >
  164. remark,
  165. </if>
  166. <if test="chiefIdea != null" >
  167. chief_idea,
  168. </if>
  169. <if test="chiefState != null" >
  170. chief_state,
  171. </if>
  172. <if test="headIdea != null" >
  173. head_idea,
  174. </if>
  175. <if test="headState != null" >
  176. head_state,
  177. </if>
  178. <if test="headerIdea != null" >
  179. header_idea,
  180. </if>
  181. <if test="headerState != null" >
  182. header_state,
  183. </if>
  184. <if test="cId != null" >
  185. c_id,
  186. </if>
  187. <if test="cTime != null" >
  188. c_time,
  189. </if>
  190. <if test="uId != null" >
  191. u_id,
  192. </if>
  193. <if test="uTime != null" >
  194. u_time,
  195. </if>
  196. <if test="state != null" >
  197. state,
  198. </if>
  199. </trim>
  200. <trim prefix="values (" suffix=")" suffixOverrides="," >
  201. <if test="id != null" >
  202. #{id,jdbcType=INTEGER},
  203. </if>
  204. <if test="grainId != null" >
  205. #{grainId,jdbcType=INTEGER},
  206. </if>
  207. <if test="applyDate != null" >
  208. #{applyDate,jdbcType=VARCHAR},
  209. </if>
  210. <if test="applyCode != null" >
  211. #{applyCode,jdbcType=VARCHAR},
  212. </if>
  213. <if test="name != null" >
  214. #{name,jdbcType=VARCHAR},
  215. </if>
  216. <if test="proBusiness != null" >
  217. #{proBusiness,jdbcType=VARCHAR},
  218. </if>
  219. <if test="number != null" >
  220. #{number,jdbcType=VARCHAR},
  221. </if>
  222. <if test="price != null" >
  223. #{price,jdbcType=VARCHAR},
  224. </if>
  225. <if test="remark != null" >
  226. #{remark,jdbcType=VARCHAR},
  227. </if>
  228. <if test="chiefIdea != null" >
  229. #{chiefIdea,jdbcType=VARCHAR},
  230. </if>
  231. <if test="chiefState != null" >
  232. #{chiefState,jdbcType=VARCHAR},
  233. </if>
  234. <if test="headIdea != null" >
  235. #{headIdea,jdbcType=VARCHAR},
  236. </if>
  237. <if test="headState != null" >
  238. #{headState,jdbcType=VARCHAR},
  239. </if>
  240. <if test="headerIdea != null" >
  241. #{headerIdea,jdbcType=VARCHAR},
  242. </if>
  243. <if test="headerState != null" >
  244. #{headerState,jdbcType=VARCHAR},
  245. </if>
  246. <if test="cId != null" >
  247. #{cId,jdbcType=INTEGER},
  248. </if>
  249. <if test="cTime != null" >
  250. #{cTime,jdbcType=TIMESTAMP},
  251. </if>
  252. <if test="uId != null" >
  253. #{uId,jdbcType=INTEGER},
  254. </if>
  255. <if test="uTime != null" >
  256. #{uTime,jdbcType=TIMESTAMP},
  257. </if>
  258. <if test="state != null" >
  259. #{state,jdbcType=VARCHAR},
  260. </if>
  261. </trim>
  262. </insert>
  263. <select id="countByExample" parameterType="cn.ourwill.module.house.entity.new_entity.RecordMedicineApproveNewExample" resultType="java.lang.Integer" >
  264. select count(*) from record_medicine_approve_new
  265. <if test="_parameter != null" >
  266. <include refid="Example_Where_Clause" />
  267. </if>
  268. </select>
  269. <update id="updateByExampleSelective" parameterType="map" >
  270. update record_medicine_approve_new
  271. <set >
  272. <if test="record.id != null" >
  273. id = #{record.id,jdbcType=INTEGER},
  274. </if>
  275. <if test="record.grainId != null" >
  276. grain_id = #{record.grainId,jdbcType=INTEGER},
  277. </if>
  278. <if test="record.applyDate != null" >
  279. apply_date = #{record.applyDate,jdbcType=VARCHAR},
  280. </if>
  281. <if test="record.applyCode != null" >
  282. apply_code = #{record.applyCode,jdbcType=VARCHAR},
  283. </if>
  284. <if test="record.name != null" >
  285. name = #{record.name,jdbcType=VARCHAR},
  286. </if>
  287. <if test="record.proBusiness != null" >
  288. pro_business = #{record.proBusiness,jdbcType=VARCHAR},
  289. </if>
  290. <if test="record.number != null" >
  291. number = #{record.number,jdbcType=VARCHAR},
  292. </if>
  293. <if test="record.price != null" >
  294. price = #{record.price,jdbcType=VARCHAR},
  295. </if>
  296. <if test="record.remark != null" >
  297. remark = #{record.remark,jdbcType=VARCHAR},
  298. </if>
  299. <if test="record.chiefIdea != null" >
  300. chief_idea = #{record.chiefIdea,jdbcType=VARCHAR},
  301. </if>
  302. <if test="record.chiefState != null" >
  303. chief_state = #{record.chiefState,jdbcType=VARCHAR},
  304. </if>
  305. <if test="record.headIdea != null" >
  306. head_idea = #{record.headIdea,jdbcType=VARCHAR},
  307. </if>
  308. <if test="record.headState != null" >
  309. head_state = #{record.headState,jdbcType=VARCHAR},
  310. </if>
  311. <if test="record.headerIdea != null" >
  312. header_idea = #{record.headerIdea,jdbcType=VARCHAR},
  313. </if>
  314. <if test="record.headerState != null" >
  315. header_state = #{record.headerState,jdbcType=VARCHAR},
  316. </if>
  317. <if test="record.cId != null" >
  318. c_id = #{record.cId,jdbcType=INTEGER},
  319. </if>
  320. <if test="record.cTime != null" >
  321. c_time = #{record.cTime,jdbcType=TIMESTAMP},
  322. </if>
  323. <if test="record.uId != null" >
  324. u_id = #{record.uId,jdbcType=INTEGER},
  325. </if>
  326. <if test="record.uTime != null" >
  327. u_time = #{record.uTime,jdbcType=TIMESTAMP},
  328. </if>
  329. <if test="record.state != null" >
  330. state = #{record.state,jdbcType=VARCHAR},
  331. </if>
  332. </set>
  333. <if test="_parameter != null" >
  334. <include refid="Update_By_Example_Where_Clause" />
  335. </if>
  336. </update>
  337. <update id="updateByExample" parameterType="map" >
  338. update record_medicine_approve_new
  339. set id = #{record.id,jdbcType=INTEGER},
  340. grain_id = #{record.grainId,jdbcType=INTEGER},
  341. apply_date = #{record.applyDate,jdbcType=VARCHAR},
  342. apply_code = #{record.applyCode,jdbcType=VARCHAR},
  343. name = #{record.name,jdbcType=VARCHAR},
  344. pro_business = #{record.proBusiness,jdbcType=VARCHAR},
  345. number = #{record.number,jdbcType=VARCHAR},
  346. price = #{record.price,jdbcType=VARCHAR},
  347. remark = #{record.remark,jdbcType=VARCHAR},
  348. chief_idea = #{record.chiefIdea,jdbcType=VARCHAR},
  349. chief_state = #{record.chiefState,jdbcType=VARCHAR},
  350. head_idea = #{record.headIdea,jdbcType=VARCHAR},
  351. head_state = #{record.headState,jdbcType=VARCHAR},
  352. header_idea = #{record.headerIdea,jdbcType=VARCHAR},
  353. header_state = #{record.headerState,jdbcType=VARCHAR},
  354. c_id = #{record.cId,jdbcType=INTEGER},
  355. c_time = #{record.cTime,jdbcType=TIMESTAMP},
  356. u_id = #{record.uId,jdbcType=INTEGER},
  357. u_time = #{record.uTime,jdbcType=TIMESTAMP},
  358. state = #{record.state,jdbcType=VARCHAR}
  359. <if test="_parameter != null" >
  360. <include refid="Update_By_Example_Where_Clause" />
  361. </if>
  362. </update>
  363. <update id="updateByPrimaryKeySelective" parameterType="cn.ourwill.module.house.entity.new_entity.RecordMedicineApproveNew" >
  364. update record_medicine_approve_new
  365. <set >
  366. <if test="grainId != null" >
  367. grain_id = #{grainId,jdbcType=INTEGER},
  368. </if>
  369. <if test="applyDate != null" >
  370. apply_date = #{applyDate,jdbcType=VARCHAR},
  371. </if>
  372. <if test="applyCode != null" >
  373. apply_code = #{applyCode,jdbcType=VARCHAR},
  374. </if>
  375. <if test="name != null" >
  376. name = #{name,jdbcType=VARCHAR},
  377. </if>
  378. <if test="proBusiness != null" >
  379. pro_business = #{proBusiness,jdbcType=VARCHAR},
  380. </if>
  381. <if test="number != null" >
  382. number = #{number,jdbcType=VARCHAR},
  383. </if>
  384. <if test="price != null" >
  385. price = #{price,jdbcType=VARCHAR},
  386. </if>
  387. <if test="remark != null" >
  388. remark = #{remark,jdbcType=VARCHAR},
  389. </if>
  390. <if test="chiefIdea != null" >
  391. chief_idea = #{chiefIdea,jdbcType=VARCHAR},
  392. </if>
  393. <if test="chiefState != null" >
  394. chief_state = #{chiefState,jdbcType=VARCHAR},
  395. </if>
  396. <if test="headIdea != null" >
  397. head_idea = #{headIdea,jdbcType=VARCHAR},
  398. </if>
  399. <if test="headState != null" >
  400. head_state = #{headState,jdbcType=VARCHAR},
  401. </if>
  402. <if test="headerIdea != null" >
  403. header_idea = #{headerIdea,jdbcType=VARCHAR},
  404. </if>
  405. <if test="headerState != null" >
  406. header_state = #{headerState,jdbcType=VARCHAR},
  407. </if>
  408. <if test="cId != null" >
  409. c_id = #{cId,jdbcType=INTEGER},
  410. </if>
  411. <if test="cTime != null" >
  412. c_time = #{cTime,jdbcType=TIMESTAMP},
  413. </if>
  414. <if test="uId != null" >
  415. u_id = #{uId,jdbcType=INTEGER},
  416. </if>
  417. <if test="uTime != null" >
  418. u_time = #{uTime,jdbcType=TIMESTAMP},
  419. </if>
  420. <if test="state != null" >
  421. state = #{state,jdbcType=VARCHAR},
  422. </if>
  423. </set>
  424. where id = #{id,jdbcType=INTEGER}
  425. </update>
  426. <update id="updateByPrimaryKey" parameterType="cn.ourwill.module.house.entity.new_entity.RecordMedicineApproveNew" >
  427. update record_medicine_approve_new
  428. set grain_id = #{grainId,jdbcType=INTEGER},
  429. apply_date = #{applyDate,jdbcType=VARCHAR},
  430. apply_code = #{applyCode,jdbcType=VARCHAR},
  431. name = #{name,jdbcType=VARCHAR},
  432. pro_business = #{proBusiness,jdbcType=VARCHAR},
  433. number = #{number,jdbcType=VARCHAR},
  434. price = #{price,jdbcType=VARCHAR},
  435. remark = #{remark,jdbcType=VARCHAR},
  436. chief_idea = #{chiefIdea,jdbcType=VARCHAR},
  437. chief_state = #{chiefState,jdbcType=VARCHAR},
  438. head_idea = #{headIdea,jdbcType=VARCHAR},
  439. head_state = #{headState,jdbcType=VARCHAR},
  440. header_idea = #{headerIdea,jdbcType=VARCHAR},
  441. header_state = #{headerState,jdbcType=VARCHAR},
  442. c_id = #{cId,jdbcType=INTEGER},
  443. c_time = #{cTime,jdbcType=TIMESTAMP},
  444. u_id = #{uId,jdbcType=INTEGER},
  445. u_time = #{uTime,jdbcType=TIMESTAMP},
  446. state = #{state,jdbcType=VARCHAR}
  447. where id = #{id,jdbcType=INTEGER}
  448. </update>
  449. </mapper>