ContractTaskMapper.xml 25 KB

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