1
0

GoodsProductDao.xml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866
  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. <if test="prodBarcode != null and prodBarcode.trim() != ''">
  281. AND prod_barcode = #{prodBarcode}
  282. </if>
  283. </select>
  284. <select id="selectByMallGoodsProductSns" resultType="com.kmall.admin.entity.GoodsProductEntity">
  285. select
  286. `mall_goods_product_sn`,
  287. `merch_sn`,
  288. `third_merch_sn`,
  289. `prod_barcode`,
  290. `sku`,
  291. `cus_goods_code`,
  292. `prod_name`,
  293. `prod_ename`,
  294. `prod_record_name`,
  295. `prod_record_ename`,
  296. `ciq_prod_model`,
  297. `prod_brand`,
  298. `ori_cnt_code`,
  299. `unit_code`,
  300. `decl_price`,
  301. `decl_currency_code`,
  302. `supplier_name`,
  303. `supplier_cnt_code`,
  304. `prod_comp_name`,
  305. `prod_comp_cnt_code`,
  306. `ciq_main_ele`,
  307. `ciq_monitor_type`,
  308. `is_law`,
  309. `is_gift`,
  310. `cus_decl_ele`,
  311. `creater_sn`,
  312. `create_time`,
  313. `moder_sn`,
  314. `mod_time`,
  315. `tstm`,
  316. `ex_field`,
  317. `ex_field2`,
  318. `ex_field3`,
  319. `ex_field4`,
  320. `ex_field5`,
  321. `legal_unit1_qty`,
  322. `net_weight`,
  323. `legal_unit2_qty`,
  324. `gross_weight`,
  325. `local_ems_no`,
  326. `item_record_no`,
  327. `is_send`,
  328. `ems_class_code`,
  329. `up_img`,
  330. `down_img`,
  331. `left_img`,
  332. `right_img`,
  333. `before_img`,
  334. `after_img`,
  335. `send_time`,
  336. `oms_audit_status`,
  337. `oms_audit_remark`,
  338. `oms_callback_time`,
  339. `batch_no`,
  340. `oms_audit_time`,
  341. `status`
  342. from mall_goods_product
  343. WHERE 1=1
  344. <if test="mallGoodsProductSns != null">
  345. AND mall_goods_product_sn in
  346. <foreach item="id" collection="mallGoodsProductSns" open="(" separator="," close=")">
  347. #{id}
  348. </foreach>
  349. </if>
  350. </select>
  351. <select id="selectBySku" resultType="com.kmall.admin.entity.GoodsProductEntity">
  352. select
  353. `mall_goods_product_sn`,
  354. `merch_sn`,
  355. `third_merch_sn`,
  356. `prod_barcode`,
  357. `sku`,
  358. `cus_goods_code`,
  359. `prod_name`,
  360. `prod_ename`,
  361. `prod_record_name`,
  362. `prod_record_ename`,
  363. `ciq_prod_model`,
  364. `prod_brand`,
  365. `ori_cnt_code`,
  366. `unit_code`,
  367. `decl_price`,
  368. `decl_currency_code`,
  369. `supplier_name`,
  370. `supplier_cnt_code`,
  371. `prod_comp_name`,
  372. `prod_comp_cnt_code`,
  373. `ciq_main_ele`,
  374. `ciq_monitor_type`,
  375. `is_law`,
  376. `is_gift`,
  377. `cus_decl_ele`,
  378. `creater_sn`,
  379. `create_time`,
  380. `moder_sn`,
  381. `mod_time`,
  382. `tstm`,
  383. `ex_field`,
  384. `ex_field2`,
  385. `ex_field3`,
  386. `ex_field4`,
  387. `ex_field5`,
  388. `legal_unit1_qty`,
  389. `net_weight`,
  390. `legal_unit2_qty`,
  391. `gross_weight`,
  392. `local_ems_no`,
  393. `item_record_no`,
  394. `is_send`,
  395. `ems_class_code`,
  396. `up_img`,
  397. `down_img`,
  398. `left_img`,
  399. `right_img`,
  400. `before_img`,
  401. `after_img`,
  402. `send_time`,
  403. `oms_audit_status`,
  404. `oms_audit_remark`,
  405. `oms_callback_time`,
  406. `batch_no`,
  407. `oms_audit_time`,
  408. `status`
  409. from mall_goods_product
  410. where sku = #{sku}
  411. </select>
  412. <select id="selectByBarcode" resultType="com.kmall.admin.entity.GoodsProductEntity">
  413. select
  414. `mall_goods_product_sn`,
  415. `merch_sn`,
  416. `third_merch_sn`,
  417. `prod_barcode`,
  418. `sku`,
  419. `cus_goods_code`,
  420. `prod_name`,
  421. `prod_ename`,
  422. `prod_record_name`,
  423. `prod_record_ename`,
  424. `ciq_prod_model`,
  425. `prod_brand`,
  426. `ori_cnt_code`,
  427. `unit_code`,
  428. `decl_price`,
  429. `decl_currency_code`,
  430. `supplier_name`,
  431. `supplier_cnt_code`,
  432. `prod_comp_name`,
  433. `prod_comp_cnt_code`,
  434. `ciq_main_ele`,
  435. `ciq_monitor_type`,
  436. `is_law`,
  437. `is_gift`,
  438. `cus_decl_ele`,
  439. `creater_sn`,
  440. `create_time`,
  441. `moder_sn`,
  442. `mod_time`,
  443. `tstm`,
  444. `ex_field`,
  445. `ex_field2`,
  446. `ex_field3`,
  447. `ex_field4`,
  448. `ex_field5`,
  449. `legal_unit1_qty`,
  450. `net_weight`,
  451. `legal_unit2_qty`,
  452. `gross_weight`,
  453. `local_ems_no`,
  454. `item_record_no`,
  455. `is_send`,
  456. `ems_class_code`,
  457. `up_img`,
  458. `down_img`,
  459. `left_img`,
  460. `right_img`,
  461. `before_img`,
  462. `after_img`,
  463. `send_time`,
  464. `oms_audit_status`,
  465. `oms_audit_remark`,
  466. `oms_callback_time`,
  467. `batch_no`,
  468. `oms_audit_time`,
  469. `status`
  470. from mall_goods_product
  471. where prod_barcode = #{barCode}
  472. </select>
  473. <insert id="save" parameterType="com.kmall.admin.entity.GoodsProductEntity">
  474. insert into mall_goods_product
  475. <trim prefix="(" suffix=")" suffixOverrides="," >
  476. <if test="merchSn != null">`merch_sn` , </if>
  477. <if test="thirdMerchSn != null">`third_merch_sn` , </if>
  478. <if test="prodBarcode != null">`prod_barcode` , </if>
  479. <if test="sku != null">`sku` , </if>
  480. <if test="cusGoodsCode != null">`cus_goods_code` , </if>
  481. <if test="prodName != null">`prod_name` , </if>
  482. <if test="prodEname != null">`prod_ename` , </if>
  483. <if test="prodRecordName != null">`prod_record_name` , </if>
  484. <if test="prodRecordEname != null">`prod_record_ename` , </if>
  485. <if test="ciqProdModel != null">`ciq_prod_model` , </if>
  486. <if test="prodBrand != null">`prod_brand` , </if>
  487. <if test="oriCntCode != null">`ori_cnt_code` , </if>
  488. <if test="unitCode != null">`unit_code` , </if>
  489. <if test="declPrice != null">`decl_price` , </if>
  490. <if test="declCurrencyCode != null">`decl_currency_code` , </if>
  491. <if test="supplierName != null">`supplier_name` , </if>
  492. <if test="supplierCntCode != null">`supplier_cnt_code` , </if>
  493. <if test="prodCompName != null">`prod_comp_name` , </if>
  494. <if test="prodCompCntCode != null">`prod_comp_cnt_code` , </if>
  495. <if test="ciqMainEle != null">`ciq_main_ele` , </if>
  496. <if test="ciqMonitorType != null">`ciq_monitor_type` , </if>
  497. <if test="isLaw != null">`is_law` , </if>
  498. <if test="isGift != null">`is_gift` , </if>
  499. <if test="cusDeclEle != null">`cus_decl_ele` , </if>
  500. <if test="createrSn != null">`creater_sn` , </if>
  501. <if test="createTime != null">`create_time` , </if>
  502. <if test="moderSn != null">`moder_sn` , </if>
  503. <if test="modTime != null">`mod_time`, </if>
  504. <if test="tstm != null">`tstm` , </if>
  505. <if test="exField != null">`ex_field` , </if>
  506. <if test="exField2 != null">`ex_field2` , </if>
  507. <if test="exField3 != null">`ex_field3` , </if>
  508. <if test="exField4 != null">`ex_field4` , </if>
  509. <if test="exField5 != null">`ex_field5` , </if>
  510. <if test="legalUnit1Qty != null">`legal_unit1_qty` , </if>
  511. <if test="netWeight != null">`net_weight` , </if>
  512. <if test="legalUnit2Qty != null">`legal_unit2_qty` , </if>
  513. <if test="grossWeight != null">`gross_weight` , </if>
  514. <if test="localEmsNo != null">`local_ems_no` , </if>
  515. <if test="itemRecordNo != null">`item_record_no` , </if>
  516. `is_send` ,
  517. <if test="emsClassCode != null">`ems_class_code` ,</if>
  518. <if test="upImg != null">`up_img` ,</if>
  519. <if test="downImg != null">`down_img` ,</if>
  520. <if test="leftImg != null">`left_img` ,</if>
  521. <if test="rightImg != null">`right_img`,</if>
  522. <if test="beforeImg != null">`before_img` ,</if>
  523. <if test="afterImg != null">`after_img` ,</if>
  524. <if test="sendTime != null">`send_time` , </if>
  525. <if test="omsAuditStatus != null">`oms_audit_status` , </if>
  526. <if test="omsAuditRemark != null">`oms_audit_remark` , </if>
  527. <if test="omsAuditTime != null">`oms_audit_time`, </if>
  528. <if test="omsCallbackTime != null">`oms_callback_time`, </if>
  529. <if test="status != null">`status` , </if>
  530. </trim>
  531. <trim prefix="values (" suffix=")" suffixOverrides="," >
  532. <if test="merchSn != null">#{merchSn}, </if>
  533. <if test="thirdMerchSn != null"> #{thirdMerchSn}, </if>
  534. <if test="prodBarcode != null"> #{prodBarcode}, </if>
  535. <if test="sku != null"> #{sku}, </if>
  536. <if test="cusGoodsCode != null"> #{cusGoodsCode}, </if>
  537. <if test="prodName != null"> #{prodName}, </if>
  538. <if test="prodEname != null"> #{prodEname}, </if>
  539. <if test="prodRecordName != null">#{prodRecordName}, </if>
  540. <if test="prodRecordEname != null"> #{prodRecordEname}, </if>
  541. <if test="ciqProdModel != null"> #{ciqProdModel}, </if>
  542. <if test="prodBrand != null"> #{prodBrand}, </if>
  543. <if test="oriCntCode != null"> #{oriCntCode}, </if>
  544. <if test="unitCode != null"> #{unitCode}, </if>
  545. <if test="declPrice != null"> #{declPrice}, </if>
  546. <if test="declCurrencyCode != null"> #{declCurrencyCode}, </if>
  547. <if test="supplierName != null"> #{supplierName}, </if>
  548. <if test="supplierCntCode != null"> #{supplierCntCode}, </if>
  549. <if test="prodCompName != null"> #{prodCompName}, </if>
  550. <if test="prodCompCntCode != null"> #{prodCompCntCode}, </if>
  551. <if test="ciqMainEle != null">#{ciqMainEle}, </if>
  552. <if test="ciqMonitorType != null"> #{ciqMonitorType}, </if>
  553. <if test="isLaw != null"> #{isLaw}, </if>
  554. <if test="isGift != null"> #{isGift}, </if>
  555. <if test="cusDeclEle != null"> #{cusDeclEle}, </if>
  556. <if test="createrSn != null"> #{createrSn}, </if>
  557. <if test="createTime != null"> #{createTime}, </if>
  558. <if test="moderSn != null"> #{moderSn}, </if>
  559. <if test="modTime != null"> #{modTime}, </if>
  560. <if test="tstm != null"> #{tstm}, </if>
  561. <if test="exField != null"> #{exField}, </if>
  562. <if test="exField2 != null"> #{exField2}, </if>
  563. <if test="exField3 != null"> #{exField3}, </if>
  564. <if test="exField4 != null"> #{exField4}, </if>
  565. <if test="exField5 != null"> #{exField5}, </if>
  566. <if test="legalUnit1Qty != null"> #{legalUnit1Qty}, </if>
  567. <if test="netWeight != null"> #{netWeight}, </if>
  568. <if test="legalUnit2Qty != null"> #{legalUnit2Qty}, </if>
  569. <if test="grossWeight != null"> #{grossWeight}, </if>
  570. <if test="localEmsNo != null"> #{localEmsNo}, </if>
  571. <if test="itemRecordNo != null"> #{itemRecordNo}, </if>
  572. '0' ,
  573. <if test="emsClassCode != null"> #{emsClassCode},</if>
  574. <if test="upImg != null"> #{upImg},</if>
  575. <if test="downImg != null"> #{downImg},</if>
  576. <if test="leftImg != null"> #{leftImg},</if>
  577. <if test="rightImg != null"> #{rightImg},</if>
  578. <if test="beforeImg != null"> #{beforeImg},</if>
  579. <if test="afterImg != null"> #{afterImg},</if>
  580. <if test="sendTime != null"> #{sendTime}, </if>
  581. <if test="omsAuditStatus != null"> #{omsAuditStatus}, </if>
  582. <if test="omsAuditRemark != null"> #{omsAuditRemark}, </if>
  583. <if test="omsAuditTime != null"> #{omsAuditTime}, </if>
  584. <if test="omsCallbackTime != null"> #{omsCallbackTime}, </if>
  585. <if test="status != null"> #{status}, </if>
  586. </trim>
  587. </insert>
  588. <insert id="saveBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
  589. insert into mall_goods_product(
  590. `merch_sn`,
  591. `third_merch_sn`,
  592. `prod_barcode`,
  593. `sku`,
  594. `batch_no`,
  595. `cus_goods_code`,
  596. `prod_name`,
  597. `prod_ename`,
  598. `prod_record_name`,
  599. `ciq_prod_model`,
  600. `prod_brand`,
  601. `ori_cnt_code`,
  602. `unit_code`,
  603. `decl_price`,
  604. `decl_currency_code`,
  605. `supplier_name`,
  606. `supplier_cnt_code`,
  607. `prod_comp_name`,
  608. `prod_comp_cnt_code`,
  609. `ciq_main_ele`,
  610. `ciq_monitor_type`,
  611. `is_law`,
  612. `is_gift`,
  613. `cus_decl_ele`,
  614. `creater_sn`,
  615. `create_time`,
  616. `net_weight`,
  617. `gross_weight`,
  618. `is_send`,
  619. `ems_class_code`,
  620. `status`
  621. )
  622. values
  623. <foreach collection="list" index="index" item="item" separator=",">
  624. (
  625. #{item.merchSn},
  626. #{item.thirdMerchSn},
  627. #{item.prodBarcode},
  628. #{item.sku},
  629. #{item.batchNo},
  630. #{item.cusGoodsCode},
  631. #{item.prodName},
  632. #{item.prodEname},
  633. #{item.prodRecordName},
  634. #{item.ciqProdModel},
  635. #{item.prodBrand},
  636. #{item.oriCntCode},
  637. #{item.unitCode},
  638. #{item.declPrice},
  639. #{item.declCurrencyCode},
  640. #{item.supplierName},
  641. #{item.supplierCntCode},
  642. #{item.prodCompName},
  643. #{item.prodCompCntCode},
  644. #{item.ciqMainEle},
  645. #{item.ciqMonitorType},
  646. #{item.isLaw},
  647. #{item.isGift},
  648. #{item.cusDeclEle},
  649. #{item.createrSn},
  650. #{item.createTime},
  651. #{item.netWeight},
  652. #{item.grossWeight},
  653. '0',
  654. #{item.emsClassCode},
  655. #{item.status}
  656. )
  657. </foreach>
  658. </insert>
  659. <update id="update" parameterType="com.kmall.admin.entity.GoodsProductEntity">
  660. update mall_goods_product
  661. <set>
  662. <if test="merchSn != null">`merch_sn` = #{merchSn}, </if>
  663. <if test="thirdMerchSn != null">`third_merch_sn` = #{thirdMerchSn}, </if>
  664. <if test="prodBarcode != null">`prod_barcode` = #{prodBarcode}, </if>
  665. <if test="sku != null">`sku` = #{sku}, </if>
  666. <if test="cusGoodsCode != null">`cus_goods_code` = #{cusGoodsCode}, </if>
  667. <if test="prodName != null">`prod_name` = #{prodName}, </if>
  668. <if test="prodEname != null">`prod_ename` = #{prodEname}, </if>
  669. <if test="prodRecordName != null">`prod_record_name` = #{prodRecordName}, </if>
  670. <if test="prodRecordEname != null">`prod_record_ename` = #{prodRecordEname}, </if>
  671. <if test="ciqProdModel != null">`ciq_prod_model` = #{ciqProdModel}, </if>
  672. <if test="prodBrand != null">`prod_brand` = #{prodBrand}, </if>
  673. <if test="oriCntCode != null">`ori_cnt_code` = #{oriCntCode}, </if>
  674. <if test="unitCode != null">`unit_code` = #{unitCode}, </if>
  675. <if test="declPrice != null">`decl_price` = #{declPrice}, </if>
  676. <if test="declCurrencyCode != null">`decl_currency_code` = #{declCurrencyCode}, </if>
  677. <if test="supplierName != null">`supplier_name` = #{supplierName}, </if>
  678. <if test="supplierCntCode != null">`supplier_cnt_code` = #{supplierCntCode}, </if>
  679. <if test="prodCompName != null">`prod_comp_name` = #{prodCompName}, </if>
  680. <if test="prodCompCntCode != null">`prod_comp_cnt_code` = #{prodCompCntCode}, </if>
  681. <if test="ciqMainEle != null">`ciq_main_ele` = #{ciqMainEle}, </if>
  682. <if test="ciqMonitorType != null">`ciq_monitor_type` = #{ciqMonitorType}, </if>
  683. <if test="isLaw != null">`is_law` = #{isLaw}, </if>
  684. <if test="isGift != null">`is_gift` = #{isGift}, </if>
  685. <if test="cusDeclEle != null">`cus_decl_ele` = #{cusDeclEle}, </if>
  686. <if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
  687. <if test="createTime != null">`create_time` = #{createTime}, </if>
  688. <if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
  689. <if test="modTime != null">`mod_time` = #{modTime}, </if>
  690. <if test="tstm != null">`tstm` = #{tstm}, </if>
  691. <if test="exField != null">`ex_field` = #{exField}, </if>
  692. <if test="exField2 != null">`ex_field2` = #{exField2}, </if>
  693. <if test="exField3 != null">`ex_field3` = #{exField3}, </if>
  694. <if test="exField4 != null">`ex_field4` = #{exField4}, </if>
  695. <if test="exField5 != null">`ex_field5` = #{exField5}, </if>
  696. <if test="legalUnit1Qty != null">`legal_unit1_qty` = #{legalUnit1Qty}, </if>
  697. <if test="netWeight != null">`net_weight` = #{netWeight}, </if>
  698. <if test="legalUnit2Qty != null">`legal_unit2_qty` = #{legalUnit2Qty}, </if>
  699. <if test="grossWeight != null">`gross_weight` = #{grossWeight}, </if>
  700. <if test="localEmsNo != null">`local_ems_no` = #{localEmsNo}, </if>
  701. <if test="itemRecordNo != null">`item_record_no` = #{itemRecordNo}, </if>
  702. <if test="isSend != null">`is_send` = #{isSend}, </if>
  703. <if test="emsClassCode != null">`ems_class_code` = #{emsClassCode},</if>
  704. <if test="upImg != null">`up_img` = #{upImg},</if>
  705. <if test="downImg != null">`down_img` = #{downImg},</if>
  706. <if test="leftImg != null">`left_img` = #{leftImg},</if>
  707. <if test="rightImg != null">`right_img` = #{rightImg},</if>
  708. <if test="beforeImg != null">`before_img` = #{beforeImg},</if>
  709. <if test="afterImg != null">`after_img` = #{afterImg},</if>
  710. <if test="sendTime != null">`send_time` = #{sendTime}, </if>
  711. <if test="omsAuditStatus != null">`oms_audit_status` = #{omsAuditStatus}, </if>
  712. <if test="omsAuditRemark != null">`oms_audit_remark` = #{omsAuditRemark}, </if>
  713. <if test="omsAuditTime != null">`oms_audit_time` = #{omsAuditTime}, </if>
  714. <if test="omsCallbackTime != null">`oms_callback_time` = #{omsCallbackTime}, </if>
  715. <if test="status != null">`status` = #{status}, </if>
  716. </set>
  717. where mall_goods_product_sn = #{mallGoodsProductSn}
  718. </update>
  719. <update id="updateBatch" parameterType="java.util.List">
  720. <foreach collection="list" item="item" index="index" open="" close="" separator=";">
  721. update mall_goods_product
  722. <set>
  723. <if test="item.merchSn != null">`merch_sn` = #{item.merchSn}, </if>
  724. <if test="item.thirdMerchSn != null">`third_merch_sn` = #{item.thirdMerchSn}, </if>
  725. <if test="item.prodBarcode != null">`prod_barcode` = #{item.prodBarcode}, </if>
  726. <if test="item.sku != null">`sku` = #{item.sku}, </if>
  727. <if test="item.cusGoodsCode != null">`cus_goods_code` = #{item.cusGoodsCode}, </if>
  728. <if test="item.prodName != null">`prod_name` = #{item.prodName}, </if>
  729. <if test="item.prodEname != null">`prod_ename` = #{item.prodEname}, </if>
  730. <if test="item.prodRecordName != null">`prod_record_name` = #{item.prodRecordName}, </if>
  731. <if test="item.prodRecordEname != null">`prod_record_ename` = #{item.prodRecordEname}, </if>
  732. <if test="item.ciqProdModel != null">`ciq_prod_model` = #{item.ciqProdModel}, </if>
  733. <if test="item.prodBrand != null">`prod_brand` = #{item.prodBrand}, </if>
  734. <if test="item.oriCntCode != null">`ori_cnt_code` = #{item.oriCntCode}, </if>
  735. <if test="item.unitCode != null">`unit_code` = #{item.unitCode}, </if>
  736. <if test="item.declPrice != null">`decl_price` = #{item.declPrice}, </if>
  737. <if test="item.declCurrencyCode != null">`decl_currency_code` = #{item.declCurrencyCode}, </if>
  738. <if test="item.supplierName != null">`supplier_name` = #{item.supplierName}, </if>
  739. <if test="item.supplierCntCode != null">`supplier_cnt_code` = #{item.supplierCntCode}, </if>
  740. <if test="item.prodCompName != null">`prod_comp_name` = #{item.prodCompName}, </if>
  741. <if test="item.prodCompCntCode != null">`prod_comp_cnt_code` = #{item.prodCompCntCode}, </if>
  742. <if test="item.ciqMainEle != null">`ciq_main_ele` = #{item.ciqMainEle}, </if>
  743. <if test="item.ciqMonitorType != null">`ciq_monitor_type` = #{item.ciqMonitorType}, </if>
  744. <if test="item.isLaw != null">`is_law` = #{item.isLaw}, </if>
  745. <if test="item.isGift != null">`is_gift` = #{item.isGift}, </if>
  746. <if test="item.cusDeclEle != null">`cus_decl_ele` = #{item.cusDeclEle}, </if>
  747. <if test="item.createrSn != null">`creater_sn` = #{item.createrSn}, </if>
  748. <if test="item.createTime != null">`create_time` = #{item.createTime}, </if>
  749. <if test="item.moderSn != null">`moder_sn` = #{item.moderSn}, </if>
  750. <if test="item.modTime != null">`mod_time` = #{item.modTime}, </if>
  751. <if test="item.tstm != null">`tstm` = #{item.tstm}, </if>
  752. <if test="item.exField != null">`ex_field` = #{item.exField}, </if>
  753. <if test="item.exField2 != null">`ex_field2` = #{item.exField2}, </if>
  754. <if test="item.exField3 != null">`ex_field3` = #{item.exField3}, </if>
  755. <if test="item.exField4 != null">`ex_field4` = #{item.exField4}, </if>
  756. <if test="item.exField5 != null">`ex_field5` = #{item.exField5}, </if>
  757. <if test="item.legalUnit1Qty != null">`legal_unit1_qty` = #{item.legalUnit1Qty}, </if>
  758. <if test="item.netWeight != null">`net_weight` = #{item.netWeight}, </if>
  759. <if test="item.legalUnit2Qty != null">`legal_unit2_qty` = #{item.legalUnit2Qty}, </if>
  760. <if test="item.grossWeight != null">`gross_weight` = #{item.grossWeight}, </if>
  761. <if test="item.localEmsNo != null">`local_ems_no` = #{item.localEmsNo}, </if>
  762. <if test="item.itemRecordNo != null">`item_record_no` = #{item.itemRecordNo}, </if>
  763. <if test="item.isSend != null">`is_send` = #{item.isSend}, </if>
  764. <if test="item.emsClassCode != null">`ems_class_code` = #{item.emsClassCode},</if>
  765. <if test="item.upImg != null">`up_img` = #{item.upImg},</if>
  766. <if test="item.downImg != null">`down_img` = #{item.downImg},</if>
  767. <if test="item.leftImg != null">`left_img` = #{item.leftImg},</if>
  768. <if test="item.rightImg != null">`right_img` = #{item.rightImg},</if>
  769. <if test="item.beforeImg != null">`before_img` = #{item.beforeImg},</if>
  770. <if test="item.afterImg != null">`after_img` = #{item.afterImg},</if>
  771. <if test="item.sendTime != null">`send_time` = #{item.sendTime}, </if>
  772. <if test="item.omsAuditStatus != null">`oms_audit_status` = #{item.omsAuditStatus}, </if>
  773. <if test="item.omsAuditRemark != null">`oms_audit_remark` = #{item.omsAuditRemark}, </if>
  774. <if test="item.omsAuditTime != null">`oms_audit_time` = #{item.omsAuditTime}, </if>
  775. <if test="item.omsCallbackTime != null">`oms_callback_time` = #{item.omsCallbackTime}, </if>
  776. <if test="item.status != null">`status` = #{item.status}, </if>
  777. </set>
  778. where mall_goods_product_sn = #{item.mallGoodsProductSn}
  779. </foreach>
  780. </update>
  781. <update id="updateStatusBySkuBatch" parameterType="map">
  782. update mall_goods_product
  783. <set>
  784. <if test="map.isLaw != null">`is_law` = #{map.isLaw}, </if>
  785. <if test="map.isGift != null">`is_gift` = #{map.isGift}, </if>
  786. <if test="map.moderSn != null">`moder_sn` = #{map.moderSn}, </if>
  787. <if test="map.modTime != null">`mod_time` = #{map.modTime}, </if>
  788. <if test="map.tstm != null">`tstm` = #{map.tstm}, </if>
  789. <if test="map.exField != null">`ex_field` = #{map.exField}, </if>
  790. <if test="map.exField2 != null">`ex_field2` = #{map.exField2}, </if>
  791. <if test="map.exField3 != null">`ex_field3` = #{map.exField3}, </if>
  792. <if test="map.exField4 != null">`ex_field4` = #{map.exField4}, </if>
  793. <if test="map.exField5 != null">`ex_field5` = #{map.exField5}, </if>
  794. <if test="map.isSend != null">`is_send` = #{map.isSend}, </if>
  795. <if test="map.sendTime != null">`send_time` = #{map.sendTime}, </if>
  796. <if test="map.omsAuditStatus != null">`oms_audit_status` = #{map.omsAuditStatus}, </if>
  797. <if test="map.omsAuditRemark != null">`oms_audit_remark` = #{map.omsAuditRemark}, </if>
  798. <if test="map.omsAuditTime != null">`oms_audit_time` = #{map.omsAuditTime}, </if>
  799. <if test="map.omsCallbackTime != null">`oms_callback_time` = #{map.omsCallbackTime}, </if>
  800. <if test="map.status != null">`status` = #{map.status}, </if>
  801. <if test="map.updateStatusMode != null and map.updateStatusMode == 1 ">
  802. `status` =
  803. <if test="map.isSend == 1">
  804. case status
  805. when '00' then '02'
  806. when '01' then '02'
  807. when '10' then '12'
  808. when '11' then '12'
  809. else '99' end
  810. </if>
  811. <if test="map.isSend == 2">
  812. case status
  813. when '00' then '01'
  814. when '01' then '01'
  815. when '10' then '11'
  816. when '11' then '11'
  817. else '99' end
  818. </if>
  819. ,
  820. </if>
  821. <if test="map.updateStatusMode != null and map.updateStatusMode == 2 ">
  822. `status` =
  823. <if test="map.omsAuditStatus == 2">
  824. case status
  825. when '02' then '21'
  826. when '12' then '21'
  827. else '88' end
  828. </if>
  829. <if test="map.omsAuditStatus == 3">
  830. case status
  831. when '02' then '03'
  832. when '12' then '13'
  833. else '88' end
  834. </if>
  835. ,
  836. </if>
  837. </set>
  838. where sku in
  839. <foreach collection="list" item="sku" open="(" separator="," close=")">
  840. #{sku}
  841. </foreach>
  842. </update>
  843. <delete id="delete">
  844. delete from mall_goods_product where mall_goods_product_sn = #{value}
  845. </delete>
  846. <delete id="deleteBatch">
  847. delete from mall_goods_product where mall_goods_product_sn in
  848. <foreach item="mallGoodsProductSn" collection="array" open="(" separator="," close=")">
  849. #{mallGoodsProductSn}
  850. </foreach>
  851. </delete>
  852. </mapper>