PayOrderMapper.xml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.yijia.station.mapper.PayOrderMapper">
  6. <resultMap type="PayOrder" id="PayOrderResult">
  7. <result property="orderId" column="order_id" />
  8. <result property="orderNo" column="order_no" />
  9. <result property="stationId" column="station_id" />
  10. <result property="stationName" column="station_name" />
  11. <result property="status" column="status" />
  12. <result property="consumerId" column="consumer_id" />
  13. <result property="consumer" column="consumer" />
  14. <result property="oilGun" column="oil_gun" />
  15. <result property="oilName" column="oil_name" />
  16. <result property="oilPirce" column="oil_pirce" />
  17. <result property="oilType" column="oil_type" />
  18. <result property="orderLiters" column="order_liters" />
  19. <result property="amt" column="amt" />
  20. <result property="receivableAmt" column="receivable_amt" />
  21. <result property="receivedAmt" column="received_amt" />
  22. <result property="discountAmt" column="discount_amt" />
  23. <result property="discountCouponAmt" column="discount_coupon_amt" />
  24. <result property="discountCoupon" column="discount_coupon" />
  25. <result property="wxAmt" column="wx_amt" />
  26. <result property="zfbAmt" column="zfb_amt" />
  27. <result property="posAmt" column="pos_amt" />
  28. <result property="xjAmt" column="xj_amt" />
  29. <result property="didiAppAmt" column="didi_app_amt" />
  30. <result property="tyAppAmt" column="ty_app_amt" />
  31. <result property="otherAmt" column="other_amt" />
  32. <result property="dzkAmt" column="dzk_amt" />
  33. <result property="score" column="score" />
  34. <result property="memberNo" column="member_no" />
  35. <result property="memberAmt" column="member_amt" />
  36. <result property="printCount" column="print_count" />
  37. <result property="payType" column="pay_type" />
  38. <result property="payWay" column="pay_way" />
  39. <result property="oilPersonnel" column="oil_personnel" />
  40. <result property="payDate" column="pay_date" />
  41. <result property="createdDate" column="created_date" />
  42. <result property="orderType" column="order_type" />
  43. <result property="carNo" column="car_no" />
  44. <result property="customerPhone" column="customer_phone" />
  45. <result property="customerGrade" column="customer_grade" />
  46. </resultMap>
  47. <sql id="selectPayOrderVo">
  48. select order_id, order_no, station_id, station_name, status, consumer_id, consumer, oil_gun, oil_name, oil_pirce, oil_type, order_liters, amt, receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt, zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt, other_amt, dzk_amt, score, member_no, member_amt, print_count, pay_type, pay_way, oil_personnel, pay_date, created_date, order_type, car_no, customer_phone, customer_grade from pay_order
  49. </sql>
  50. <select id="selectPayOrderList" parameterType="PayOrder" resultMap="PayOrderResult">
  51. <include refid="selectPayOrderVo"/>
  52. <where>
  53. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  54. <if test="stationId != null "> and station_id = #{stationId}</if>
  55. <if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
  56. <if test="status != null and status != ''"> and status = #{status}</if>
  57. <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
  58. <if test="consumer != null and consumer != ''"> and consumer = #{consumer}</if>
  59. <if test="oilGun != null and oilGun != ''"> and oil_gun = #{oilGun}</if>
  60. <if test="oilName != null and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
  61. <if test="oilPirce != null "> and oil_pirce = #{oilPirce}</if>
  62. <if test="oilType != null and oilType != ''"> and oil_type = #{oilType}</if>
  63. <if test="orderLiters != null "> and order_liters = #{orderLiters}</if>
  64. <if test="amt != null "> and amt = #{amt}</if>
  65. <if test="receivableAmt != null "> and receivable_amt = #{receivableAmt}</if>
  66. <if test="receivedAmt != null "> and received_amt = #{receivedAmt}</if>
  67. <if test="discountAmt != null "> and discount_amt = #{discountAmt}</if>
  68. <if test="discountCouponAmt != null "> and discount_coupon_amt = #{discountCouponAmt}</if>
  69. <if test="discountCoupon != null and discountCoupon != ''"> and discount_coupon = #{discountCoupon}</if>
  70. <if test="wxAmt != null "> and wx_amt = #{wxAmt}</if>
  71. <if test="zfbAmt != null "> and zfb_amt = #{zfbAmt}</if>
  72. <if test="posAmt != null "> and pos_amt = #{posAmt}</if>
  73. <if test="xjAmt != null "> and xj_amt = #{xjAmt}</if>
  74. <if test="didiAppAmt != null "> and didi_app_amt = #{didiAppAmt}</if>
  75. <if test="tyAppAmt != null "> and ty_app_amt = #{tyAppAmt}</if>
  76. <if test="otherAmt != null "> and other_amt = #{otherAmt}</if>
  77. <if test="dzkAmt != null "> and dzk_amt = #{dzkAmt}</if>
  78. <if test="score != null "> and score = #{score}</if>
  79. <if test="memberNo != null and memberNo != ''"> and member_no = #{memberNo}</if>
  80. <if test="memberAmt != null "> and member_amt = #{memberAmt}</if>
  81. <if test="printCount != null "> and print_count = #{printCount}</if>
  82. <if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
  83. <if test="payWay != null and payWay != ''"> and pay_way = #{payWay}</if>
  84. <if test="oilPersonnel != null and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
  85. <if test="payDate != null "> and pay_date = #{payDate}</if>
  86. <if test="createdDate != null "> and created_date = #{createdDate}</if>
  87. <if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
  88. <if test="carNo != null and carNo != ''"> and car_no = #{carNo}</if>
  89. <if test="customerPhone != null and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
  90. <if test="customerGrade != null and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
  91. <if test="likeConsumer != null and likeConsumer != ''"> and customer like concat('%',#{likeConsumer}, '%')</if>
  92. <if test="likeCarNo != null and likeCarNo != ''"> and car_no like concat('%',#{likeCarNo}, '%') </if>
  93. <if test="likeCustomerPhone != null and likeCustomerPhone != ''"> and customer_phone like concat('%',#{likeCustomerPhone}, '%') </if>
  94. </where>
  95. order by order_id desc
  96. </select>
  97. <!--查询导出数据-->
  98. <select id="selectPayOrderExport" parameterType="PayOrder" resultMap="PayOrderResult">
  99. select order_no,oil_name,oil_pirce,order_liters, amt,consumer,oil_personnel,oil_gun,pay_type,pay_way
  100. from pay_order
  101. <where>
  102. <if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
  103. <if test="stationId != null "> and station_id = #{stationId}</if>
  104. <if test="stationName != null and stationName != ''"> and station_name like concat('%', #{stationName}, '%')</if>
  105. <if test="status != null and status != ''"> and status = #{status}</if>
  106. <if test="consumerId != null "> and consumer_id = #{consumerId}</if>
  107. <if test="consumer != null and consumer != ''"> and consumer = #{consumer}</if>
  108. <if test="oilGun != null and oilGun != ''"> and oil_gun = #{oilGun}</if>
  109. <if test="oilName != null and oilName != ''"> and oil_name like concat('%', #{oilName}, '%')</if>
  110. <if test="oilPirce != null "> and oil_pirce = #{oilPirce}</if>
  111. <if test="oilType != null and oilType != ''"> and oil_type = #{oilType}</if>
  112. <if test="orderLiters != null "> and order_liters = #{orderLiters}</if>
  113. <if test="amt != null "> and amt = #{amt}</if>
  114. <if test="receivableAmt != null "> and receivable_amt = #{receivableAmt}</if>
  115. <if test="receivedAmt != null "> and received_amt = #{receivedAmt}</if>
  116. <if test="discountAmt != null "> and discount_amt = #{discountAmt}</if>
  117. <if test="discountCouponAmt != null "> and discount_coupon_amt = #{discountCouponAmt}</if>
  118. <if test="discountCoupon != null and discountCoupon != ''"> and discount_coupon = #{discountCoupon}</if>
  119. <if test="wxAmt != null "> and wx_amt = #{wxAmt}</if>
  120. <if test="zfbAmt != null "> and zfb_amt = #{zfbAmt}</if>
  121. <if test="posAmt != null "> and pos_amt = #{posAmt}</if>
  122. <if test="xjAmt != null "> and xj_amt = #{xjAmt}</if>
  123. <if test="didiAppAmt != null "> and didi_app_amt = #{didiAppAmt}</if>
  124. <if test="tyAppAmt != null "> and ty_app_amt = #{tyAppAmt}</if>
  125. <if test="otherAmt != null "> and other_amt = #{otherAmt}</if>
  126. <if test="dzkAmt != null "> and dzk_amt = #{dzkAmt}</if>
  127. <if test="score != null "> and score = #{score}</if>
  128. <if test="memberNo != null and memberNo != ''"> and member_no = #{memberNo}</if>
  129. <if test="memberAmt != null "> and member_amt = #{memberAmt}</if>
  130. <if test="printCount != null "> and print_count = #{printCount}</if>
  131. <if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
  132. <if test="payWay != null and payWay != ''"> and pay_way = #{payWay}</if>
  133. <if test="oilPersonnel != null and oilPersonnel != ''"> and oil_personnel = #{oilPersonnel}</if>
  134. <if test="payDate != null "> and pay_date = #{payDate}</if>
  135. <if test="createdDate != null "> and created_date = #{createdDate}</if>
  136. <if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
  137. <if test="carNo != null and carNo != ''"> and car_no = #{carNo}</if>
  138. <if test="customerPhone != null and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
  139. <if test="customerGrade != null and customerGrade != ''"> and customer_grade = #{customerGrade}</if>
  140. </where>
  141. order by order_id desc
  142. </select>
  143. <select id="selectPayOrderById" parameterType="Long" resultMap="PayOrderResult">
  144. <include refid="selectPayOrderVo"/>
  145. where order_id = #{orderId}
  146. </select>
  147. <select id="selectDaySources" parameterType="Long" resultMap="PayOrderResult">
  148. SELECT SUM(amt) as amt,sum(order_liters) as order_liters
  149. from pay_order
  150. <where>
  151. <if test="createdDate != null "> and created_date like concat(#{createdDate}, '%') </if>
  152. <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
  153. AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
  154. </if>
  155. <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
  156. AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
  157. </if>
  158. </where>
  159. </select>
  160. <select id="selectOilTypeSources" parameterType="Long" resultMap="PayOrderResult">
  161. SELECT SUM(amt) as amt,sum(order_liters) as order_liters, oil_type
  162. from pay_order
  163. <where>
  164. <if test="createdDate != null "> and created_date = #{createdDate}</if>
  165. <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
  166. AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
  167. </if>
  168. <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
  169. AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
  170. </if>
  171. </where>
  172. GROUP BY oil_type
  173. </select>
  174. <select id="selectOverViewData" parameterType="Long" resultMap="PayOrderResult">
  175. SELECT SUM(wx_amt) as wx_amt,sum(zfb_amt) as zfb_amt, sum(pos_amt) as pos_amt, sum(xj_amt) as xj_amt,sum(didi_app_amt) as didi_app_amt,sum(ty_app_amt) as ty_app_amt,sum(other_amt) as other_amt,sum(member_amt) as member_amt
  176. from pay_order
  177. <where>
  178. <if test="createdDate != null "> and created_date = #{createdDate}</if>
  179. <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
  180. AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
  181. </if>
  182. <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
  183. AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
  184. </if>
  185. </where>
  186. </select>
  187. <!--日报数据-->
  188. <select id="selectDayReport" parameterType="Long" resultMap="PayOrderResult">
  189. SELECT date_format( b.pay_date, '%Y-%m-%d' ) as pay_date,sum(b.amt) as amt,sum(b.qyamt) as qy_amt, sum(b.cyamt) as cy_amt,sum(b.order_liters) as order_liters ,count(b.order_no) order_no ,sum(b.member_amt) as menber_amt
  190. from (SELECT a.*,(SELECT sum(amt) as qyamt from pay_order where order_no=a.order_no and oil_type=2) as qyamt , (SELECT sum(amt) as qyamt from pay_order where order_no=a.order_no and oil_type=1) as cyamt
  191. from pay_order a) b
  192. GROUP BY date_format( pay_date, '%Y-%m-%d' )
  193. </select>
  194. <!-- 日报折线图油品数据-->
  195. <select id="listQydata" parameterType="Long" resultMap="PayOrderResult">
  196. SELECT sum(amt) as amt,date_format(created_date,'%Y-%m-%d') as created_date
  197. from pay_order
  198. <where>
  199. <if test="oilName != null "> and oil_name = #{oilName}</if>
  200. <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
  201. AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
  202. </if>
  203. <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
  204. AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
  205. </if>
  206. </where>
  207. GROUP BY oil_name ,date_format(created_date,'%Y-%m-%d')
  208. </select>
  209. <!-- 日报折线图X轴数据-->
  210. <select id="listXdata" parameterType="Long" resultMap="PayOrderResult">
  211. SELECT date_format(created_date,'%Y-%m-%d') as created_date
  212. from pay_order
  213. <where>
  214. <if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
  215. AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &gt;= date_format(#{beginTime},'%Y-%m-%d %H:%i:%s')
  216. </if>
  217. <if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
  218. AND date_format(created_date,'%Y-%m-%d %H:%i:%s') &lt;= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
  219. </if>
  220. </where>
  221. GROUP BY date_format(created_date,'%Y-%m-%d')
  222. </select>
  223. <insert id="insertPayOrder" parameterType="PayOrder" useGeneratedKeys="true" keyProperty="orderId">
  224. insert into pay_order
  225. <trim prefix="(" suffix=")" suffixOverrides=",">
  226. <if test="orderNo != null">order_no,</if>
  227. <if test="stationId != null">station_id,</if>
  228. <if test="stationName != null">station_name,</if>
  229. <if test="status != null">status,</if>
  230. <if test="consumerId != null">consumer_id,</if>
  231. <if test="consumer != null">consumer,</if>
  232. <if test="oilGun != null">oil_gun,</if>
  233. <if test="oilName != null">oil_name,</if>
  234. <if test="oilPirce != null">oil_pirce,</if>
  235. <if test="oilType != null">oil_type,</if>
  236. <if test="orderLiters != null">order_liters,</if>
  237. <if test="amt != null">amt,</if>
  238. <if test="receivableAmt != null">receivable_amt,</if>
  239. <if test="receivedAmt != null">received_amt,</if>
  240. <if test="discountAmt != null">discount_amt,</if>
  241. <if test="discountCouponAmt != null">discount_coupon_amt,</if>
  242. <if test="discountCoupon != null">discount_coupon,</if>
  243. <if test="wxAmt != null">wx_amt,</if>
  244. <if test="zfbAmt != null">zfb_amt,</if>
  245. <if test="posAmt != null">pos_amt,</if>
  246. <if test="xjAmt != null">xj_amt,</if>
  247. <if test="didiAppAmt != null">didi_app_amt,</if>
  248. <if test="tyAppAmt != null">ty_app_amt,</if>
  249. <if test="otherAmt != null">other_amt,</if>
  250. <if test="dzkAmt != null">dzk_amt,</if>
  251. <if test="score != null">score,</if>
  252. <if test="memberNo != null">member_no,</if>
  253. <if test="memberAmt != null">member_amt,</if>
  254. <if test="printCount != null">print_count,</if>
  255. <if test="payType != null">pay_type,</if>
  256. <if test="payWay != null">pay_way,</if>
  257. <if test="oilPersonnel != null">oil_personnel,</if>
  258. <if test="payDate != null">pay_date,</if>
  259. <if test="createdDate != null">created_date,</if>
  260. <if test="orderType != null">order_type,</if>
  261. <if test="carNo != null">car_no,</if>
  262. <if test="customerPhone != null">customer_phone,</if>
  263. <if test="customerGrade != null">customer_grade,</if>
  264. </trim>
  265. <trim prefix="values (" suffix=")" suffixOverrides=",">
  266. <if test="orderNo != null">#{orderNo},</if>
  267. <if test="stationId != null">#{stationId},</if>
  268. <if test="stationName != null">#{stationName},</if>
  269. <if test="status != null">#{status},</if>
  270. <if test="consumerId != null">#{consumerId},</if>
  271. <if test="consumer != null">#{consumer},</if>
  272. <if test="oilGun != null">#{oilGun},</if>
  273. <if test="oilName != null">#{oilName},</if>
  274. <if test="oilPirce != null">#{oilPirce},</if>
  275. <if test="oilType != null">#{oilType},</if>
  276. <if test="orderLiters != null">#{orderLiters},</if>
  277. <if test="amt != null">#{amt},</if>
  278. <if test="receivableAmt != null">#{receivableAmt},</if>
  279. <if test="receivedAmt != null">#{receivedAmt},</if>
  280. <if test="discountAmt != null">#{discountAmt},</if>
  281. <if test="discountCouponAmt != null">#{discountCouponAmt},</if>
  282. <if test="discountCoupon != null">#{discountCoupon},</if>
  283. <if test="wxAmt != null">#{wxAmt},</if>
  284. <if test="zfbAmt != null">#{zfbAmt},</if>
  285. <if test="posAmt != null">#{posAmt},</if>
  286. <if test="xjAmt != null">#{xjAmt},</if>
  287. <if test="didiAppAmt != null">#{didiAppAmt},</if>
  288. <if test="tyAppAmt != null">#{tyAppAmt},</if>
  289. <if test="otherAmt != null">#{otherAmt},</if>
  290. <if test="dzkAmt != null">#{dzkAmt},</if>
  291. <if test="score != null">#{score},</if>
  292. <if test="memberNo != null">#{memberNo},</if>
  293. <if test="memberAmt != null">#{memberAmt},</if>
  294. <if test="printCount != null">#{printCount},</if>
  295. <if test="payType != null">#{payType},</if>
  296. <if test="payWay != null">#{payWay},</if>
  297. <if test="oilPersonnel != null">#{oilPersonnel},</if>
  298. <if test="payDate != null">#{payDate},</if>
  299. <if test="createdDate != null">#{createdDate},</if>
  300. <if test="orderType != null">#{orderType},</if>
  301. <if test="carNo != null">#{carNo},</if>
  302. <if test="customerPhone != null">#{customerPhone},</if>
  303. <if test="customerGrade != null">#{customerGrade},</if>
  304. </trim>
  305. </insert>
  306. <update id="updatePayOrder" parameterType="PayOrder">
  307. update pay_order
  308. <trim prefix="SET" suffixOverrides=",">
  309. <if test="orderNo != null">order_no = #{orderNo},</if>
  310. <if test="stationId != null">station_id = #{stationId},</if>
  311. <if test="stationName != null">station_name = #{stationName},</if>
  312. <if test="status != null">status = #{status},</if>
  313. <if test="consumerId != null">consumer_id = #{consumerId},</if>
  314. <if test="consumer != null">consumer = #{consumer},</if>
  315. <if test="oilGun != null">oil_gun = #{oilGun},</if>
  316. <if test="oilName != null">oil_name = #{oilName},</if>
  317. <if test="oilPirce != null">oil_pirce = #{oilPirce},</if>
  318. <if test="oilType != null">oil_type = #{oilType},</if>
  319. <if test="orderLiters != null">order_liters = #{orderLiters},</if>
  320. <if test="amt != null">amt = #{amt},</if>
  321. <if test="receivableAmt != null">receivable_amt = #{receivableAmt},</if>
  322. <if test="receivedAmt != null">received_amt = #{receivedAmt},</if>
  323. <if test="discountAmt != null">discount_amt = #{discountAmt},</if>
  324. <if test="discountCouponAmt != null">discount_coupon_amt = #{discountCouponAmt},</if>
  325. <if test="discountCoupon != null">discount_coupon = #{discountCoupon},</if>
  326. <if test="wxAmt != null">wx_amt = #{wxAmt},</if>
  327. <if test="zfbAmt != null">zfb_amt = #{zfbAmt},</if>
  328. <if test="posAmt != null">pos_amt = #{posAmt},</if>
  329. <if test="xjAmt != null">xj_amt = #{xjAmt},</if>
  330. <if test="didiAppAmt != null">didi_app_amt = #{didiAppAmt},</if>
  331. <if test="tyAppAmt != null">ty_app_amt = #{tyAppAmt},</if>
  332. <if test="otherAmt != null">other_amt = #{otherAmt},</if>
  333. <if test="dzkAmt != null">dzk_amt = #{dzkAmt},</if>
  334. <if test="score != null">score = #{score},</if>
  335. <if test="memberNo != null">member_no = #{memberNo},</if>
  336. <if test="memberAmt != null">member_amt = #{memberAmt},</if>
  337. <if test="printCount != null">print_count = #{printCount},</if>
  338. <if test="payType != null">pay_type = #{payType},</if>
  339. <if test="payWay != null">pay_way = #{payWay},</if>
  340. <if test="oilPersonnel != null">oil_personnel = #{oilPersonnel},</if>
  341. <if test="payDate != null">pay_date = #{payDate},</if>
  342. <if test="createdDate != null">created_date = #{createdDate},</if>
  343. <if test="orderType != null">order_type = #{orderType},</if>
  344. <if test="carNo != null">car_no = #{carNo},</if>
  345. <if test="customerPhone != null">customer_phone = #{customerPhone},</if>
  346. <if test="customerGrade != null">customer_grade = #{customerGrade},</if>
  347. </trim>
  348. where order_id = #{orderId}
  349. </update>
  350. <delete id="deletePayOrderById" parameterType="Long">
  351. delete from pay_order where order_id = #{orderId}
  352. </delete>
  353. <delete id="deletePayOrderByIds" parameterType="String">
  354. delete from pay_order where order_id in
  355. <foreach item="orderId" collection="array" open="(" separator="," close=")">
  356. #{orderId}
  357. </foreach>
  358. </delete>
  359. </mapper>