TOrderTaskMapper.xml 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  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.TOrderTaskMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TOrderTask">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  9. -->
  10. <id column="id" jdbcType="INTEGER" property="id" />
  11. <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
  12. <result column="super_id" jdbcType="VARCHAR" property="superId" />
  13. <result column="commodity_id" jdbcType="VARCHAR" property="commodityId" />
  14. <result column="commodity_name" jdbcType="VARCHAR" property="commodityName" />
  15. <result column="commodity_quantity" jdbcType="INTEGER" property="commodityQuantity" />
  16. <result column="commodity_mode" jdbcType="VARCHAR" property="commodityMode" />
  17. <result column="commodity_price" jdbcType="DECIMAL" property="commodityPrice" />
  18. <result column="task_status" jdbcType="INTEGER" property="taskStatus" />
  19. <result column="task_distribution_time" jdbcType="TIMESTAMP" property="taskDistributionTime" />
  20. <result column="task_allocator" jdbcType="VARCHAR" property="taskAllocator" />
  21. <result column="task_receiver" jdbcType="VARCHAR" property="taskReceiver" />
  22. <result column="task_comment" jdbcType="VARCHAR" property="taskComment" />
  23. <result column="task_start_time" jdbcType="TIMESTAMP" property="taskStartTime" />
  24. <result column="task_end_time" jdbcType="TIMESTAMP" property="taskEndTime" />
  25. <result column="project_status" jdbcType="INTEGER" property="projectStatus" />
  26. <result column="main" jdbcType="INTEGER" property="main" />
  27. <result column="accept_time" jdbcType="DATE" property="acceptTime" />
  28. <result column="review_time" jdbcType="DATE" property="reviewTime" />
  29. <result column="publicity_time" jdbcType="DATE" property="publicityTime" />
  30. <result column="licence_time" jdbcType="DATE" property="licenceTime" />
  31. <result column="name" jdbcType="VARCHAR" property="name" />
  32. <result column="email" jdbcType="VARCHAR" property="email" />
  33. </resultMap>
  34. <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.goafanti.common.model.TOrderTask">
  35. <!--
  36. WARNING - @mbg.generated
  37. This element is automatically generated by MyBatis Generator, do not modify.
  38. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  39. -->
  40. <result column="attachment_url" jdbcType="LONGVARCHAR" property="attachmentUrl" />
  41. </resultMap>
  42. <sql id="Example_Where_Clause">
  43. <!--
  44. WARNING - @mbg.generated
  45. This element is automatically generated by MyBatis Generator, do not modify.
  46. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  47. -->
  48. <where>
  49. <foreach collection="oredCriteria" item="criteria" separator="or">
  50. <if test="criteria.valid">
  51. <trim prefix="(" prefixOverrides="and" suffix=")">
  52. <foreach collection="criteria.criteria" item="criterion">
  53. <choose>
  54. <when test="criterion.noValue">
  55. and ${criterion.condition}
  56. </when>
  57. <when test="criterion.singleValue">
  58. and ${criterion.condition} #{criterion.value}
  59. </when>
  60. <when test="criterion.betweenValue">
  61. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  62. </when>
  63. <when test="criterion.listValue">
  64. and ${criterion.condition}
  65. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  66. #{listItem}
  67. </foreach>
  68. </when>
  69. </choose>
  70. </foreach>
  71. </trim>
  72. </if>
  73. </foreach>
  74. </where>
  75. </sql>
  76. <sql id="Update_By_Example_Where_Clause">
  77. <!--
  78. WARNING - @mbg.generated
  79. This element is automatically generated by MyBatis Generator, do not modify.
  80. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  81. -->
  82. <where>
  83. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  84. <if test="criteria.valid">
  85. <trim prefix="(" prefixOverrides="and" suffix=")">
  86. <foreach collection="criteria.criteria" item="criterion">
  87. <choose>
  88. <when test="criterion.noValue">
  89. and ${criterion.condition}
  90. </when>
  91. <when test="criterion.singleValue">
  92. and ${criterion.condition} #{criterion.value}
  93. </when>
  94. <when test="criterion.betweenValue">
  95. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  96. </when>
  97. <when test="criterion.listValue">
  98. and ${criterion.condition}
  99. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  100. #{listItem}
  101. </foreach>
  102. </when>
  103. </choose>
  104. </foreach>
  105. </trim>
  106. </if>
  107. </foreach>
  108. </where>
  109. </sql>
  110. <sql id="Base_Column_List">
  111. <!--
  112. WARNING - @mbg.generated
  113. This element is automatically generated by MyBatis Generator, do not modify.
  114. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  115. -->
  116. id, order_no, super_id, commodity_id, commodity_name, commodity_quantity, commodity_mode,
  117. commodity_price, task_status, task_distribution_time, task_allocator, task_receiver,
  118. task_comment, task_start_time, task_end_time, project_status, accept_time, review_time,
  119. publicity_time, licence_time ,main
  120. </sql>
  121. <sql id="Blob_Column_List">
  122. <!--
  123. WARNING - @mbg.generated
  124. This element is automatically generated by MyBatis Generator, do not modify.
  125. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  126. -->
  127. attachment_url
  128. </sql>
  129. <select id="selectByExampleWithBLOBs" parameterType="com.goafanti.common.model.TOrderTaskExample" resultMap="ResultMapWithBLOBs">
  130. <!--
  131. WARNING - @mbg.generated
  132. This element is automatically generated by MyBatis Generator, do not modify.
  133. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  134. -->
  135. select
  136. <if test="distinct">
  137. distinct
  138. </if>
  139. <include refid="Base_Column_List" />
  140. ,
  141. <include refid="Blob_Column_List" />
  142. from t_order_task
  143. <if test="_parameter != null">
  144. <include refid="Example_Where_Clause" />
  145. </if>
  146. <if test="orderByClause != null">
  147. order by ${orderByClause}
  148. </if>
  149. </select>
  150. <select id="selectByExample" parameterType="com.goafanti.common.model.TOrderTaskExample" resultMap="BaseResultMap">
  151. <!--
  152. WARNING - @mbg.generated
  153. This element is automatically generated by MyBatis Generator, do not modify.
  154. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  155. -->
  156. select
  157. <if test="distinct">
  158. distinct
  159. </if>
  160. <include refid="Base_Column_List" />
  161. from t_order_task
  162. <if test="_parameter != null">
  163. <include refid="Example_Where_Clause" />
  164. </if>
  165. <if test="orderByClause != null">
  166. order by ${orderByClause}
  167. </if>
  168. </select>
  169. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
  170. <!--
  171. WARNING - @mbg.generated
  172. This element is automatically generated by MyBatis Generator, do not modify.
  173. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  174. -->
  175. select
  176. <include refid="Base_Column_List" />
  177. ,
  178. <include refid="Blob_Column_List" />
  179. from t_order_task
  180. where id = #{id,jdbcType=INTEGER}
  181. </select>
  182. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  183. <!--
  184. WARNING - @mbg.generated
  185. This element is automatically generated by MyBatis Generator, do not modify.
  186. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  187. -->
  188. delete from t_order_task
  189. where id = #{id,jdbcType=INTEGER}
  190. </delete>
  191. <delete id="deleteByExample" parameterType="com.goafanti.common.model.TOrderTaskExample">
  192. <!--
  193. WARNING - @mbg.generated
  194. This element is automatically generated by MyBatis Generator, do not modify.
  195. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  196. -->
  197. delete from t_order_task
  198. <if test="_parameter != null">
  199. <include refid="Example_Where_Clause" />
  200. </if>
  201. </delete>
  202. <insert id="insert" parameterType="com.goafanti.common.model.TOrderTask">
  203. <!--
  204. WARNING - @mbg.generated
  205. This element is automatically generated by MyBatis Generator, do not modify.
  206. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  207. -->
  208. insert into t_order_task (id, order_no, super_id,
  209. commodity_id, commodity_name, commodity_quantity,
  210. commodity_mode, commodity_price, task_status,
  211. task_distribution_time, task_allocator,
  212. task_receiver, task_comment, task_start_time,
  213. task_end_time, project_status, accept_time,
  214. review_time, publicity_time, licence_time,
  215. attachment_url,main)
  216. values (#{id,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{superId,jdbcType=VARCHAR},
  217. #{commodityId,jdbcType=VARCHAR}, #{commodityName,jdbcType=VARCHAR}, #{commodityQuantity,jdbcType=INTEGER},
  218. #{commodityMode,jdbcType=VARCHAR}, #{commodityPrice,jdbcType=DECIMAL}, #{taskStatus,jdbcType=INTEGER},
  219. #{taskDistributionTime,jdbcType=TIMESTAMP}, #{taskAllocator,jdbcType=VARCHAR},
  220. #{taskReceiver,jdbcType=VARCHAR}, #{taskComment,jdbcType=VARCHAR}, #{taskStartTime,jdbcType=TIMESTAMP},
  221. #{taskEndTime,jdbcType=TIMESTAMP}, #{projectStatus,jdbcType=INTEGER}, #{acceptTime,jdbcType=DATE},
  222. #{reviewTime,jdbcType=DATE}, #{publicityTime,jdbcType=DATE}, #{licenceTime,jdbcType=DATE},
  223. #{attachmentUrl,jdbcType=LONGVARCHAR},#{main,jdbcType=INTEGER})
  224. </insert>
  225. <insert id="insertSelective" parameterType="com.goafanti.common.model.TOrderTask">
  226. <!--
  227. WARNING - @mbg.generated
  228. This element is automatically generated by MyBatis Generator, do not modify.
  229. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  230. -->
  231. insert into t_order_task
  232. <trim prefix="(" suffix=")" suffixOverrides=",">
  233. <if test="id != null">
  234. id,
  235. </if>
  236. <if test="orderNo != null">
  237. order_no,
  238. </if>
  239. <if test="superId != null">
  240. super_id,
  241. </if>
  242. <if test="commodityId != null">
  243. commodity_id,
  244. </if>
  245. <if test="commodityName != null">
  246. commodity_name,
  247. </if>
  248. <if test="commodityQuantity != null">
  249. commodity_quantity,
  250. </if>
  251. <if test="commodityMode != null">
  252. commodity_mode,
  253. </if>
  254. <if test="commodityPrice != null">
  255. commodity_price,
  256. </if>
  257. <if test="taskStatus != null">
  258. task_status,
  259. </if>
  260. <if test="taskDistributionTime != null">
  261. task_distribution_time,
  262. </if>
  263. <if test="taskAllocator != null">
  264. task_allocator,
  265. </if>
  266. <if test="taskReceiver != null">
  267. task_receiver,
  268. </if>
  269. <if test="taskComment != null">
  270. task_comment,
  271. </if>
  272. <if test="taskStartTime != null">
  273. task_start_time,
  274. </if>
  275. <if test="taskEndTime != null">
  276. task_end_time,
  277. </if>
  278. <if test="projectStatus != null">
  279. project_status,
  280. </if>
  281. <if test="acceptTime != null">
  282. accept_time,
  283. </if>
  284. <if test="reviewTime != null">
  285. review_time,
  286. </if>
  287. <if test="publicityTime != null">
  288. publicity_time,
  289. </if>
  290. <if test="licenceTime != null">
  291. licence_time,
  292. </if>
  293. <if test="attachmentUrl != null">
  294. attachment_url,
  295. </if>
  296. <if test="main != null">
  297. main,
  298. </if>
  299. </trim>
  300. <trim prefix="values (" suffix=")" suffixOverrides=",">
  301. <if test="id != null">
  302. #{id,jdbcType=INTEGER},
  303. </if>
  304. <if test="orderNo != null">
  305. #{orderNo,jdbcType=VARCHAR},
  306. </if>
  307. <if test="superId != null">
  308. #{superId,jdbcType=VARCHAR},
  309. </if>
  310. <if test="commodityId != null">
  311. #{commodityId,jdbcType=VARCHAR},
  312. </if>
  313. <if test="commodityName != null">
  314. #{commodityName,jdbcType=VARCHAR},
  315. </if>
  316. <if test="commodityQuantity != null">
  317. #{commodityQuantity,jdbcType=INTEGER},
  318. </if>
  319. <if test="commodityMode != null">
  320. #{commodityMode,jdbcType=VARCHAR},
  321. </if>
  322. <if test="commodityPrice != null">
  323. #{commodityPrice,jdbcType=DECIMAL},
  324. </if>
  325. <if test="taskStatus != null">
  326. #{taskStatus,jdbcType=INTEGER},
  327. </if>
  328. <if test="taskDistributionTime != null">
  329. #{taskDistributionTime,jdbcType=TIMESTAMP},
  330. </if>
  331. <if test="taskAllocator != null">
  332. #{taskAllocator,jdbcType=VARCHAR},
  333. </if>
  334. <if test="taskReceiver != null">
  335. #{taskReceiver,jdbcType=VARCHAR},
  336. </if>
  337. <if test="taskComment != null">
  338. #{taskComment,jdbcType=VARCHAR},
  339. </if>
  340. <if test="taskStartTime != null">
  341. #{taskStartTime,jdbcType=TIMESTAMP},
  342. </if>
  343. <if test="taskEndTime != null">
  344. #{taskEndTime,jdbcType=TIMESTAMP},
  345. </if>
  346. <if test="projectStatus != null">
  347. #{projectStatus,jdbcType=INTEGER},
  348. </if>
  349. <if test="acceptTime != null">
  350. #{acceptTime,jdbcType=DATE},
  351. </if>
  352. <if test="reviewTime != null">
  353. #{reviewTime,jdbcType=DATE},
  354. </if>
  355. <if test="publicityTime != null">
  356. #{publicityTime,jdbcType=DATE},
  357. </if>
  358. <if test="licenceTime != null">
  359. #{licenceTime,jdbcType=DATE},
  360. </if>
  361. <if test="attachmentUrl != null">
  362. #{attachmentUrl,jdbcType=LONGVARCHAR},
  363. </if>
  364. <if test="main != null">
  365. #{main,jdbcType=INTEGER},
  366. </if>
  367. </trim>
  368. </insert>
  369. <select id="countByExample" parameterType="com.goafanti.common.model.TOrderTaskExample" resultType="java.lang.Long">
  370. <!--
  371. WARNING - @mbg.generated
  372. This element is automatically generated by MyBatis Generator, do not modify.
  373. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  374. -->
  375. select count(*) from t_order_task
  376. <if test="_parameter != null">
  377. <include refid="Example_Where_Clause" />
  378. </if>
  379. </select>
  380. <update id="updateByExampleSelective" parameterType="map">
  381. <!--
  382. WARNING - @mbg.generated
  383. This element is automatically generated by MyBatis Generator, do not modify.
  384. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  385. -->
  386. update t_order_task
  387. <set>
  388. <if test="record.id != null">
  389. id = #{record.id,jdbcType=INTEGER},
  390. </if>
  391. <if test="record.orderNo != null">
  392. order_no = #{record.orderNo,jdbcType=VARCHAR},
  393. </if>
  394. <if test="record.superId != null">
  395. super_id = #{record.superId,jdbcType=VARCHAR},
  396. </if>
  397. <if test="record.commodityId != null">
  398. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  399. </if>
  400. <if test="record.commodityName != null">
  401. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  402. </if>
  403. <if test="record.commodityQuantity != null">
  404. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  405. </if>
  406. <if test="record.commodityMode != null">
  407. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  408. </if>
  409. <if test="record.commodityPrice != null">
  410. commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
  411. </if>
  412. <if test="record.taskStatus != null">
  413. task_status = #{record.taskStatus,jdbcType=INTEGER},
  414. </if>
  415. <if test="record.taskDistributionTime != null">
  416. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  417. </if>
  418. <if test="record.taskAllocator != null">
  419. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  420. </if>
  421. <if test="record.taskReceiver != null">
  422. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  423. </if>
  424. <if test="record.taskComment != null">
  425. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  426. </if>
  427. <if test="record.taskStartTime != null">
  428. task_start_time = #{record.taskStartTime,jdbcType=TIMESTAMP},
  429. </if>
  430. <if test="record.taskEndTime != null">
  431. task_end_time = #{record.taskEndTime,jdbcType=TIMESTAMP},
  432. </if>
  433. <if test="record.projectStatus != null">
  434. project_status = #{record.projectStatus,jdbcType=INTEGER},
  435. </if>
  436. <if test="record.acceptTime != null">
  437. accept_time = #{record.acceptTime,jdbcType=DATE},
  438. </if>
  439. <if test="record.reviewTime != null">
  440. review_time = #{record.reviewTime,jdbcType=DATE},
  441. </if>
  442. <if test="record.publicityTime != null">
  443. publicity_time = #{record.publicityTime,jdbcType=DATE},
  444. </if>
  445. <if test="record.licenceTime != null">
  446. licence_time = #{record.licenceTime,jdbcType=DATE},
  447. </if>
  448. <if test="record.attachmentUrl != null">
  449. attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR},
  450. </if>
  451. </set>
  452. <if test="_parameter != null">
  453. <include refid="Update_By_Example_Where_Clause" />
  454. </if>
  455. </update>
  456. <update id="updateByExampleWithBLOBs" parameterType="map">
  457. <!--
  458. WARNING - @mbg.generated
  459. This element is automatically generated by MyBatis Generator, do not modify.
  460. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  461. -->
  462. update t_order_task
  463. set id = #{record.id,jdbcType=INTEGER},
  464. order_no = #{record.orderNo,jdbcType=VARCHAR},
  465. super_id = #{record.superId,jdbcType=VARCHAR},
  466. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  467. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  468. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  469. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  470. commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
  471. task_status = #{record.taskStatus,jdbcType=INTEGER},
  472. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  473. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  474. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  475. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  476. task_start_time = #{record.taskStartTime,jdbcType=TIMESTAMP},
  477. task_end_time = #{record.taskEndTime,jdbcType=TIMESTAMP},
  478. project_status = #{record.projectStatus,jdbcType=INTEGER},
  479. accept_time = #{record.acceptTime,jdbcType=DATE},
  480. review_time = #{record.reviewTime,jdbcType=DATE},
  481. publicity_time = #{record.publicityTime,jdbcType=DATE},
  482. licence_time = #{record.licenceTime,jdbcType=DATE},
  483. attachment_url = #{record.attachmentUrl,jdbcType=LONGVARCHAR}
  484. <if test="_parameter != null">
  485. <include refid="Update_By_Example_Where_Clause" />
  486. </if>
  487. </update>
  488. <update id="updateByExample" parameterType="map">
  489. <!--
  490. WARNING - @mbg.generated
  491. This element is automatically generated by MyBatis Generator, do not modify.
  492. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  493. -->
  494. update t_order_task
  495. set id = #{record.id,jdbcType=INTEGER},
  496. order_no = #{record.orderNo,jdbcType=VARCHAR},
  497. super_id = #{record.superId,jdbcType=VARCHAR},
  498. commodity_id = #{record.commodityId,jdbcType=VARCHAR},
  499. commodity_name = #{record.commodityName,jdbcType=VARCHAR},
  500. commodity_quantity = #{record.commodityQuantity,jdbcType=INTEGER},
  501. commodity_mode = #{record.commodityMode,jdbcType=VARCHAR},
  502. commodity_price = #{record.commodityPrice,jdbcType=DECIMAL},
  503. task_status = #{record.taskStatus,jdbcType=INTEGER},
  504. task_distribution_time = #{record.taskDistributionTime,jdbcType=TIMESTAMP},
  505. task_allocator = #{record.taskAllocator,jdbcType=VARCHAR},
  506. task_receiver = #{record.taskReceiver,jdbcType=VARCHAR},
  507. task_comment = #{record.taskComment,jdbcType=VARCHAR},
  508. task_start_time = #{record.taskStartTime,jdbcType=TIMESTAMP},
  509. task_end_time = #{record.taskEndTime,jdbcType=TIMESTAMP},
  510. project_status = #{record.projectStatus,jdbcType=INTEGER},
  511. accept_time = #{record.acceptTime,jdbcType=DATE},
  512. review_time = #{record.reviewTime,jdbcType=DATE},
  513. publicity_time = #{record.publicityTime,jdbcType=DATE},
  514. licence_time = #{record.licenceTime,jdbcType=DATE}
  515. <if test="_parameter != null">
  516. <include refid="Update_By_Example_Where_Clause" />
  517. </if>
  518. </update>
  519. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TOrderTask">
  520. <!--
  521. WARNING - @mbg.generated
  522. This element is automatically generated by MyBatis Generator, do not modify.
  523. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  524. -->
  525. update t_order_task
  526. <set>
  527. <if test="orderNo != null">
  528. order_no = #{orderNo,jdbcType=VARCHAR},
  529. </if>
  530. <if test="superId != null">
  531. super_id = #{superId,jdbcType=VARCHAR},
  532. </if>
  533. <if test="commodityId != null">
  534. commodity_id = #{commodityId,jdbcType=VARCHAR},
  535. </if>
  536. <if test="commodityName != null">
  537. commodity_name = #{commodityName,jdbcType=VARCHAR},
  538. </if>
  539. <if test="commodityQuantity != null">
  540. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  541. </if>
  542. <if test="commodityMode != null">
  543. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  544. </if>
  545. <if test="commodityPrice != null">
  546. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  547. </if>
  548. <if test="taskStatus != null">
  549. task_status = #{taskStatus,jdbcType=INTEGER},
  550. </if>
  551. <if test="taskDistributionTime != null">
  552. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  553. </if>
  554. <if test="taskAllocator != null">
  555. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  556. </if>
  557. <if test="taskReceiver != null">
  558. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  559. </if>
  560. <if test="taskComment != null">
  561. task_comment = #{taskComment,jdbcType=VARCHAR},
  562. </if>
  563. <if test="taskStartTime != null">
  564. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  565. </if>
  566. <if test="taskEndTime != null">
  567. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  568. </if>
  569. <if test="projectStatus != null">
  570. project_status = #{projectStatus,jdbcType=INTEGER},
  571. </if>
  572. <if test="acceptTime != null">
  573. accept_time = #{acceptTime,jdbcType=DATE},
  574. </if>
  575. <if test="reviewTime != null">
  576. review_time = #{reviewTime,jdbcType=DATE},
  577. </if>
  578. <if test="publicityTime != null">
  579. publicity_time = #{publicityTime,jdbcType=DATE},
  580. </if>
  581. <if test="licenceTime != null">
  582. licence_time = #{licenceTime,jdbcType=DATE},
  583. </if>
  584. <if test="attachmentUrl != null">
  585. attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR},
  586. </if>
  587. <if test="main != null">
  588. main = #{main,jdbcType=INTEGER},
  589. </if>
  590. </set>
  591. where id = #{id,jdbcType=INTEGER}
  592. </update>
  593. <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.goafanti.common.model.TOrderTask">
  594. <!--
  595. WARNING - @mbg.generated
  596. This element is automatically generated by MyBatis Generator, do not modify.
  597. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  598. -->
  599. update t_order_task
  600. set order_no = #{orderNo,jdbcType=VARCHAR},
  601. super_id = #{superId,jdbcType=VARCHAR},
  602. commodity_id = #{commodityId,jdbcType=VARCHAR},
  603. commodity_name = #{commodityName,jdbcType=VARCHAR},
  604. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  605. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  606. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  607. task_status = #{taskStatus,jdbcType=INTEGER},
  608. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  609. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  610. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  611. task_comment = #{taskComment,jdbcType=VARCHAR},
  612. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  613. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  614. project_status = #{projectStatus,jdbcType=INTEGER},
  615. accept_time = #{acceptTime,jdbcType=DATE},
  616. review_time = #{reviewTime,jdbcType=DATE},
  617. publicity_time = #{publicityTime,jdbcType=DATE},
  618. licence_time = #{licenceTime,jdbcType=DATE},
  619. attachment_url = #{attachmentUrl,jdbcType=LONGVARCHAR},
  620. main = #{main,jdbcType=INTEGER}
  621. where id = #{id,jdbcType=INTEGER}
  622. </update>
  623. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TOrderTask">
  624. <!--
  625. WARNING - @mbg.generated
  626. This element is automatically generated by MyBatis Generator, do not modify.
  627. This element was generated on Mon Nov 19 11:03:38 CST 2018.
  628. -->
  629. update t_order_task
  630. set order_no = #{orderNo,jdbcType=VARCHAR},
  631. super_id = #{superId,jdbcType=VARCHAR},
  632. commodity_id = #{commodityId,jdbcType=VARCHAR},
  633. commodity_name = #{commodityName,jdbcType=VARCHAR},
  634. commodity_quantity = #{commodityQuantity,jdbcType=INTEGER},
  635. commodity_mode = #{commodityMode,jdbcType=VARCHAR},
  636. commodity_price = #{commodityPrice,jdbcType=DECIMAL},
  637. task_status = #{taskStatus,jdbcType=INTEGER},
  638. task_distribution_time = #{taskDistributionTime,jdbcType=TIMESTAMP},
  639. task_allocator = #{taskAllocator,jdbcType=VARCHAR},
  640. task_receiver = #{taskReceiver,jdbcType=VARCHAR},
  641. task_comment = #{taskComment,jdbcType=VARCHAR},
  642. task_start_time = #{taskStartTime,jdbcType=TIMESTAMP},
  643. task_end_time = #{taskEndTime,jdbcType=TIMESTAMP},
  644. project_status = #{projectStatus,jdbcType=INTEGER},
  645. accept_time = #{acceptTime,jdbcType=DATE},
  646. review_time = #{reviewTime,jdbcType=DATE},
  647. publicity_time = #{publicityTime,jdbcType=DATE},
  648. licence_time = #{licenceTime,jdbcType=DATE},
  649. main = #{main,jdbcType=INTEGER}
  650. where id = #{id,jdbcType=INTEGER}
  651. </update>
  652. <select id="selectOrderTask" resultType="com.goafanti.order.bo.TOrderTaskBo">
  653. select
  654. a.id,a.order_no as orderNo,a.commodity_name as commodityName,a.commodity_id as commodityId,
  655. a.commodity_quantity as commodityQuantity,a.commodity_price as commodityPrice,a.task_comment as taskComment,
  656. a.task_status as taskStatus,a.project_status as projectStatus,a.main,a.task_receiver as taskReceiver ,
  657. d.name as contacts,d.contact_mobile as contactsMobile,c.cname
  658. from t_order_task a left join business_project b on a.commodity_id=b.id
  659. left join business_category c on b.cid=c.id left join admin d on a.task_receiver=d.id
  660. where a.super_id is null and a.order_no= #{orderNo,jdbcType=VARCHAR}
  661. </select>
  662. <select id="selectOrderTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  663. select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
  664. a.project_status as projectStatus,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
  665. a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName
  666. from t_order_task a left join business_project b on a.commodity_id=b.id
  667. left join business_category c on b.cid=c.id
  668. left join admin d on a.task_receiver=d.id
  669. left join t_order_new e on a.order_no=e.order_no
  670. left join user f on e.buyer_id=f.id
  671. left join admin g on e.salesman_id=g.id
  672. left join department h on g.department_id=h.id
  673. where e.delete_sign=0 and e.order_status not in (5,7)
  674. <if test="specially == 0">
  675. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  676. and a.commodity_quantity =1
  677. </if>
  678. <if test="specially == 1">
  679. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  680. and a.super_id is null
  681. </if>
  682. <if test="specially == 2">
  683. and d.superior_id= (select department_id from admin where id= #{aid,jdbcType=VARCHAR})
  684. </if>
  685. <if test="orderNo != null">
  686. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  687. </if>
  688. <if test="depId != null">
  689. and g.department_id= #{depId,jdbcType=VARCHAR}
  690. </if>
  691. <if test="name != null">
  692. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  693. </if>
  694. <if test="orderNo != null">
  695. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  696. </if>
  697. <if test="taskId != null">
  698. and a.id= #{taskId,jdbcType=VARCHAR}
  699. </if>
  700. <if test="taskStatus != null">
  701. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  702. </if>
  703. <if test="adminName != null">
  704. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  705. </if>
  706. order by a.task_distribution_time desc
  707. <if test="page_sql!=null">
  708. ${page_sql}
  709. </if>
  710. </select>
  711. <select id="selectOrderTaskListCount" resultType="java.lang.Integer">
  712. select count(*)
  713. from t_order_task a
  714. left join admin d on a.task_receiver=d.id
  715. left join t_order_new e on a.order_no=e.order_no
  716. left join admin g on e.salesman_id=g.id
  717. left join department h on g.department_id=h.id
  718. where e.delete_sign=0 and e.order_status not in (5,7)
  719. <if test="specially == 0">
  720. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  721. and a.commodity_quantity =1
  722. </if>
  723. <if test="specially == 1">
  724. and a.task_receiver= #{aid,jdbcType=VARCHAR}
  725. and a.super_id is null
  726. </if>
  727. <if test="specially == 2">
  728. and d.superior_id= (select department_id from admin where id= #{aid,jdbcType=VARCHAR})
  729. </if>
  730. <if test="orderNo != null">
  731. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  732. </if>
  733. <if test="depId != null">
  734. and g.department_id= #{depId,jdbcType=VARCHAR}
  735. </if>
  736. <if test="name != null">
  737. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  738. </if>
  739. <if test="orderNo != null">
  740. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  741. </if>
  742. <if test="taskId != null">
  743. and a.id= #{taskId,jdbcType=VARCHAR}
  744. </if>
  745. <if test="taskStatus != null">
  746. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  747. </if>
  748. <if test="adminName != null">
  749. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  750. </if>
  751. </select>
  752. <select id="getOrderTaskDetail" resultType="com.goafanti.order.bo.TOrderTaskDetailBo">
  753. select
  754. a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,a.task_comment as taskComment,
  755. a.project_status as projectStatus,a.task_status as taskStatus,e.contacts,a.attachment_url as attachmentUrl,
  756. f.nickname as userName,g.name as salesmanName,date_format(a.task_start_time,'%Y-%m-%d') as startDate,
  757. date_format(a.task_end_time,'%Y-%m-%d') as endDate,date_format(a.accept_time,'%Y-%m-%d') as acceptDate,
  758. date_format(a.review_time,'%Y-%m-%d') as reviewDate,date_format(a.publicity_time,'%Y-%m-%d') as publicityDate,
  759. date_format(a.licence_time,'%Y-%m-%d') as licenceDate,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
  760. e.contacts ,e.contact_mobile as contactMobile ,e.legal_person as legalPerson,e.legal_person_tel as legalPersonTel
  761. from t_order_task a left join business_project b on a.commodity_id=b.id
  762. left join business_category c on b.cid=c.id
  763. left join admin d on a.task_receiver=d.id
  764. left join t_order_new e on a.order_no=e.order_no
  765. left join user f on e.buyer_id=f.id
  766. left join admin g on e.salesman_id=g.id
  767. where a.id= #{id,jdbcType=VARCHAR}
  768. </select>
  769. <select id="selectBySuperId" resultType="com.goafanti.common.model.TOrderTask">
  770. select super_id as superId,min(task_status) as taskStatus,min(project_status) as projectStatus,max(main) as main from t_order_task
  771. where super_id = #{superId,jdbcType=VARCHAR} group by super_id
  772. </select>
  773. <select id="selectTaskHoursListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  774. select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,dep.name as depName,
  775. a.task_status as taskStatus,f.nickname as userName,ifnull(g.hours,0) as hours,a.commodity_quantity as commodityQuantity
  776. from t_order_task a left join business_project b on a.commodity_id=b.id
  777. left join business_category c on b.cid=c.id
  778. left join admin d on a.task_receiver=d.id
  779. left join department dep on d.department_id=dep.id
  780. left join t_order_new e on a.order_no=e.order_no
  781. left join user f on e.buyer_id=f.id
  782. left join (select task_id,sum(hours) as hours from t_task_hours group by task_id) g on a.id=g.task_id
  783. where e.delete_sign=0 and a.super_id is null
  784. <if test="name != null">
  785. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  786. </if>
  787. <if test="taskId != null">
  788. and a.id= #{taskId,jdbcType=VARCHAR}
  789. </if>
  790. <if test="starTime !=null and endTime !=null">
  791. and a.task_start_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
  792. </if>
  793. order by a.task_start_time desc
  794. <if test="page_sql!=null">
  795. ${page_sql}
  796. </if>
  797. </select>
  798. <select id="selectTaskHoursListCount" resultType="java.lang.Integer">
  799. select count(*)
  800. from t_order_task a left join business_project b on a.commodity_id=b.id
  801. left join business_category c on b.cid=c.id
  802. left join admin d on a.task_receiver=d.id
  803. left join t_order_new e on a.order_no=e.order_no
  804. left join user f on e.buyer_id=f.id
  805. where e.delete_sign=0 and a.super_id is null
  806. <if test="name != null">
  807. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  808. </if>
  809. <if test="taskId != null">
  810. and a.id= #{taskId,jdbcType=VARCHAR}
  811. </if>
  812. <if test="starTime !=null and endTime !=null">
  813. and a.task_start_time between #{starTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
  814. </if>
  815. </select>
  816. <select id="selectTaskListByPage" resultType="com.goafanti.order.bo.TOrderTaskListBo">
  817. select a.id,a.commodity_name as taskName,a.order_no as orderNo,c.cname,d.name as receiverName,
  818. a.project_status as projectStatus,a.task_status as taskStatus,date_format(a.task_distribution_time,'%Y-%m-%d') as taskDate,
  819. a.commodity_quantity as commodityQuantity,f.nickname as userName,h.name as depName
  820. from t_task_log x left join t_order_task a on x.task_id=a.id
  821. left join business_project b on a.commodity_id=b.id
  822. left join business_category c on b.cid=c.id
  823. left join admin d on a.task_receiver=d.id
  824. left join t_order_new e on a.order_no=e.order_no
  825. left join user f on e.buyer_id=f.id
  826. left join admin g on e.salesman_id=g.id
  827. left join department h on g.department_id=h.id
  828. where e.delete_sign=0
  829. and x.task_receiver= #{aid,jdbcType=VARCHAR}
  830. <if test="orderNo != null">
  831. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  832. </if>
  833. <if test="name != null">
  834. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  835. </if>
  836. <if test="orderNo != null">
  837. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  838. </if>
  839. <if test="depId != null">
  840. and g.department_id= #{depId ,jdbcType=VARCHAR}
  841. </if>
  842. <if test="taskId != null">
  843. and a.id= #{taskId,jdbcType=VARCHAR}
  844. </if>
  845. <if test="taskStatus != null">
  846. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  847. </if>
  848. <if test="adminName != null">
  849. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  850. </if>
  851. order by a.task_distribution_time desc
  852. <if test="page_sql!=null">
  853. ${page_sql}
  854. </if>
  855. </select>
  856. <select id="selectTaskListCount" resultType="java.lang.Integer">
  857. select count(*)
  858. from t_task_log x left join t_order_task a on x.task_id=a.id
  859. left join admin d on a.task_receiver=d.id
  860. left join t_order_new e on a.order_no=e.order_no
  861. where e.delete_sign=0
  862. and x.task_receiver= #{aid,jdbcType=VARCHAR}
  863. <if test="orderNo != null">
  864. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  865. </if>
  866. <if test="name != null">
  867. and f.nickname like CONCAT('%',#{name,jdbcType=VARCHAR},'%')
  868. </if>
  869. <if test="depId != null">
  870. and g.department_id= #{depId ,jdbcType=VARCHAR}
  871. </if>
  872. <if test="orderNo != null">
  873. and a.order_no= #{orderNo,jdbcType=VARCHAR}
  874. </if>
  875. <if test="taskId != null">
  876. and a.id= #{taskId,jdbcType=VARCHAR}
  877. </if>
  878. <if test="taskStatus != null">
  879. and a.task_status= #{taskStatus,jdbcType=INTEGER}
  880. </if>
  881. <if test="adminName != null">
  882. and d.name like CONCAT('%', #{adminName,jdbcType=VARCHAR},'%')
  883. </if>
  884. </select>
  885. <!-- 根据订单编号获得所有的任务负责人 -->
  886. <select id="getReceiverByOid" parameterType="java.lang.String" resultMap="BaseResultMap">
  887. select distinct task_receiver, a.name, a.email, t.id, t.project_status from t_order_task t
  888. inner join admin a on t.task_receiver = a.id
  889. where order_no = #{orderNo,jdbcType=VARCHAR} and task_status &gt; 0 and super_id is null
  890. </select>
  891. </mapper>