GoodsProductDao.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  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.kmall.admin.dao.GoodsProductDao">
  4. <resultMap type="com.kmall.admin.entity.GoodsProductEntity" id="goodsProductMap">
  5. <result property="mallGoodsProductSn" column="mall_goods_product_sn"/>
  6. <result property="merchSn" column="merch_sn"/>
  7. <result property="thirdMerchSn" column="third_merch_sn"/>
  8. <result property="prodBarcode" column="prod_barcode"/>
  9. <result property="sku" column="sku"/>
  10. <result property="cusGoodsCode" column="cus_goods_code"/>
  11. <result property="prodName" column="prod_name"/>
  12. <result property="prodEname" column="prod_ename"/>
  13. <result property="prodRecordName" column="prod_record_name"/>
  14. <result property="prodRecordEname" column="prod_record_ename"/>
  15. <result property="ciqProdModel" column="ciq_prod_model"/>
  16. <result property="prodBrand" column="prod_brand"/>
  17. <result property="oriCntCode" column="ori_cnt_code"/>
  18. <result property="unitCode" column="unit_code"/>
  19. <result property="declPrice" column="decl_price"/>
  20. <result property="declCurrencyCode" column="decl_currency_code"/>
  21. <result property="supplierName" column="supplier_name"/>
  22. <result property="supplierCntCode" column="supplier_cnt_code"/>
  23. <result property="prodCompName" column="prod_comp_name"/>
  24. <result property="prodCompCntCode" column="prod_comp_cnt_code"/>
  25. <result property="ciqMainEle" column="ciq_main_ele"/>
  26. <result property="ciqMonitorType" column="ciq_monitor_type"/>
  27. <result property="isLaw" column="is_law"/>
  28. <result property="isGift" column="is_gift"/>
  29. <result property="cusDeclEle" column="cus_decl_ele"/>
  30. <result property="createrSn" column="creater_sn"/>
  31. <result property="createTime" column="create_time"/>
  32. <result property="moderSn" column="moder_sn"/>
  33. <result property="modTime" column="mod_time"/>
  34. <result property="tstm" column="tstm"/>
  35. <result property="exField" column="ex_field"/>
  36. <result property="exField2" column="ex_field2"/>
  37. <result property="exField3" column="ex_field3"/>
  38. <result property="exField4" column="ex_field4"/>
  39. <result property="exField5" column="ex_field5"/>
  40. <result property="legalUnit1Qty" column="legal_unit1_qty"/>
  41. <result property="netWeight" column="net_weight"/>
  42. <result property="legalUnit2Qty" column="legal_unit2_qty"/>
  43. <result property="grossWeight" column="gross_weight"/>
  44. <result property="localEmsNo" column="local_ems_no"/>
  45. <result property="itemRecordNo" column="item_record_no"/>
  46. <result property="emsClassCode" column="ems_class_code"/>
  47. <result property="isSend" column="is_send"/>
  48. <result property="upImg" column="up_img"/>
  49. <result property="downImg" column="down_img"/>
  50. <result property="leftImg" column="left_img"/>
  51. <result property="rightImg" column="right_img"/>
  52. <result property="beforeImg" column="before_img"/>
  53. <result property="afterImg" column="after_img"/>
  54. <result property="sendTime" column="send_time"/>
  55. <result property="omsAuditStatus" column="oms_audit_status"/>
  56. <result property="omsAuditRemark" column="oms_audit_remark"/>
  57. <result property="omsCallbackTime" column="oms_callback_time"/>
  58. <result property="batchNo" column="batch_no"/>
  59. <result property="omsAuditTime" column="oms_audit_time"/>
  60. <result property="status" column="status"/>
  61. </resultMap>
  62. <select id="queryObject" resultType="com.kmall.admin.entity.GoodsProductEntity">
  63. select
  64. `mall_goods_product_sn`,
  65. `merch_sn`,
  66. `third_merch_sn`,
  67. `prod_barcode`,
  68. `sku`,
  69. `cus_goods_code`,
  70. `prod_name`,
  71. `prod_ename`,
  72. `prod_record_name`,
  73. `prod_record_ename`,
  74. `ciq_prod_model`,
  75. `prod_brand`,
  76. `ori_cnt_code`,
  77. `unit_code`,
  78. `decl_price`,
  79. `decl_currency_code`,
  80. `supplier_name`,
  81. `supplier_cnt_code`,
  82. `prod_comp_name`,
  83. `prod_comp_cnt_code`,
  84. `ciq_main_ele`,
  85. `ciq_monitor_type`,
  86. `is_law`,
  87. `is_gift`,
  88. `cus_decl_ele`,
  89. `creater_sn`,
  90. `create_time`,
  91. `moder_sn`,
  92. `mod_time`,
  93. `tstm`,
  94. `ex_field`,
  95. `ex_field2`,
  96. `ex_field3`,
  97. `ex_field4`,
  98. `ex_field5`,
  99. `legal_unit1_qty`,
  100. `net_weight`,
  101. `legal_unit2_qty`,
  102. `gross_weight`,
  103. `local_ems_no`,
  104. `item_record_no`,
  105. `is_send`,
  106. `ems_class_code`,
  107. `up_img`,
  108. `down_img`,
  109. `left_img`,
  110. `right_img`,
  111. `before_img`,
  112. `after_img`,
  113. `send_time`,
  114. `oms_audit_status`,
  115. `oms_audit_remark`,
  116. `oms_callback_time`,
  117. `batch_no`,
  118. `oms_audit_time`,
  119. `status`
  120. from mall_goods_product
  121. where mall_goods_product_sn = #{id}
  122. </select>
  123. <select id="queryList" resultType="com.kmall.admin.entity.GoodsProductEntity">
  124. select
  125. `mall_goods_product_sn`,
  126. `merch_sn`,
  127. `third_merch_sn`,
  128. `prod_barcode`,
  129. `sku`,
  130. `cus_goods_code`,
  131. `prod_name`,
  132. `prod_ename`,
  133. `prod_record_name`,
  134. `prod_record_ename`,
  135. `ciq_prod_model`,
  136. `prod_brand`,
  137. `ori_cnt_code`,
  138. `unit_code`,
  139. `decl_price`,
  140. `decl_currency_code`,
  141. `supplier_name`,
  142. `supplier_cnt_code`,
  143. `prod_comp_name`,
  144. `prod_comp_cnt_code`,
  145. `ciq_main_ele`,
  146. `ciq_monitor_type`,
  147. `is_law`,
  148. `is_gift`,
  149. `cus_decl_ele`,
  150. `creater_sn`,
  151. `create_time`,
  152. `moder_sn`,
  153. `mod_time`,
  154. `tstm`,
  155. `ex_field`,
  156. `ex_field2`,
  157. `ex_field3`,
  158. `ex_field4`,
  159. `ex_field5`,
  160. `legal_unit1_qty`,
  161. `net_weight`,
  162. `legal_unit2_qty`,
  163. `gross_weight`,
  164. `local_ems_no`,
  165. `item_record_no`,
  166. `is_send`,
  167. `ems_class_code`,
  168. `up_img`,
  169. `down_img`,
  170. `left_img`,
  171. `right_img`,
  172. `before_img`,
  173. `after_img`,
  174. `send_time`,
  175. `oms_audit_status`,
  176. `oms_audit_remark`,
  177. `oms_callback_time`,
  178. `batch_no`,
  179. `oms_audit_time`,
  180. `status`
  181. from mall_goods_product
  182. WHERE 1=1
  183. <if test="name != null and name.trim() != ''">
  184. AND `prod_name` LIKE concat('%',#{name},'%')
  185. </if>
  186. <if test="isSend != null and isSend.trim() != ''">
  187. AND `is_send` in (${isSend})
  188. </if>
  189. <if test="status != null and status.trim() != ''">
  190. AND `status` in (${status})
  191. </if>
  192. <choose>
  193. <when test="sidx != null and sidx.trim() != ''">
  194. order by ${sidx} ${order}
  195. </when>
  196. <otherwise>
  197. order by mall_goods_product_sn desc
  198. </otherwise>
  199. </choose>
  200. <if test="offset != null and limit != null">
  201. limit #{offset}, #{limit}
  202. </if>
  203. </select>
  204. <select id="queryTotal" resultType="int">
  205. select count(*) from mall_goods_product
  206. WHERE 1=1
  207. <if test="name != null and name.trim() != ''">
  208. AND `prod_name` LIKE concat('%',#{name},'%')
  209. </if>
  210. </select>
  211. <select id="selectByParams" resultType="com.kmall.admin.entity.GoodsProductEntity">
  212. select
  213. `mall_goods_product_sn`,
  214. `merch_sn`,
  215. `third_merch_sn`,
  216. `prod_barcode`,
  217. `sku`,
  218. `cus_goods_code`,
  219. `prod_name`,
  220. `prod_ename`,
  221. `prod_record_name`,
  222. `prod_record_ename`,
  223. `ciq_prod_model`,
  224. `prod_brand`,
  225. `ori_cnt_code`,
  226. `unit_code`,
  227. `decl_price`,
  228. `decl_currency_code`,
  229. `supplier_name`,
  230. `supplier_cnt_code`,
  231. `prod_comp_name`,
  232. `prod_comp_cnt_code`,
  233. `ciq_main_ele`,
  234. `ciq_monitor_type`,
  235. `is_law`,
  236. `is_gift`,
  237. `cus_decl_ele`,
  238. `creater_sn`,
  239. `create_time`,
  240. `moder_sn`,
  241. `mod_time`,
  242. `tstm`,
  243. `ex_field`,
  244. `ex_field2`,
  245. `ex_field3`,
  246. `ex_field4`,
  247. `ex_field5`,
  248. `legal_unit1_qty`,
  249. `net_weight`,
  250. `legal_unit2_qty`,
  251. `gross_weight`,
  252. `local_ems_no`,
  253. `item_record_no`,
  254. `is_send`,
  255. `ems_class_code`,
  256. `up_img`,
  257. `down_img`,
  258. `left_img`,
  259. `right_img`,
  260. `before_img`,
  261. `after_img`,
  262. `send_time`,
  263. `oms_audit_status`,
  264. `oms_audit_remark`,
  265. `oms_callback_time`,
  266. `batch_no`,
  267. `oms_audit_time`,
  268. `status`
  269. from mall_goods_product
  270. WHERE 1=1
  271. <if test="sku != null and sku.trim() != ''">
  272. AND sku = #{sku}
  273. </if>
  274. <if test="merchSn != null and merchSn.trim() != ''">
  275. AND merch_sn = #{merchSn}
  276. </if>
  277. <if test="thirdMerchSn != null and thirdMerchSn.trim() != ''">
  278. AND third_merch_sn = #{thirdMerchSn}
  279. </if>
  280. </select>
  281. <select id="selectByMallGoodsProductSns" resultType="com.kmall.admin.entity.GoodsProductEntity">
  282. select
  283. `mall_goods_product_sn`,
  284. `merch_sn`,
  285. `third_merch_sn`,
  286. `prod_barcode`,
  287. `sku`,
  288. `cus_goods_code`,
  289. `prod_name`,
  290. `prod_ename`,
  291. `prod_record_name`,
  292. `prod_record_ename`,
  293. `ciq_prod_model`,
  294. `prod_brand`,
  295. `ori_cnt_code`,
  296. `unit_code`,
  297. `decl_price`,
  298. `decl_currency_code`,
  299. `supplier_name`,
  300. `supplier_cnt_code`,
  301. `prod_comp_name`,
  302. `prod_comp_cnt_code`,
  303. `ciq_main_ele`,
  304. `ciq_monitor_type`,
  305. `is_law`,
  306. `is_gift`,
  307. `cus_decl_ele`,
  308. `creater_sn`,
  309. `create_time`,
  310. `moder_sn`,
  311. `mod_time`,
  312. `tstm`,
  313. `ex_field`,
  314. `ex_field2`,
  315. `ex_field3`,
  316. `ex_field4`,
  317. `ex_field5`,
  318. `legal_unit1_qty`,
  319. `net_weight`,
  320. `legal_unit2_qty`,
  321. `gross_weight`,
  322. `local_ems_no`,
  323. `item_record_no`,
  324. `is_send`,
  325. `ems_class_code`,
  326. `up_img`,
  327. `down_img`,
  328. `left_img`,
  329. `right_img`,
  330. `before_img`,
  331. `after_img`,
  332. `send_time`,
  333. `oms_audit_status`,
  334. `oms_audit_remark`,
  335. `oms_callback_time`,
  336. `batch_no`,
  337. `oms_audit_time`,
  338. `status`
  339. from mall_goods_product
  340. WHERE 1=1
  341. <if test="mallGoodsProductSns != null">
  342. AND mall_goods_product_sn in
  343. <foreach item="id" collection="mallGoodsProductSns" open="(" separator="," close=")">
  344. #{id}
  345. </foreach>
  346. </if>
  347. </select>
  348. <select id="selectBySku" resultType="com.kmall.admin.entity.GoodsProductEntity">
  349. select
  350. `mall_goods_product_sn`,
  351. `merch_sn`,
  352. `third_merch_sn`,
  353. `prod_barcode`,
  354. `sku`,
  355. `cus_goods_code`,
  356. `prod_name`,
  357. `prod_ename`,
  358. `prod_record_name`,
  359. `prod_record_ename`,
  360. `ciq_prod_model`,
  361. `prod_brand`,
  362. `ori_cnt_code`,
  363. `unit_code`,
  364. `decl_price`,
  365. `decl_currency_code`,
  366. `supplier_name`,
  367. `supplier_cnt_code`,
  368. `prod_comp_name`,
  369. `prod_comp_cnt_code`,
  370. `ciq_main_ele`,
  371. `ciq_monitor_type`,
  372. `is_law`,
  373. `is_gift`,
  374. `cus_decl_ele`,
  375. `creater_sn`,
  376. `create_time`,
  377. `moder_sn`,
  378. `mod_time`,
  379. `tstm`,
  380. `ex_field`,
  381. `ex_field2`,
  382. `ex_field3`,
  383. `ex_field4`,
  384. `ex_field5`,
  385. `legal_unit1_qty`,
  386. `net_weight`,
  387. `legal_unit2_qty`,
  388. `gross_weight`,
  389. `local_ems_no`,
  390. `item_record_no`,
  391. `is_send`,
  392. `ems_class_code`,
  393. `up_img`,
  394. `down_img`,
  395. `left_img`,
  396. `right_img`,
  397. `before_img`,
  398. `after_img`,
  399. `send_time`,
  400. `oms_audit_status`,
  401. `oms_audit_remark`,
  402. `oms_callback_time`,
  403. `batch_no`,
  404. `oms_audit_time`,
  405. `status`
  406. from mall_goods_product
  407. where sku = #{sku}
  408. </select>
  409. <select id="selectByBarcode" resultType="com.kmall.admin.entity.GoodsProductEntity">
  410. select
  411. `mall_goods_product_sn`,
  412. `merch_sn`,
  413. `third_merch_sn`,
  414. `prod_barcode`,
  415. `sku`,
  416. `cus_goods_code`,
  417. `prod_name`,
  418. `prod_ename`,
  419. `prod_record_name`,
  420. `prod_record_ename`,
  421. `ciq_prod_model`,
  422. `prod_brand`,
  423. `ori_cnt_code`,
  424. `unit_code`,
  425. `decl_price`,
  426. `decl_currency_code`,
  427. `supplier_name`,
  428. `supplier_cnt_code`,
  429. `prod_comp_name`,
  430. `prod_comp_cnt_code`,
  431. `ciq_main_ele`,
  432. `ciq_monitor_type`,
  433. `is_law`,
  434. `is_gift`,
  435. `cus_decl_ele`,
  436. `creater_sn`,
  437. `create_time`,
  438. `moder_sn`,
  439. `mod_time`,
  440. `tstm`,
  441. `ex_field`,
  442. `ex_field2`,
  443. `ex_field3`,
  444. `ex_field4`,
  445. `ex_field5`,
  446. `legal_unit1_qty`,
  447. `net_weight`,
  448. `legal_unit2_qty`,
  449. `gross_weight`,
  450. `local_ems_no`,
  451. `item_record_no`,
  452. `is_send`,
  453. `ems_class_code`,
  454. `up_img`,
  455. `down_img`,
  456. `left_img`,
  457. `right_img`,
  458. `before_img`,
  459. `after_img`,
  460. `send_time`,
  461. `oms_audit_status`,
  462. `oms_audit_remark`,
  463. `oms_callback_time`,
  464. `batch_no`,
  465. `oms_audit_time`,
  466. `status`
  467. from mall_goods_product
  468. where prod_barcode = #{barCode}
  469. </select>
  470. <insert id="save" parameterType="com.kmall.admin.entity.GoodsProductEntity">
  471. insert into mall_goods_product(
  472. `mall_goods_product_sn`,
  473. `merch_sn`,
  474. `third_merch_sn`,
  475. `prod_barcode`,
  476. `sku`,
  477. `cus_goods_code`,
  478. `prod_name`,
  479. `prod_ename`,
  480. `prod_record_name`,
  481. `prod_record_ename`,
  482. `ciq_prod_model`,
  483. `prod_brand`,
  484. `ori_cnt_code`,
  485. `unit_code`,
  486. `decl_price`,
  487. `decl_currency_code`,
  488. `supplier_name`,
  489. `supplier_cnt_code`,
  490. `prod_comp_name`,
  491. `prod_comp_cnt_code`,
  492. `ciq_main_ele`,
  493. `ciq_monitor_type`,
  494. `is_law`,
  495. `is_gift`,
  496. `cus_decl_ele`,
  497. `creater_sn`,
  498. `create_time`,
  499. `moder_sn`,
  500. `mod_time`,
  501. `tstm`,
  502. `ex_field`,
  503. `ex_field2`,
  504. `ex_field3`,
  505. `ex_field4`,
  506. `ex_field5`,
  507. `legal_unit1_qty`,
  508. `net_weight`,
  509. `legal_unit2_qty`,
  510. `gross_weight`,
  511. `local_ems_no`,
  512. `item_record_no`,
  513. `is_send`,
  514. `ems_class_code`,
  515. `up_img`,
  516. `down_img`,
  517. `left_img`,
  518. `right_img`,
  519. `before_img`,
  520. `after_img`,
  521. `batch_no`,
  522. `status`)
  523. values(
  524. #{mallGoodsProductSn},
  525. #{merchSn},
  526. #{thirdMerchSn},
  527. #{prodBarcode},
  528. #{sku},
  529. #{cusGoodsCode},
  530. #{prodName},
  531. #{prodEname},
  532. #{prodRecordName},
  533. #{prodRecordEname},
  534. #{ciqProdModel},
  535. #{prodBrand},
  536. #{oriCntCode},
  537. #{unitCode},
  538. #{declPrice},
  539. #{declCurrencyCode},
  540. #{supplierName},
  541. #{supplierCntCode},
  542. #{prodCompName},
  543. #{prodCompCntCode},
  544. #{ciqMainEle},
  545. #{ciqMonitorType},
  546. #{isLaw},
  547. #{isGift},
  548. #{cusDeclEle},
  549. #{createrSn},
  550. #{createTime},
  551. #{moderSn},
  552. #{modTime},
  553. #{tstm},
  554. #{exField},
  555. #{exField2},
  556. #{exField3},
  557. #{exField4},
  558. #{exField5},
  559. #{legalUnit1Qty},
  560. #{netWeight},
  561. #{legalUnit2Qty},
  562. #{grossWeight},
  563. #{localEmsNo},
  564. #{itemRecordNo},
  565. '0',
  566. #{emsClassCode},
  567. #{upImg},
  568. #{downImg},
  569. #{leftImg},
  570. #{rightImg},
  571. #{beforeImg},
  572. #{afterImg},
  573. #{batchNo},
  574. #{status})
  575. </insert>
  576. <update id="update" parameterType="com.kmall.admin.entity.GoodsProductEntity">
  577. update mall_goods_product
  578. <set>
  579. <if test="merchSn != null">`merch_sn` = #{merchSn}, </if>
  580. <if test="thirdMerchSn != null">`third_merch_sn` = #{thirdMerchSn}, </if>
  581. <if test="prodBarcode != null">`prod_barcode` = #{prodBarcode}, </if>
  582. <if test="sku != null">`sku` = #{sku}, </if>
  583. <if test="cusGoodsCode != null">`cus_goods_code` = #{cusGoodsCode}, </if>
  584. <if test="prodName != null">`prod_name` = #{prodName}, </if>
  585. <if test="prodEname != null">`prod_ename` = #{prodEname}, </if>
  586. <if test="prodRecordName != null">`prod_record_name` = #{prodRecordName}, </if>
  587. <if test="prodRecordEname != null">`prod_record_ename` = #{prodRecordEname}, </if>
  588. <if test="ciqProdModel != null">`ciq_prod_model` = #{ciqProdModel}, </if>
  589. <if test="prodBrand != null">`prod_brand` = #{prodBrand}, </if>
  590. <if test="oriCntCode != null">`ori_cnt_code` = #{oriCntCode}, </if>
  591. <if test="unitCode != null">`unit_code` = #{unitCode}, </if>
  592. <if test="declPrice != null">`decl_price` = #{declPrice}, </if>
  593. <if test="declCurrencyCode != null">`decl_currency_code` = #{declCurrencyCode}, </if>
  594. <if test="supplierName != null">`supplier_name` = #{supplierName}, </if>
  595. <if test="supplierCntCode != null">`supplier_cnt_code` = #{supplierCntCode}, </if>
  596. <if test="prodCompName != null">`prod_comp_name` = #{prodCompName}, </if>
  597. <if test="prodCompCntCode != null">`prod_comp_cnt_code` = #{prodCompCntCode}, </if>
  598. <if test="ciqMainEle != null">`ciq_main_ele` = #{ciqMainEle}, </if>
  599. <if test="ciqMonitorType != null">`ciq_monitor_type` = #{ciqMonitorType}, </if>
  600. <if test="isLaw != null">`is_law` = #{isLaw}, </if>
  601. <if test="isGift != null">`is_gift` = #{isGift}, </if>
  602. <if test="cusDeclEle != null">`cus_decl_ele` = #{cusDeclEle}, </if>
  603. <if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
  604. <if test="createTime != null">`create_time` = #{createTime}, </if>
  605. <if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
  606. <if test="modTime != null">`mod_time` = #{modTime}, </if>
  607. <if test="tstm != null">`tstm` = #{tstm}, </if>
  608. <if test="exField != null">`ex_field` = #{exField}, </if>
  609. <if test="exField2 != null">`ex_field2` = #{exField2}, </if>
  610. <if test="exField3 != null">`ex_field3` = #{exField3}, </if>
  611. <if test="exField4 != null">`ex_field4` = #{exField4}, </if>
  612. <if test="exField5 != null">`ex_field5` = #{exField5}, </if>
  613. <if test="legalUnit1Qty != null">`legal_unit1_qty` = #{legalUnit1Qty}, </if>
  614. <if test="netWeight != null">`net_weight` = #{netWeight}, </if>
  615. <if test="legalUnit2Qty != null">`legal_unit2_qty` = #{legalUnit2Qty}, </if>
  616. <if test="grossWeight != null">`gross_weight` = #{grossWeight}, </if>
  617. <if test="localEmsNo != null">`local_ems_no` = #{localEmsNo}, </if>
  618. <if test="itemRecordNo != null">`item_record_no` = #{itemRecordNo}, </if>
  619. <if test="isSend != null">`is_send` = #{isSend}, </if>
  620. <if test="emsClassCode != null">`ems_class_code` = #{emsClassCode},</if>
  621. <if test="upImg != null">`up_img` = #{upImg},</if>
  622. <if test="downImg != null">`down_img` = #{downImg},</if>
  623. <if test="leftImg != null">`left_img` = #{leftImg},</if>
  624. <if test="rightImg != null">`right_img` = #{rightImg},</if>
  625. <if test="beforeImg != null">`before_img` = #{beforeImg},</if>
  626. <if test="afterImg != null">`after_img` = #{afterImg},</if>
  627. <if test="sendTime != null">`send_time` = #{sendTime}, </if>
  628. <if test="omsAuditStatus != null">`oms_audit_status` = #{omsAuditStatus}, </if>
  629. <if test="omsAuditRemark != null">`oms_audit_remark` = #{omsAuditRemark}, </if>
  630. <if test="omsAuditTime != null">`oms_audit_time` = #{omsAuditTime}, </if>
  631. <if test="omsCallbackTime != null">`oms_callback_time` = #{omsCallbackTime}, </if>
  632. <if test="status != null">`status` = #{status}, </if>
  633. </set>
  634. where mall_goods_product_sn = #{mallGoodsProductSn}
  635. </update>
  636. <update id="updateStatusBySkuBatch" parameterType="map">
  637. update mall_goods_product
  638. <set>
  639. <if test="map.isLaw != null">`is_law` = #{map.isLaw}, </if>
  640. <if test="map.isGift != null">`is_gift` = #{map.isGift}, </if>
  641. <if test="map.moderSn != null">`moder_sn` = #{map.moderSn}, </if>
  642. <if test="map.modTime != null">`mod_time` = #{map.modTime}, </if>
  643. <if test="map.tstm != null">`tstm` = #{map.tstm}, </if>
  644. <if test="map.exField != null">`ex_field` = #{map.exField}, </if>
  645. <if test="map.exField2 != null">`ex_field2` = #{map.exField2}, </if>
  646. <if test="map.exField3 != null">`ex_field3` = #{map.exField3}, </if>
  647. <if test="map.exField4 != null">`ex_field4` = #{map.exField4}, </if>
  648. <if test="map.exField5 != null">`ex_field5` = #{map.exField5}, </if>
  649. <if test="map.isSend != null">`is_send` = #{map.isSend}, </if>
  650. <if test="map.sendTime != null">`send_time` = #{map.sendTime}, </if>
  651. <if test="map.omsAuditStatus != null">`oms_audit_status` = #{map.omsAuditStatus}, </if>
  652. <if test="map.omsAuditRemark != null">`oms_audit_remark` = #{map.omsAuditRemark}, </if>
  653. <if test="map.omsAuditTime != null">`oms_audit_time` = #{map.omsAuditTime}, </if>
  654. <if test="map.omsCallbackTime != null">`oms_callback_time` = #{map.omsCallbackTime}, </if>
  655. <if test="map.status != null">`status` = #{map.status}, </if>
  656. <if test="map.updateStatusMode != null and map.updateStatusMode == 1 ">
  657. `status` =
  658. <if test="map.isSend == 1">
  659. case status
  660. when '00' then '02'
  661. when '01' then '02'
  662. when '10' then '12'
  663. when '11' then '12'
  664. else '99' end
  665. </if>
  666. <if test="map.isSend == 2">
  667. case status
  668. when '00' then '01'
  669. when '01' then '01'
  670. when '10' then '11'
  671. when '11' then '11'
  672. else '99' end
  673. </if>
  674. ,
  675. </if>
  676. <if test="map.updateStatusMode != null and map.updateStatusMode == 2 ">
  677. `status` =
  678. <if test="map.omsAuditStatus == 2">
  679. case status
  680. when '02' then '21'
  681. when '12' then '21'
  682. else '88' end
  683. </if>
  684. <if test="map.omsAuditStatus == 3">
  685. case status
  686. when '02' then '03'
  687. when '12' then '23'
  688. else '88' end
  689. </if>
  690. ,
  691. </if>
  692. </set>
  693. where sku in
  694. <foreach collection="list" item="sku" open="(" separator="," close=")">
  695. #{sku}
  696. </foreach>
  697. </update>
  698. <delete id="delete">
  699. delete from mall_goods_product where mall_goods_product_sn = #{value}
  700. </delete>
  701. <delete id="deleteBatch">
  702. delete from mall_goods_product where mall_goods_product_sn in
  703. <foreach item="mallGoodsProductSn" collection="array" open="(" separator="," close=")">
  704. #{mallGoodsProductSn}
  705. </foreach>
  706. </delete>
  707. </mapper>