SDdglOrderStoreMapper.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  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="SDdglOrderStoreMapper" >
  4. <!-- 通用查询映射结果 -->
  5. <select id="selectSDdglOrderStoreList" parameterType="pd" resultType="pd">
  6. select * from s_ddgl_order_store where 1=1
  7. <if test="id !=null and id !='' ">
  8. and id = #{id}
  9. </if>
  10. <if test="orderId !=null and orderId !='' ">
  11. and orderId = #{orderId}
  12. </if>
  13. <if test="deliveryType !=null and deliveryType !='' ">
  14. and deliveryType = #{deliveryType}
  15. </if>
  16. <if test="mobileNumber !=null and mobileNumber !='' ">
  17. and mobileNumber = #{mobileNumber}
  18. </if>
  19. <if test="channelName !=null and channelName !='' ">
  20. and channelName = #{channelName}
  21. </if>
  22. <if test="channelOrderNo !=null and channelOrderNo !='' ">
  23. and channelOrderNo = #{channelOrderNo}
  24. </if>
  25. <if test="psoSaleOrderNo !=null and psoSaleOrderNo !='' ">
  26. and psoSaleOrderNo = #{psoSaleOrderNo}
  27. </if>
  28. <if test="orderStatus !=null and orderStatus !='' ">
  29. and orderStatus = #{orderStatus}
  30. </if>
  31. <if test="deliveryStatus !=null and deliveryStatus !='' ">
  32. and deliveryStatus = #{deliveryStatus}
  33. </if>
  34. <if test="orderDate !=null and orderDate !='' ">
  35. and orderDate = #{orderDate}
  36. </if>
  37. <if test="beginTime != null and beginTime!='' and endTime != null and endTime!=''">
  38. and orderDate between #{beginTime} and #{endTime}
  39. </if>
  40. <if test="storeName !=null and storeName !='' ">
  41. and storeName = #{storeName}
  42. </if>
  43. <if test="consumptionTime !=null and consumptionTime !='' ">
  44. and consumptionTime = #{consumptionTime}
  45. </if>
  46. <if test="memberId !=null and memberId !='' ">
  47. and memberId = #{memberId}
  48. </if>
  49. <if test="memberName !=null and memberName !='' ">
  50. and memberName = #{memberName}
  51. </if>
  52. <if test="systemLoginUserId !=null and systemLoginUserId !='' ">
  53. and systemLoginUserId = #{systemLoginUserId}
  54. </if>
  55. <if test="orderPlacer !=null and orderPlacer !='' ">
  56. and orderPlacer = #{orderPlacer}
  57. </if>
  58. <if test="orderTime !=null and orderTime !='' ">
  59. and orderTime = #{orderTime}
  60. </if>
  61. <if test="settlementId !=null and settlementId !='' ">
  62. and settlementId = #{settlementId}
  63. </if>
  64. <if test="settlementCode !=null and settlementCode !='' ">
  65. and settlementCode = #{settlementCode}
  66. </if>
  67. <if test="finalPaymentTime !=null and finalPaymentTime !='' ">
  68. and finalPaymentTime = #{finalPaymentTime}
  69. </if>
  70. <if test="totalDrugQuantity !=null and totalDrugQuantity !='' ">
  71. and totalDrugQuantity = #{totalDrugQuantity}
  72. </if>
  73. <if test="cardNumber !=null and cardNumber !='' ">
  74. and cardNumber = #{cardNumber}
  75. </if>
  76. <if test="shippingAddress !=null and shippingAddress !='' ">
  77. and shippingAddress = #{shippingAddress}
  78. </if>
  79. <if test="orderAddress !=null and orderAddress !='' ">
  80. and orderAddress = #{orderAddress}
  81. </if>
  82. <if test="orderType !=null and orderType !='' ">
  83. and orderType = #{orderType}
  84. </if>
  85. <if test="orderSource !=null and orderSource !='' ">
  86. and orderSource = #{orderSource}
  87. </if>
  88. <if test="totalAmount !=null and totalAmount !='' ">
  89. and totalAmount = #{totalAmount}
  90. </if>
  91. <if test="deliveryFee !=null and deliveryFee !='' ">
  92. and deliveryFee = #{deliveryFee}
  93. </if>
  94. <if test="refundAmount !=null and refundAmount !='' ">
  95. and refundAmount = #{refundAmount}
  96. </if>
  97. <if test="deliveryPickupMethod !=null and deliveryPickupMethod !='' ">
  98. and deliveryPickupMethod = #{deliveryPickupMethod}
  99. </if>
  100. <if test="deliveryPickupTime !=null and deliveryPickupTime !='' ">
  101. and deliveryPickupTime = #{deliveryPickupTime}
  102. </if>
  103. <if test="remarks !=null and remarks !='' ">
  104. and remarks = #{remarks}
  105. </if>
  106. <if test="id !=null and id !='' ">
  107. and id = #{id}
  108. </if>
  109. </select>
  110. <update id="updateSDdglOrderStore" parameterType="pd" >
  111. update s_ddgl_order_store
  112. <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
  113. <if test="orderId !=null and orderId !='' ">
  114. orderId = #{orderId},
  115. </if>
  116. <if test="deliveryType !=null and deliveryType !='' ">
  117. deliveryType = #{deliveryType},
  118. </if>
  119. <if test="mobileNumber !=null and mobileNumber !='' ">
  120. mobileNumber = #{mobileNumber},
  121. </if>
  122. <if test="channelName !=null and channelName !='' ">
  123. channelName = #{channelName},
  124. </if>
  125. <if test="channelOrderNo !=null and channelOrderNo !='' ">
  126. channelOrderNo = #{channelOrderNo},
  127. </if>
  128. <if test="psoSaleOrderNo !=null and psoSaleOrderNo !='' ">
  129. psoSaleOrderNo = #{psoSaleOrderNo},
  130. </if>
  131. <if test="orderStatus !=null and orderStatus !='' ">
  132. orderStatus = #{orderStatus},
  133. </if>
  134. <if test="deliveryStatus !=null and deliveryStatus !='' ">
  135. deliveryStatus = #{deliveryStatus},
  136. </if>
  137. <if test="orderDate !=null and orderDate !='' ">
  138. orderDate = #{orderDate},
  139. </if>
  140. <if test="storeName !=null and storeName !='' ">
  141. storeName = #{storeName},
  142. </if>
  143. <if test="consumptionTime !=null and consumptionTime !='' ">
  144. consumptionTime = #{consumptionTime},
  145. </if>
  146. <if test="memberId !=null and memberId !='' ">
  147. memberId = #{memberId},
  148. </if>
  149. <if test="memberName !=null and memberName !='' ">
  150. memberName = #{memberName},
  151. </if>
  152. <if test="systemLoginUserId !=null and systemLoginUserId !='' ">
  153. systemLoginUserId = #{systemLoginUserId},
  154. </if>
  155. <if test="orderPlacer !=null and orderPlacer !='' ">
  156. orderPlacer = #{orderPlacer},
  157. </if>
  158. <if test="orderTime !=null and orderTime !='' ">
  159. orderTime = #{orderTime},
  160. </if>
  161. <if test="settlementId !=null and settlementId !='' ">
  162. settlementId = #{settlementId},
  163. </if>
  164. <if test="settlementCode !=null and settlementCode !='' ">
  165. settlementCode = #{settlementCode},
  166. </if>
  167. <if test="finalPaymentTime !=null and finalPaymentTime !='' ">
  168. finalPaymentTime = #{finalPaymentTime},
  169. </if>
  170. <if test="totalDrugQuantity !=null and totalDrugQuantity !='' ">
  171. totalDrugQuantity = #{totalDrugQuantity},
  172. </if>
  173. <if test="cardNumber !=null and cardNumber !='' ">
  174. cardNumber = #{cardNumber},
  175. </if>
  176. <if test="shippingAddress !=null and shippingAddress !='' ">
  177. shippingAddress = #{shippingAddress},
  178. </if>
  179. <if test="orderAddress !=null and orderAddress !='' ">
  180. orderAddress = #{orderAddress},
  181. </if>
  182. <if test="orderType !=null and orderType !='' ">
  183. orderType = #{orderType},
  184. </if>
  185. <if test="orderSource !=null and orderSource !='' ">
  186. orderSource = #{orderSource},
  187. </if>
  188. <if test="totalAmount !=null and totalAmount !='' ">
  189. totalAmount = #{totalAmount},
  190. </if>
  191. <if test="deliveryFee !=null and deliveryFee !='' ">
  192. deliveryFee = #{deliveryFee},
  193. </if>
  194. <if test="refundAmount !=null and refundAmount !='' ">
  195. refundAmount = #{refundAmount},
  196. </if>
  197. <if test="deliveryPickupMethod !=null and deliveryPickupMethod !='' ">
  198. deliveryPickupMethod = #{deliveryPickupMethod},
  199. </if>
  200. <if test="deliveryPickupTime !=null and deliveryPickupTime !='' ">
  201. deliveryPickupTime = #{deliveryPickupTime},
  202. </if>
  203. <if test="remarks !=null and remarks !='' ">
  204. remarks = #{remarks},
  205. </if>
  206. </trim>
  207. <if test="up != null and up!=''">
  208. <if test="id != null and id!=''">
  209. where id=#{id}
  210. </if>
  211. </if>
  212. </update>
  213. <delete id="SDdglOrderStoreRemove" parameterType="pd">
  214. <if test="ids != null">
  215. delete from s_ddgl_order_store where
  216. <if test="ids != null">
  217. id in(${ids})
  218. </if>
  219. </if>
  220. </delete>
  221. <insert id="addSDdglOrderStore" parameterType="pd" >
  222. insert into s_ddgl_order_store
  223. <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
  224. <if test="orderId !=null and orderId !='' ">
  225. orderId,
  226. </if>
  227. <if test="deliveryType !=null and deliveryType !='' ">
  228. deliveryType,
  229. </if>
  230. <if test="mobileNumber !=null and mobileNumber !='' ">
  231. mobileNumber,
  232. </if>
  233. <if test="channelName !=null and channelName !='' ">
  234. channelName,
  235. </if>
  236. <if test="channelOrderNo !=null and channelOrderNo !='' ">
  237. channelOrderNo,
  238. </if>
  239. <if test="psoSaleOrderNo !=null and psoSaleOrderNo !='' ">
  240. psoSaleOrderNo,
  241. </if>
  242. <if test="orderStatus !=null and orderStatus !='' ">
  243. orderStatus,
  244. </if>
  245. <if test="deliveryStatus !=null and deliveryStatus !='' ">
  246. deliveryStatus,
  247. </if>
  248. <if test="orderDate !=null and orderDate !='' ">
  249. orderDate,
  250. </if>
  251. <if test="storeName !=null and storeName !='' ">
  252. storeName,
  253. </if>
  254. <if test="consumptionTime !=null and consumptionTime !='' ">
  255. consumptionTime,
  256. </if>
  257. <if test="memberId !=null and memberId !='' ">
  258. memberId,
  259. </if>
  260. <if test="memberName !=null and memberName !='' ">
  261. memberName,
  262. </if>
  263. <if test="systemLoginUserId !=null and systemLoginUserId !='' ">
  264. systemLoginUserId,
  265. </if>
  266. <if test="orderPlacer !=null and orderPlacer !='' ">
  267. orderPlacer,
  268. </if>
  269. <if test="orderTime !=null and orderTime !='' ">
  270. orderTime,
  271. </if>
  272. <if test="settlementId !=null and settlementId !='' ">
  273. settlementId,
  274. </if>
  275. <if test="settlementCode !=null and settlementCode !='' ">
  276. settlementCode,
  277. </if>
  278. <if test="finalPaymentTime !=null and finalPaymentTime !='' ">
  279. finalPaymentTime,
  280. </if>
  281. <if test="totalDrugQuantity !=null and totalDrugQuantity !='' ">
  282. totalDrugQuantity,
  283. </if>
  284. <if test="cardNumber !=null and cardNumber !='' ">
  285. cardNumber,
  286. </if>
  287. <if test="shippingAddress !=null and shippingAddress !='' ">
  288. shippingAddress,
  289. </if>
  290. <if test="orderAddress !=null and orderAddress !='' ">
  291. orderAddress,
  292. </if>
  293. <if test="orderType !=null and orderType !='' ">
  294. orderType,
  295. </if>
  296. <if test="orderSource !=null and orderSource !='' ">
  297. orderSource,
  298. </if>
  299. <if test="totalAmount !=null and totalAmount !='' ">
  300. totalAmount,
  301. </if>
  302. <if test="deliveryFee !=null and deliveryFee !='' ">
  303. deliveryFee,
  304. </if>
  305. <if test="refundAmount !=null and refundAmount !='' ">
  306. refundAmount,
  307. </if>
  308. <if test="deliveryPickupMethod !=null and deliveryPickupMethod !='' ">
  309. deliveryPickupMethod,
  310. </if>
  311. <if test="deliveryPickupTime !=null and deliveryPickupTime !='' ">
  312. deliveryPickupTime,
  313. </if>
  314. <if test="remarks !=null and remarks !='' ">
  315. remarks,
  316. </if>
  317. </trim>
  318. <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
  319. <if test="orderId !=null and orderId !='' ">
  320. #{orderId},
  321. </if>
  322. <if test="deliveryType !=null and deliveryType !='' ">
  323. #{deliveryType},
  324. </if>
  325. <if test="mobileNumber !=null and mobileNumber !='' ">
  326. #{mobileNumber},
  327. </if>
  328. <if test="channelName !=null and channelName !='' ">
  329. #{channelName},
  330. </if>
  331. <if test="channelOrderNo !=null and channelOrderNo !='' ">
  332. #{channelOrderNo},
  333. </if>
  334. <if test="psoSaleOrderNo !=null and psoSaleOrderNo !='' ">
  335. #{psoSaleOrderNo},
  336. </if>
  337. <if test="orderStatus !=null and orderStatus !='' ">
  338. #{orderStatus},
  339. </if>
  340. <if test="deliveryStatus !=null and deliveryStatus !='' ">
  341. #{deliveryStatus},
  342. </if>
  343. <if test="orderDate !=null and orderDate !='' ">
  344. #{orderDate},
  345. </if>
  346. <if test="storeName !=null and storeName !='' ">
  347. #{storeName},
  348. </if>
  349. <if test="consumptionTime !=null and consumptionTime !='' ">
  350. #{consumptionTime},
  351. </if>
  352. <if test="memberId !=null and memberId !='' ">
  353. #{memberId},
  354. </if>
  355. <if test="memberName !=null and memberName !='' ">
  356. #{memberName},
  357. </if>
  358. <if test="systemLoginUserId !=null and systemLoginUserId !='' ">
  359. #{systemLoginUserId},
  360. </if>
  361. <if test="orderPlacer !=null and orderPlacer !='' ">
  362. #{orderPlacer},
  363. </if>
  364. <if test="orderTime !=null and orderTime !='' ">
  365. #{orderTime},
  366. </if>
  367. <if test="settlementId !=null and settlementId !='' ">
  368. #{settlementId},
  369. </if>
  370. <if test="settlementCode !=null and settlementCode !='' ">
  371. #{settlementCode},
  372. </if>
  373. <if test="finalPaymentTime !=null and finalPaymentTime !='' ">
  374. #{finalPaymentTime},
  375. </if>
  376. <if test="totalDrugQuantity !=null and totalDrugQuantity !='' ">
  377. #{totalDrugQuantity},
  378. </if>
  379. <if test="cardNumber !=null and cardNumber !='' ">
  380. #{cardNumber},
  381. </if>
  382. <if test="shippingAddress !=null and shippingAddress !='' ">
  383. #{shippingAddress},
  384. </if>
  385. <if test="orderAddress !=null and orderAddress !='' ">
  386. #{orderAddress},
  387. </if>
  388. <if test="orderType !=null and orderType !='' ">
  389. #{orderType},
  390. </if>
  391. <if test="orderSource !=null and orderSource !='' ">
  392. #{orderSource},
  393. </if>
  394. <if test="totalAmount !=null and totalAmount !='' ">
  395. #{totalAmount},
  396. </if>
  397. <if test="deliveryFee !=null and deliveryFee !='' ">
  398. #{deliveryFee},
  399. </if>
  400. <if test="refundAmount !=null and refundAmount !='' ">
  401. #{refundAmount},
  402. </if>
  403. <if test="deliveryPickupMethod !=null and deliveryPickupMethod !='' ">
  404. #{deliveryPickupMethod},
  405. </if>
  406. <if test="deliveryPickupTime !=null and deliveryPickupTime !='' ">
  407. #{deliveryPickupTime},
  408. </if>
  409. <if test="remarks !=null and remarks !='' ">
  410. #{remarks},
  411. </if>
  412. </trim>
  413. </insert>
  414. </mapper>