ContractTaskMapper.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  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.goafanti.common.dao.ContractTaskMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.ContractTask">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  9. -->
  10. <id column="id" jdbcType="VARCHAR" property="id" />
  11. <result column="contract_id" jdbcType="VARCHAR" property="contractId" />
  12. <result column="commodity_id" jdbcType="VARCHAR" property="commodityId" />
  13. <result column="commodity_name" jdbcType="VARCHAR" property="commodityName" />
  14. <result column="commodity_quantity" jdbcType="INTEGER" property="commodityQuantity" />
  15. <result column="commodity_type" jdbcType="INTEGER" property="commodityType" />
  16. <result column="commodity_mode" jdbcType="VARCHAR" property="commodityMode" />
  17. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  18. <result column="task_comment" jdbcType="VARCHAR" property="taskComment" />
  19. <result column="task_status" jdbcType="INTEGER" property="taskStatus" />
  20. <result column="task_distribution_time" jdbcType="TIMESTAMP" property="taskDistributionTime" />
  21. <result column="task_allocator" jdbcType="VARCHAR" property="taskAllocator" />
  22. <result column="task_receiver" jdbcType="VARCHAR" property="taskReceiver" />
  23. <result column="deleted_sign" jdbcType="INTEGER" property="deletedSign" />
  24. <result column="serial_number" jdbcType="INTEGER" property="serialNumber" />
  25. </resultMap>
  26. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.ContractTask">
  27. <!--
  28. WARNING - @mbg.generated
  29. This element is automatically generated by MyBatis Generator, do not modify.
  30. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  31. -->
  32. <result column="attachment_url" jdbcType="LONGVARCHAR" property="attachmentUrl" />
  33. </resultMap>
  34. <sql id="Example_Where_Clause">
  35. <!--
  36. WARNING - @mbg.generated
  37. This element is automatically generated by MyBatis Generator, do not modify.
  38. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  39. -->
  40. <where>
  41. <foreach collection="oredCriteria" item="criteria" separator="or">
  42. <if test="criteria.valid">
  43. <trim prefix="(" prefixOverrides="and" suffix=")">
  44. <foreach collection="criteria.criteria" item="criterion">
  45. <choose>
  46. <when test="criterion.noValue">
  47. and ${criterion.condition}
  48. </when>
  49. <when test="criterion.singleValue">
  50. and ${criterion.condition} #{criterion.value}
  51. </when>
  52. <when test="criterion.betweenValue">
  53. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  54. </when>
  55. <when test="criterion.listValue">
  56. and ${criterion.condition}
  57. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  58. #{listItem}
  59. </foreach>
  60. </when>
  61. </choose>
  62. </foreach>
  63. </trim>
  64. </if>
  65. </foreach>
  66. </where>
  67. </sql>
  68. <sql id="Update_By_Example_Where_Clause">
  69. <!--
  70. WARNING - @mbg.generated
  71. This element is automatically generated by MyBatis Generator, do not modify.
  72. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  73. -->
  74. <where>
  75. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  76. <if test="criteria.valid">
  77. <trim prefix="(" prefixOverrides="and" suffix=")">
  78. <foreach collection="criteria.criteria" item="criterion">
  79. <choose>
  80. <when test="criterion.noValue">
  81. and ${criterion.condition}
  82. </when>
  83. <when test="criterion.singleValue">
  84. and ${criterion.condition} #{criterion.value}
  85. </when>
  86. <when test="criterion.betweenValue">
  87. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  88. </when>
  89. <when test="criterion.listValue">
  90. and ${criterion.condition}
  91. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  92. #{listItem}
  93. </foreach>
  94. </when>
  95. </choose>
  96. </foreach>
  97. </trim>
  98. </if>
  99. </foreach>
  100. </where>
  101. </sql>
  102. <sql id="Base_Column_List">
  103. <!--
  104. WARNING - @mbg.generated
  105. This element is automatically generated by MyBatis Generator, do not modify.
  106. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  107. -->
  108. id, contract_id, commodity_id, commodity_name, commodity_quantity, commodity_type,
  109. commodity_mode, create_time, task_comment, task_status, task_distribution_time, task_allocator,
  110. task_receiver, deleted_sign, serial_number
  111. </sql>
  112. <sql id="Blob_Column_List">
  113. <!--
  114. WARNING - @mbg.generated
  115. This element is automatically generated by MyBatis Generator, do not modify.
  116. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  117. -->
  118. attachment_url
  119. </sql>
  120. <select id="selectByExampleWithBLOBs" parameterType="com.goafanti.common.model.ContractTaskExample" resultMap="ResultMapWithBLOBs">
  121. <!--
  122. WARNING - @mbg.generated
  123. This element is automatically generated by MyBatis Generator, do not modify.
  124. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  125. -->
  126. select
  127. <if test="distinct">
  128. distinct
  129. </if>
  130. <include refid="Base_Column_List" />
  131. ,
  132. <include refid="Blob_Column_List" />
  133. from contract_task
  134. <if test="_parameter != null">
  135. <include refid="Example_Where_Clause" />
  136. </if>
  137. <if test="orderByClause != null">
  138. order by ${orderByClause}
  139. </if>
  140. </select>
  141. <select id="selectByExample" parameterType="com.goafanti.common.model.ContractTaskExample" resultMap="BaseResultMap">
  142. <!--
  143. WARNING - @mbg.generated
  144. This element is automatically generated by MyBatis Generator, do not modify.
  145. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  146. -->
  147. select
  148. <if test="distinct">
  149. distinct
  150. </if>
  151. <include refid="Base_Column_List" />
  152. from contract_task
  153. <if test="_parameter != null">
  154. <include refid="Example_Where_Clause" />
  155. </if>
  156. <if test="orderByClause != null">
  157. order by ${orderByClause}
  158. </if>
  159. </select>
  160. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
  161. <!--
  162. WARNING - @mbg.generated
  163. This element is automatically generated by MyBatis Generator, do not modify.
  164. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  165. -->
  166. select
  167. <include refid="Base_Column_List" />
  168. ,
  169. <include refid="Blob_Column_List" />
  170. from contract_task
  171. where id = #{id,jdbcType=VARCHAR}
  172. </select>
  173. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  174. <!--
  175. WARNING - @mbg.generated
  176. This element is automatically generated by MyBatis Generator, do not modify.
  177. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  178. -->
  179. delete from contract_task
  180. where id = #{id,jdbcType=VARCHAR}
  181. </delete>
  182. <delete id="deleteByExample" parameterType="com.goafanti.common.model.ContractTaskExample">
  183. <!--
  184. WARNING - @mbg.generated
  185. This element is automatically generated by MyBatis Generator, do not modify.
  186. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  187. -->
  188. delete from contract_task
  189. <if test="_parameter != null">
  190. <include refid="Example_Where_Clause" />
  191. </if>
  192. </delete>
  193. <insert id="insert" parameterType="com.goafanti.common.model.ContractTask">
  194. <!--
  195. WARNING - @mbg.generated
  196. This element is automatically generated by MyBatis Generator, do not modify.
  197. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  198. -->
  199. insert into contract_task (id, contract_id, commodity_id,
  200. commodity_name, commodity_quantity, commodity_type,
  201. commodity_mode, create_time, task_comment,
  202. task_status, task_distribution_time, task_allocator,
  203. task_receiver, deleted_sign, serial_number,
  204. attachment_url)
  205. values (#{id,jdbcType=VARCHAR}, #{contractId,jdbcType=VARCHAR}, #{commodityId,jdbcType=VARCHAR},
  206. #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER}, #{commodityType,jdbcType=INTEGER},
  207. #{commodityMode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{taskComment,jdbcType=VARCHAR},
  208. #{taskStatus,jdbcType=INTEGER}, #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR},
  209. #{taskReceiver,jdbcType=VARCHAR}, #{deletedSign,jdbcType=INTEGER}, #{serialNumber,jdbcType=INTEGER},
  210. #{attachmentUrl,jdbcType=LONGVARCHAR})
  211. </insert>
  212. <insert id="insertSelective" parameterType="com.goafanti.common.model.ContractTask">
  213. <!--
  214. WARNING - @mbg.generated
  215. This element is automatically generated by MyBatis Generator, do not modify.
  216. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  217. -->
  218. insert into contract_task
  219. <trim prefix="(" suffix=")" suffixOverrides=",">
  220. <if test="id != null">
  221. id,
  222. </if>
  223. <if test="contractId != null">
  224. contract_id,
  225. </if>
  226. <if test="commodityId != null">
  227. commodity_id,
  228. </if>
  229. <if test="commodityName != null">
  230. commodity_name,
  231. </if>
  232. <if test="commodityQuantity != null">
  233. commodity_quantity,
  234. </if>
  235. <if test="commodityType != null">
  236. commodity_type,
  237. </if>
  238. <if test="commodityMode != null">
  239. commodity_mode,
  240. </if>
  241. <if test="createTime != null">
  242. create_time,
  243. </if>
  244. <if test="taskComment != null">
  245. task_comment,
  246. </if>
  247. <if test="taskStatus != null">
  248. task_status,
  249. </if>
  250. <if test="taskDistributionTime != null">
  251. task_distribution_time,
  252. </if>
  253. <if test="taskAllocator != null">
  254. task_allocator,
  255. </if>
  256. <if test="taskReceiver != null">
  257. task_receiver,
  258. </if>
  259. <if test="deletedSign != null">
  260. deleted_sign,
  261. </if>
  262. <if test="serialNumber != null">
  263. serial_number,
  264. </if>
  265. <if test="attachmentUrl != null">
  266. attachment_url,
  267. </if>
  268. </trim>
  269. <trim prefix="values (" suffix=")" suffixOverrides=",">
  270. <if test="id != null">
  271. #{id,jdbcType=VARCHAR},
  272. </if>
  273. <if test="contractId != null">
  274. #{contractId,jdbcType=VARCHAR},
  275. </if>
  276. <if test="commodityId != null">
  277. #{commodityId,jdbcType=VARCHAR},
  278. </if>
  279. <if test="commodityName != null">
  280. #{commodityName,jdbcType=VARCHAR},
  281. </if>
  282. <if test="commodityQuantity != null">
  283. #{commodityQuantity,jdbcType=INTEGER},
  284. </if>
  285. <if test="commodityType != null">
  286. #{commodityType,jdbcType=INTEGER},
  287. </if>
  288. <if test="commodityMode != null">
  289. #{commodityMode,jdbcType=VARCHAR},
  290. </if>
  291. <if test="createTime != null">
  292. #{createTime,jdbcType=TIMESTAMP},
  293. </if>
  294. <if test="taskComment != null">
  295. #{taskComment,jdbcType=VARCHAR},
  296. </if>
  297. <if test="taskStatus != null">
  298. #{taskStatus,jdbcType=INTEGER},
  299. </if>
  300. <if test="taskDistributionTime != null">
  301. #{taskDistributionTime,jdbcType=TIMESTAMP},
  302. </if>
  303. <if test="taskAllocator != null">
  304. #{taskAllocator,jdbcType=VARCHAR},
  305. </if>
  306. <if test="taskReceiver != null">
  307. #{taskReceiver,jdbcType=VARCHAR},
  308. </if>
  309. <if test="deletedSign != null">
  310. #{deletedSign,jdbcType=INTEGER},
  311. </if>
  312. <if test="serialNumber != null">
  313. #{serialNumber,jdbcType=INTEGER},
  314. </if>
  315. <if test="attachmentUrl != null">
  316. #{attachmentUrl,jdbcType=LONGVARCHAR},
  317. </if>
  318. </trim>
  319. </insert>
  320. <select id="countByExample" parameterType="com.goafanti.common.model.ContractTaskExample" resultType="java.lang.Long">
  321. <!--
  322. WARNING - @mbg.generated
  323. This element is automatically generated by MyBatis Generator, do not modify.
  324. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  325. -->
  326. select count(*) from contract_task
  327. <if test="_parameter != null">
  328. <include refid="Example_Where_Clause" />
  329. </if>
  330. </select>
  331. <update id="updateByExampleSelective" parameterType="map">
  332. <!--
  333. WARNING - @mbg.generated
  334. This element is automatically generated by MyBatis Generator, do not modify.
  335. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  336. -->
  337. update contract_task
  338. <set>
  339. <if test="record.id != null">
  340. id = #{record.id,jdbcType=VARCHAR},
  341. </if>
  342. <if test="record.contractId != null">
  343. contract_id = #{record.contractId,jdbcType=VARCHAR},
  344. </if>
  345. <if test="record.commodityId != null">
  346. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  347. </if>
  348. <if test="record.commodityName != null">
  349. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  350. </if>
  351. <if test="record.commodityQuantity != null">
  352. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  353. </if>
  354. <if test="record.commodityType != null">
  355. commodity_type = #{record.commodityType,jdbcType=INTEGER},
  356. </if>
  357. <if test="record.commodityMode != null">
  358. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  359. </if>
  360. <if test="record.createTime != null">
  361. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  362. </if>
  363. <if test="record.taskComment != null">
  364. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  365. </if>
  366. <if test="record.taskStatus != null">
  367. task_status = #{record.taskStatus,jdbcType=INTEGER},
  368. </if>
  369. <if test="record.taskDistributionTime != null">
  370. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  371. </if>
  372. <if test="record.taskAllocator != null">
  373. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  374. </if>
  375. <if test="record.taskReceiver != null">
  376. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  377. </if>
  378. <if test="record.deletedSign != null">
  379. deleted_sign = #{record.deletedSign,jdbcType=INTEGER},
  380. </if>
  381. <if test="record.serialNumber != null">
  382. serial_number = #{record.serialNumber,jdbcType=INTEGER},
  383. </if>
  384. <if test="record.attachmentUrl != null">
  385. attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR},
  386. </if>
  387. </set>
  388. <if test="_parameter != null">
  389. <include refid="Update_By_Example_Where_Clause" />
  390. </if>
  391. </update>
  392. <update id="updateByExampleWithBLOBs" parameterType="map">
  393. <!--
  394. WARNING - @mbg.generated
  395. This element is automatically generated by MyBatis Generator, do not modify.
  396. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  397. -->
  398. update contract_task
  399. set id = #{record.id,jdbcType=VARCHAR},
  400. contract_id = #{record.contractId,jdbcType=VARCHAR},
  401. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  402. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  403. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  404. commodity_type = #{record.commodityType,jdbcType=INTEGER},
  405. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  406. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  407. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  408. task_status = #{record.taskStatus,jdbcType=INTEGER},
  409. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  410. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  411. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  412. deleted_sign = #{record.deletedSign,jdbcType=INTEGER},
  413. serial_number = #{record.serialNumber,jdbcType=INTEGER},
  414. attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR}
  415. <if test="_parameter != null">
  416. <include refid="Update_By_Example_Where_Clause" />
  417. </if>
  418. </update>
  419. <update id="updateByExample" parameterType="map">
  420. <!--
  421. WARNING - @mbg.generated
  422. This element is automatically generated by MyBatis Generator, do not modify.
  423. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  424. -->
  425. update contract_task
  426. set id = #{record.id,jdbcType=VARCHAR},
  427. contract_id = #{record.contractId,jdbcType=VARCHAR},
  428. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  429. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  430. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  431. commodity_type = #{record.commodityType,jdbcType=INTEGER},
  432. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  433. create_time = #{record.createTime,jdbcType=TIMESTAMP},
  434. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  435. task_status = #{record.taskStatus,jdbcType=INTEGER},
  436. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  437. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  438. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  439. deleted_sign = #{record.deletedSign,jdbcType=INTEGER},
  440. serial_number = #{record.serialNumber,jdbcType=INTEGER}
  441. <if test="_parameter != null">
  442. <include refid="Update_By_Example_Where_Clause" />
  443. </if>
  444. </update>
  445. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.ContractTask">
  446. <!--
  447. WARNING - @mbg.generated
  448. This element is automatically generated by MyBatis Generator, do not modify.
  449. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  450. -->
  451. update contract_task
  452. <set>
  453. <if test="contractId != null">
  454. contract_id = #{contractId,jdbcType=VARCHAR},
  455. </if>
  456. <if test="commodityId != null">
  457. commodity_id = #{commodityId,jdbcType=VARCHAR},
  458. </if>
  459. <if test="commodityName != null">
  460. commodity_name = #{commodityName,jdbcType=VARCHAR},
  461. </if>
  462. <if test="commodityQuantity != null">
  463. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  464. </if>
  465. <if test="commodityType != null">
  466. commodity_type = #{commodityType,jdbcType=INTEGER},
  467. </if>
  468. <if test="commodityMode != null">
  469. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  470. </if>
  471. <if test="createTime != null">
  472. create_time = #{createTime,jdbcType=TIMESTAMP},
  473. </if>
  474. <if test="taskComment != null">
  475. task_comment = #{taskComment,jdbcType=VARCHAR},
  476. </if>
  477. <if test="taskStatus != null">
  478. task_status = #{taskStatus,jdbcType=INTEGER},
  479. </if>
  480. <if test="taskDistributionTime != null">
  481. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  482. </if>
  483. <if test="taskAllocator != null">
  484. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  485. </if>
  486. <if test="taskReceiver != null">
  487. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  488. </if>
  489. <if test="deletedSign != null">
  490. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  491. </if>
  492. <if test="serialNumber != null">
  493. serial_number = #{serialNumber,jdbcType=INTEGER},
  494. </if>
  495. <if test="attachmentUrl != null">
  496. attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR},
  497. </if>
  498. </set>
  499. where id = #{id,jdbcType=VARCHAR}
  500. </update>
  501. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.ContractTask">
  502. <!--
  503. WARNING - @mbg.generated
  504. This element is automatically generated by MyBatis Generator, do not modify.
  505. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  506. -->
  507. update contract_task
  508. set contract_id = #{contractId,jdbcType=VARCHAR},
  509. commodity_id = #{commodityId,jdbcType=VARCHAR},
  510. commodity_name = #{commodityName,jdbcType=VARCHAR},
  511. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  512. commodity_type = #{commodityType,jdbcType=INTEGER},
  513. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  514. create_time = #{createTime,jdbcType=TIMESTAMP},
  515. task_comment = #{taskComment,jdbcType=VARCHAR},
  516. task_status = #{taskStatus,jdbcType=INTEGER},
  517. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  518. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  519. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  520. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  521. serial_number = #{serialNumber,jdbcType=INTEGER},
  522. attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR}
  523. where id = #{id,jdbcType=VARCHAR}
  524. </update>
  525. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.ContractTask">
  526. <!--
  527. WARNING - @mbg.generated
  528. This element is automatically generated by MyBatis Generator, do not modify.
  529. This element was generated on Fri Mar 02 15:45:51 CST 2018.
  530. -->
  531. update contract_task
  532. set contract_id = #{contractId,jdbcType=VARCHAR},
  533. commodity_id = #{commodityId,jdbcType=VARCHAR},
  534. commodity_name = #{commodityName,jdbcType=VARCHAR},
  535. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  536. commodity_type = #{commodityType,jdbcType=INTEGER},
  537. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  538. create_time = #{createTime,jdbcType=TIMESTAMP},
  539. task_comment = #{taskComment,jdbcType=VARCHAR},
  540. task_status = #{taskStatus,jdbcType=INTEGER},
  541. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  542. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  543. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  544. deleted_sign = #{deletedSign,jdbcType=INTEGER},
  545. serial_number = #{serialNumber,jdbcType=INTEGER}
  546. where id = #{id,jdbcType=VARCHAR}
  547. </update>
  548. <select id="selectProjectTaskDetail" parameterType="java.lang.String" resultType="com.goafanti.techproject.bo.TaskDetailBo">
  549. select
  550. a.id as taskId,
  551. a.commodity_id as commodityId,
  552. a.serial_number as taskNo,
  553. a.task_status as taskStatus,
  554. date_format(a.task_distribution_time ,'%Y-%m-%d %H:%i:%S') as taskDistributionTime,
  555. a.task_comment as taskComment,
  556. b.bname as commodityName ,
  557. c.cname as categoryName,
  558. c.id as categoryId,
  559. d.serial_number as projectNo,
  560. d.deleted_sign as deletedSign,
  561. e.name as taskAllocatorName,
  562. f.name as taskReceiverName,
  563. g.nickname as buyerName
  564. from
  565. contract_task a left join business_project b on
  566. a.commodity_id = b.id left join business_varieties c on
  567. b.cid = c.id left join contract d on
  568. a.contract_id = d.id left join admin e on
  569. a.task_allocator = e.id left join admin f on
  570. a.task_receiver = f.id left join user g on
  571. d.uid = g.id
  572. where
  573. a.id = #{taskId,jdbcType=VARCHAR}
  574. </select>
  575. </mapper>