PayOrderMapper.xml 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325
  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.platform.yijia.dao.PayOrderMapper">
  4. <!--订单对象实体类-->
  5. <resultMap id="BaseResultMap" type="com.platform.yijia.pojo.PayOrder">
  6. <id column="order_id" jdbcType="INTEGER" property="orderId" />
  7. <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
  8. <result column="oil_gun" jdbcType="VARCHAR" property="oilGun" />
  9. <result column="oil_name" jdbcType="VARCHAR" property="oilName" />
  10. <result column="oil_pirce" jdbcType="VARCHAR" property="oilPirce" />
  11. <result column="consumer_id" jdbcType="INTEGER" property="consumerId" />
  12. <result column="consumer" jdbcType="VARCHAR" property="consumer" />
  13. <result column="amt" jdbcType="DOUBLE" property="amt" />
  14. <result column="station_id" jdbcType="INTEGER" property="stationId" />
  15. <result column="status" jdbcType="VARCHAR" property="status" />
  16. <result column="order_liters" jdbcType="VARCHAR" property="orderLiters" />
  17. <result column="pay_type" jdbcType="VARCHAR" property="payType" />
  18. <result column="pay_way" jdbcType="VARCHAR" property="payWay" />
  19. <result column="pay_date" jdbcType="TIMESTAMP" property="payDate" />
  20. <result column="oil_personnel" jdbcType="VARCHAR" property="oilPersonnel" />
  21. <result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
  22. <result column="order_type" jdbcType="CHAR" property="orderType" />
  23. <result column="station_name" jdbcType="CHAR" property="stationName" />
  24. <result column="receivable_amt" jdbcType="DOUBLE" property="receivableAmt" />
  25. <result column="received_amt" jdbcType="DOUBLE" property="receivedAmt" />
  26. <result column="discount_coupon" jdbcType="VARCHAR" property="discountCoupon" />
  27. <result column="discount_amt" jdbcType="DOUBLE" property="discountAmt" />
  28. <result column="discount_coupon_amt" jdbcType="DOUBLE" property="discountCouponAmt" />
  29. <result column="wx_amt" jdbcType="DOUBLE" property="wxAmt" />
  30. <result column="zfb_amt" jdbcType="DOUBLE" property="zfbAmt" />
  31. <result column="pos_amt" jdbcType="DOUBLE" property="posAmt" />
  32. <result column="xj_amt" jdbcType="DOUBLE" property="xjAmt" />
  33. <result column="didi_app_amt" jdbcType="DOUBLE" property="didiAppAmt" />
  34. <result column="ty_app_amt" jdbcType="DOUBLE" property="tyAppAmt" />
  35. <result column="other_amt" jdbcType="DOUBLE" property="otherAmt" />
  36. <result column="dzk_amt" jdbcType="TIMESTAMP" property="dzkAmt" />
  37. <result column="score" jdbcType="INTEGER" property="score" />
  38. <result column="member_no" jdbcType="VARCHAR" property="memberNo" />
  39. <result column="member_amt" jdbcType="DOUBLE" property="memberAmt" />
  40. <result column="print_count" jdbcType="INTEGER" property="printCount" />
  41. <result column="car_no" jdbcType="VARCHAR" property="carNo" />
  42. <result column="customer_phone" jdbcType="VARCHAR" property="customerPhone" />
  43. <result column="customer_grade" jdbcType="VARCHAR" property="customerGrade" />
  44. <result column="oil_type" jdbcType="VARCHAR" property="oilType" />
  45. </resultMap>
  46. <sql id="Example_Where_Clause">
  47. <where>
  48. <foreach collection="oredCriteria" item="criteria" separator="or">
  49. <if test="criteria.valid">
  50. <trim prefix="(" prefixOverrides="and" suffix=")">
  51. <foreach collection="criteria.criteria" item="criterion">
  52. <choose>
  53. <when test="criterion.noValue">
  54. and ${criterion.condition}
  55. </when>
  56. <when test="criterion.singleValue">
  57. and ${criterion.condition} #{criterion.value}
  58. </when>
  59. <when test="criterion.betweenValue">
  60. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  61. </when>
  62. <when test="criterion.listValue">
  63. and ${criterion.condition}
  64. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  65. #{listItem}
  66. </foreach>
  67. </when>
  68. </choose>
  69. </foreach>
  70. </trim>
  71. </if>
  72. </foreach>
  73. </where>
  74. </sql>
  75. <sql id="Update_By_Example_Where_Clause">
  76. <!--
  77. WARNING - @mbg.generated
  78. This element is automatically generated by MyBatis Generator, do not modify.
  79. -->
  80. <where>
  81. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  82. <if test="criteria.valid">
  83. <trim prefix="(" prefixOverrides="and" suffix=")">
  84. <foreach collection="criteria.criteria" item="criterion">
  85. <choose>
  86. <when test="criterion.noValue">
  87. and ${criterion.condition}
  88. </when>
  89. <when test="criterion.singleValue">
  90. and ${criterion.condition} #{criterion.value}
  91. </when>
  92. <when test="criterion.betweenValue">
  93. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  94. </when>
  95. <when test="criterion.listValue">
  96. and ${criterion.condition}
  97. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  98. #{listItem}
  99. </foreach>
  100. </when>
  101. </choose>
  102. </foreach>
  103. </trim>
  104. </if>
  105. </foreach>
  106. </where>
  107. </sql>
  108. <sql id="Base_Column_List">
  109. order_id, order_no, oil_gun, oil_name, oil_pirce, consumer_id, consumer, amt, station_id, status,
  110. order_liters, pay_type, pay_way, pay_date, oil_personnel, created_date, order_type, station_name,
  111. receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt,
  112. zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt, other_amt, dzk_amt, score, member_no, member_amt,
  113. print_count, car_no, customer_phone, customer_grade, oil_type
  114. </sql>
  115. <!--查询班结时间内订单-->
  116. <select id="selectPayOrderList" parameterType="com.platform.yijia.pojo.PayOrder" resultMap="BaseResultMap">
  117. SELECT
  118. <include refid="Base_Column_List"/>
  119. FROM
  120. pay_order
  121. <where>
  122. <if test="stationId !=null">
  123. station_id= #{stationId}
  124. </if>
  125. <if test="status !=null">
  126. AND status= #{status}
  127. </if>
  128. <if test="beginTime !=null">
  129. AND pay_date &gt;= #{beginTime}
  130. </if>
  131. <if test="endTime !=null">
  132. AND pay_date &lt; #{endTime}
  133. </if>
  134. </where>
  135. </select>
  136. <!--初次班结 班结时间默认为当前时间订单信息-->
  137. <select id="getPayOrderInfoMin" parameterType="com.platform.yijia.pojo.PayOrder" resultMap="BaseResultMap">
  138. SELECT
  139. <include refid="Base_Column_List"/>
  140. FROM
  141. pay_order
  142. <where>
  143. <if test="stationId !=null">
  144. station_id= #{stationId}
  145. </if>
  146. <if test="status !=null">
  147. AND status= #{status}
  148. </if>
  149. </where>
  150. </select>
  151. <!--根据用户openId和用户类型userType查询用户订单-->
  152. <select id="getOrderListByOpenIdAndUserType" parameterType="com.platform.yijia.pojo.AppUserInfo" resultType="com.platform.yijia.pojo.PayOrder">
  153. SELECT
  154. B.order_no AS orderNo,
  155. B.oil_gun AS oilGun,
  156. B.oil_name AS oilName,
  157. B.consumer AS consumer,
  158. B.order_liters AS orderLiters,
  159. B.pay_date AS payDate,
  160. B.amt AS amt,
  161. B.created_date AS createdDate,
  162. B.oil_pirce AS oilPirce,
  163. B.station_name AS stationName,
  164. B.receivable_amt AS receivableAmt,
  165. B.discount_amt AS discountAmt,
  166. B.score AS score,
  167. B.status AS status,
  168. B.discount_coupon_amt AS discountCouponAmt
  169. FROM
  170. app_user_info AS A LEFT JOIN pay_order AS B ON A.user_id = B.consumer_id
  171. <where>
  172. <if test="userType != null and userType !=''">
  173. A.user_type = #{userType}
  174. </if>
  175. <if test="blogOpenid != null and blogOpenid !=''">
  176. AND A.blog_openid = #{blogOpenid}
  177. </if>
  178. <if test="minaOpenid != null and minaOpenid !=''">
  179. AND A.mina_openid = #{minaOpenid}
  180. </if>
  181. </where>
  182. ORDER BY B.created_date DESC
  183. </select>
  184. <!-- 查询加油员-->
  185. <select id="selectPersonelName" parameterType="map" resultType="map">
  186. SELECT
  187. A.personnel_id AS personnelId,
  188. A.personnel_name AS personelName,
  189. A.station_name AS stationName
  190. FROM
  191. station_personnel AS A
  192. <where>
  193. <if test="oliGunNo != null and oliGunNo !=''">
  194. FIND_IN_SET(#{oliGunNo}, A.gun_no)
  195. </if>
  196. <if test="stationId !=null and stationId !=''">
  197. AND A.station_id = #{stationId}
  198. </if>
  199. </where>
  200. </select>
  201. <!-- 根据油品名称和油站查询油枪编号和价格 -->
  202. <select id="selectOilGunNoAndOilPrice" parameterType="map" resultType="map">
  203. SELECT
  204. A.oil_gun_no AS oliGunNo,
  205. A.oil_name AS oilName,
  206. A.station_name AS stationName,
  207. B.oil_price AS oilPrice,
  208. C.personnel_name AS personelName
  209. FROM station_oil_gun AS A
  210. LEFT JOIN station_oil_price AS B ON A.oil_name = B.oil_name AND A.station_id = B.station_id
  211. LEFT JOIN station_personnel AS C ON A.oil_gun_no = C.gun_no AND A.station_id = C.station_id
  212. <where>
  213. <if test="oliGunNo != null and oliGunNo !=''">
  214. A.oil_gun_no = #{oliGunNo}
  215. </if>
  216. <if test="stationId !=null and stationId !=''">
  217. AND A.station_id = #{stationId}
  218. </if>
  219. </where>
  220. </select>
  221. <!-- 根据油品名称和油站id获取当前油品调价信息 -->
  222. <select id="selectOilPriceAdjust" parameterType="map" resultType="map">
  223. SELECT
  224. adjust_price_id AS adjustPriceId,
  225. oil_name AS oilName,
  226. oil_adjust_price AS oilAdjustPrice,
  227. take_effect_status AS takeEffectStatus,
  228. take_effect_date AS takeEffectDate,
  229. adjust_date AS adjustDate,
  230. station_id AS stationId,
  231. operator AS operator,
  232. status AS status
  233. FROM
  234. station_oil_price_adjust
  235. <where>
  236. <if test="oilName !=null and oilName !=''">
  237. oil_name = #{oilName}
  238. </if>
  239. <if test="stationId !=null and stationId !=''">
  240. AND station_id = #{stationId}
  241. </if>
  242. ORDER BY take_effect_date DESC
  243. </where>
  244. </select>
  245. <select id="selectByExample" parameterType="com.platform.yijia.pojo.PayOrderExample" resultMap="BaseResultMap">
  246. <!--
  247. WARNING - @mbg.generated
  248. This element is automatically generated by MyBatis Generator, do not modify.
  249. -->
  250. select
  251. <if test="distinct">
  252. distinct
  253. </if>
  254. <include refid="Base_Column_List" />
  255. from pay_order
  256. <if test="_parameter != null">
  257. <include refid="Example_Where_Clause" />
  258. </if>
  259. <if test="orderByClause != null">
  260. order by ${orderByClause}
  261. </if>
  262. </select>
  263. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  264. <!--
  265. WARNING - @mbg.generated
  266. This element is automatically generated by MyBatis Generator, do not modify.
  267. -->
  268. select
  269. <include refid="Base_Column_List" />
  270. from pay_order
  271. where order_id = #{orderId,jdbcType=INTEGER}
  272. </select>
  273. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  274. <!--
  275. WARNING - @mbg.generated
  276. This element is automatically generated by MyBatis Generator, do not modify.
  277. -->
  278. delete from pay_order
  279. where order_id = #{orderId,jdbcType=INTEGER}
  280. </delete>
  281. <delete id="deleteByExample" parameterType="com.platform.yijia.pojo.PayOrderExample">
  282. <!--
  283. WARNING - @mbg.generated
  284. This element is automatically generated by MyBatis Generator, do not modify.
  285. -->
  286. delete from pay_order
  287. <if test="_parameter != null">
  288. <include refid="Example_Where_Clause" />
  289. </if>
  290. </delete>
  291. <insert id="insert" parameterType="com.platform.yijia.pojo.PayOrder">
  292. <!--
  293. WARNING - @mbg.generated
  294. This element is automatically generated by MyBatis Generator, do not modify.
  295. -->
  296. INSERT into
  297. pay_order (order_id, order_no, oil_gun,
  298. oil_name, oil_pirce, consumer_id, consumer,
  299. amt, station_id, status,
  300. order_liters, pay_type, pay_way,
  301. pay_date, oil_personnel, created_date,
  302. order_type, station_name, receivable_amt, received_amt, discount_amt, discount_coupon_amt, discount_coupon, wx_amt,
  303. zfb_amt, pos_amt, xj_amt, didi_app_amt, ty_app_amt, other_amt, dzk_amt, score,
  304. member_no, member_amt, print_count, car_no, customer_phone, customer_grade, oil_type)
  305. VALUES (
  306. #{orderId,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{oilGun,jdbcType=VARCHAR},
  307. #{oilName,jdbcType=VARCHAR}, #{oilPirce,jdbcType=DOUBLE}, #{consumerId,jdbcType=INTEGER}, #{consumer,jdbcType=VARCHAR},
  308. #{amt,jdbcType=DOUBLE}, #{stationId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR},
  309. #{orderLiters,jdbcType=VARCHAR}, #{payType,jdbcType=VARCHAR}, #{payWay,jdbcType=VARCHAR},
  310. #{payDate,jdbcType=TIMESTAMP}, #{oilPersonnel,jdbcType=VARCHAR}, #{createdDate,jdbcType=TIMESTAMP},
  311. #{orderType,jdbcType=CHAR}, #{stationName,jdbcType=VARCHAR},
  312. #{receivableAmt,jdbcType=DOUBLE}, #{receivedAmt,jdbcType=DOUBLE},#{discountAmt,jdbcType=DOUBLE}, #{discountCouponAmt,jdbcType=DOUBLE},
  313. #{discountCoupon,jdbcType=INTEGER}, #{wxAmt,jdbcType=DOUBLE}, #{zfbAmt,jdbcType=DOUBLE},#{posAmt,jdbcType=DOUBLE},
  314. #{xjAmt,jdbcType=DOUBLE}, #{didiAppAmt,jdbcType=DOUBLE}, #{tyAppAmt,jdbcType=DOUBLE}, #{otherAmt,jdbcType=DOUBLE},
  315. #{dzkAmt,jdbcType=DOUBLE}, #{score,jdbcType=INTEGER}, #{memberNo,jdbcType=VARCHAR}, #{memberAmt,jdbcType=DOUBLE},
  316. #{printCount,jdbcType=INTEGER}, #{carNo,jdbcType=VARCHAR}, #{customerPhone,jdbcType=VARCHAR}, #{customerGrade,jdbcType=VARCHAR}, #{oilType,jdbcType=VARCHAR}
  317. )
  318. </insert>
  319. <insert id="insertSelective" parameterType="com.platform.yijia.pojo.PayOrder">
  320. <!--
  321. WARNING - @mbg.generated
  322. This element is automatically generated by MyBatis Generator, do not modify.
  323. -->
  324. insert into pay_order
  325. <trim prefix="(" suffix=")" suffixOverrides=",">
  326. <if test="orderId != null">
  327. order_id,
  328. </if>
  329. <if test="orderNo != null">
  330. order_no,
  331. </if>
  332. <if test="oilGun != null">
  333. oil_gun,
  334. </if>
  335. <if test="oilName != null">
  336. oil_name,
  337. </if>
  338. <if test="oilPirce != null">
  339. oil_pirce,
  340. </if>
  341. <if test="consumerId != null">
  342. consumer_id,
  343. </if>
  344. <if test="consumer != null">
  345. consumer,
  346. </if>
  347. <if test="amt != null">
  348. amt,
  349. </if>
  350. <if test="stationId != null">
  351. station_id,
  352. </if>
  353. <if test="status != null">
  354. status,
  355. </if>
  356. <if test="orderLiters != null">
  357. order_liters,
  358. </if>
  359. <if test="payType != null">
  360. pay_type,
  361. </if>
  362. <if test="payWay != null">
  363. pay_way,
  364. </if>
  365. <if test="payDate != null">
  366. pay_date,
  367. </if>
  368. <if test="oilPersonnel != null">
  369. oil_personnel,
  370. </if>
  371. <if test="createdDate != null">
  372. created_date,
  373. </if>
  374. <if test="orderType != null">
  375. order_type,
  376. </if>
  377. <if test="stationName != null">
  378. station_name,
  379. </if>
  380. <if test="receivableAmt != null">
  381. receivable_amt,
  382. </if>
  383. <if test="receivedAmt != null">
  384. received_amt,
  385. </if>
  386. <if test="discountAmt != null">
  387. discount_amt,
  388. </if>
  389. <if test="discountCouponAmt != null">
  390. discount_coupon_amt,
  391. </if>
  392. <if test="discountCoupon != null">
  393. discount_coupon,
  394. </if>
  395. <if test="wxAmt != null">
  396. wx_amt,
  397. </if>
  398. <if test="zfbAmt != null">
  399. zfb_amt,
  400. </if>
  401. <if test="posAmt != null">
  402. pos_amt,
  403. </if>
  404. <if test="didiAppAmt != null">
  405. didi_app_amt,
  406. </if>
  407. <if test="tyAppAmt != null">
  408. ty_app_amt,
  409. </if>
  410. <if test="otherAmt != null">
  411. other_amt,
  412. </if>
  413. <if test="dzkAmt != null">
  414. dzk_amt,
  415. </if>
  416. <if test="score != null">
  417. score,
  418. </if>
  419. <if test="memberNo != null">
  420. member_no,
  421. </if>
  422. <if test="memberAmt != null">
  423. member_amt,
  424. </if>
  425. <if test="printCount != null">
  426. print_count,
  427. </if>
  428. <if test="carNo != null">
  429. car_no,
  430. </if>
  431. <if test="customerPhone != null">
  432. customer_phone,
  433. </if>
  434. <if test="customerGrade != null">
  435. customer_grade,
  436. </if>
  437. <if test="oilType != null">
  438. oil_type
  439. </if>
  440. </trim>
  441. <trim prefix="values (" suffix=")" suffixOverrides=",">
  442. <if test="orderId != null">
  443. #{orderId,jdbcType=INTEGER},
  444. </if>
  445. <if test="orderNo != null">
  446. #{orderNo,jdbcType=VARCHAR},
  447. </if>
  448. <if test="oilGun != null">
  449. #{oilGun,jdbcType=VARCHAR},
  450. </if>
  451. <if test="oilName != null">
  452. #{oilName,jdbcType=VARCHAR},
  453. </if>
  454. <if test="oilPirce != null">
  455. #{oilPirce,jdbcType=DOUBLE},
  456. </if>
  457. <if test="consumerId != null">
  458. #{consumerId,jdbcType=INTEGER},
  459. </if>
  460. <if test="consumer != null">
  461. #{consumer,jdbcType=VARCHAR},
  462. </if>
  463. <if test="amt != null">
  464. #{amt,jdbcType=DOUBLE},
  465. </if>
  466. <if test="stationId != null">
  467. #{stationId,jdbcType=INTEGER},
  468. </if>
  469. <if test="status != null">
  470. #{status,jdbcType=VARCHAR},
  471. </if>
  472. <if test="orderLiters != null">
  473. #{orderLiters,jdbcType=VARCHAR},
  474. </if>
  475. <if test="payType != null">
  476. #{payType,jdbcType=VARCHAR},
  477. </if>
  478. <if test="payWay != null">
  479. #{payWay,jdbcType=VARCHAR},
  480. </if>
  481. <if test="payDate != null">
  482. #{payDate,jdbcType=TIMESTAMP},
  483. </if>
  484. <if test="oilPersonnel != null">
  485. #{oilPersonnel,jdbcType=VARCHAR},
  486. </if>
  487. <if test="createdDate != null">
  488. #{createdDate,jdbcType=TIMESTAMP},
  489. </if>
  490. <if test="orderType != null">
  491. #{orderType,jdbcType=CHAR},
  492. </if>
  493. <if test="stationName != null">
  494. #{stationName,jdbcType=VARCHAR},
  495. </if>
  496. <if test="receivableAmt != null">
  497. #{receivableAmt,jdbcType=DOUBLE},
  498. </if>
  499. <if test="receivedAmt != null">
  500. #{receivedAmt,jdbcType=DOUBLE},
  501. </if>
  502. <if test="discountAmt != null">
  503. #{discountAmt,jdbcType=DOUBLE},
  504. </if>
  505. <if test="discountCouponAmt != null">
  506. #{discountCouponAmt,jdbcType=DOUBLE},
  507. </if>
  508. <if test="discountCoupon != null">
  509. #{discountCoupon,jdbcType=VARCHAR},
  510. </if>
  511. <if test="wxAmt != null">
  512. #{wxAmt,jdbcType=DOUBLE},
  513. </if>
  514. <if test="zfbAmt != null">
  515. #{zfbAmt,jdbcType=DOUBLE},
  516. </if>
  517. <if test="posAmt != null">
  518. #{posAmt,jdbcType=DOUBLE},
  519. </if>
  520. <if test="xjAmt != null">
  521. #{xjAmt,jdbcType=DOUBLE},
  522. </if>
  523. <if test="didiAppAmt != null">
  524. #{didiAppAmt,jdbcType=DOUBLE},
  525. </if>
  526. <if test="tyAppAmt != null">
  527. #{tyAppAmt,jdbcType=DOUBLE},
  528. </if>
  529. <if test="otherAmt != null">
  530. #{otherAmt,jdbcType=DOUBLE},
  531. </if>
  532. <if test="dzkAmt != null">
  533. #{dzkAmt,jdbcType=DOUBLE},
  534. </if>
  535. <if test="score != null">
  536. #{score,jdbcType=INTEGER},
  537. </if>
  538. <if test="memberNo != null">
  539. #{memberNo,jdbcType=VARCHAR},
  540. </if>
  541. <if test="memberAmt != null">
  542. #{memberAmt,jdbcType=DOUBLE},
  543. </if>
  544. <if test="printCount != null">
  545. #{printCount,jdbcType=INTEGER},
  546. </if>
  547. <if test="carNo != null">
  548. #{carNo,jdbcType=VARCHAR},
  549. </if>
  550. <if test="customerPhone != null">
  551. #{customerPhone,jdbcType=VARCHAR},
  552. </if>
  553. <if test="customerGrade != null">
  554. #{customerGrade,jdbcType=VARCHAR},
  555. </if>
  556. <if test="oilType != null">
  557. #{oilType,jdbcType=VARCHAR}
  558. </if>
  559. </trim>
  560. </insert>
  561. <select id="countByExample" parameterType="com.platform.yijia.pojo.PayOrderExample" resultType="java.lang.Long">
  562. <!--
  563. WARNING - @mbg.generated
  564. This element is automatically generated by MyBatis Generator, do not modify.
  565. -->
  566. select count(*) from pay_order
  567. <if test="_parameter != null">
  568. <include refid="Example_Where_Clause" />
  569. </if>
  570. </select>
  571. <update id="updateByExampleSelective" parameterType="map">
  572. <!--
  573. WARNING - @mbg.generated
  574. This element is automatically generated by MyBatis Generator, do not modify.
  575. -->
  576. update pay_order
  577. <set>
  578. <if test="record.orderId != null">
  579. order_id = #{record.orderId,jdbcType=INTEGER},
  580. </if>
  581. <if test="record.orderNo != null">
  582. order_no = #{record.orderNo,jdbcType=VARCHAR},
  583. </if>
  584. <if test="record.oilGun != null">
  585. oil_gun = #{record.oilGun,jdbcType=VARCHAR},
  586. </if>
  587. <if test="record.oilName != null">
  588. oil_name = #{record.oilName,jdbcType=VARCHAR},
  589. </if>
  590. <if test="record.oilPirce != null">
  591. oil_pirce = #{record.oilPirce,jdbcType=VARCHAR},
  592. </if>
  593. <if test="record.consumerId != null">
  594. consumer_id = #{record.consumerId,jdbcType=INTEGER},
  595. </if>
  596. <if test="record.consumer != null">
  597. consumer = #{record.consumer,jdbcType=VARCHAR},
  598. </if>
  599. <if test="record.amt != null">
  600. amt = #{record.amt,jdbcType=DOUBLE},
  601. </if>
  602. <if test="record.stationId != null">
  603. station_id = #{record.stationId,jdbcType=INTEGER},
  604. </if>
  605. <if test="record.status != null">
  606. status = #{record.status,jdbcType=VARCHAR},
  607. </if>
  608. <if test="record.orderLiters != null">
  609. order_liters = #{record.orderLiters,jdbcType=VARCHAR},
  610. </if>
  611. <if test="record.payType != null">
  612. pay_type = #{record.payType,jdbcType=VARCHAR},
  613. </if>
  614. <if test="record.payWay != null">
  615. pay_way = #{record.payWay,jdbcType=VARCHAR},
  616. </if>
  617. <if test="record.payDate != null">
  618. pay_date = #{record.payDate,jdbcType=TIMESTAMP},
  619. </if>
  620. <if test="record.oilPersonnel != null">
  621. oil_personnel = #{record.oilPersonnel,jdbcType=VARCHAR},
  622. </if>
  623. <if test="record.createdDate != null">
  624. created_date = #{record.createdDate,jdbcType=TIMESTAMP},
  625. </if>
  626. <if test="record.orderType != null">
  627. order_type = #{record.orderType,jdbcType=CHAR},
  628. </if>
  629. <if test="record.stationName != null">
  630. station_name = #{record.stationName,jdbcType=VARCHAR},
  631. </if>
  632. <if test="record.receivableAmt != null">
  633. receivable_amt = #{record.receivableAmt,jdbcType=DOUBLE},
  634. </if>
  635. <if test="record.receivedAmt != null">
  636. received_amt = #{record.receivedAmt,jdbcType=DOUBLE},
  637. </if>
  638. <if test="record.discountAmt != null">
  639. discount_amt = #{record.discountAmt,jdbcType=DOUBLE},
  640. </if>
  641. <if test="record.discountCouponAmt != null">
  642. discount_coupon_amt = #{record.discountCouponAmt,jdbcType=DOUBLE},
  643. </if>
  644. <if test="record.discountCoupon != null">
  645. discount_coupon = #{record.discountCoupon,jdbcType=VARCHAR},
  646. </if>
  647. <if test="record.wxAmt != null">
  648. wx_amt = #{record.wxAmt,jdbcType=DOUBLE},
  649. </if>
  650. <if test="record.zfbAmt != null">
  651. zfb_amt = #{record.zfbAmt,jdbcType=DOUBLE},
  652. </if>
  653. <if test="record.posAmt != null">
  654. pos_amt = #{record.posAmt,jdbcType=DOUBLE},
  655. </if>
  656. <if test="record.xjAmt != null">
  657. xj_amt = #{record.xjAmt,jdbcType=DOUBLE},
  658. </if>
  659. <if test="record.didiAppAmt != null">
  660. didi_app_amt = #{record.didiAppAmt,jdbcType=DOUBLE},
  661. </if>
  662. <if test="record.tyAppAmt != null">
  663. ty_app_amt = #{record.tyAppAmt,jdbcType=DOUBLE},
  664. </if>
  665. <if test="record.otherAmt != null">
  666. other_amt = #{record.otherAmt,jdbcType=DOUBLE},
  667. </if>
  668. <if test="record.dzkAmt != null">
  669. dzk_amt = #{record.dzkAmt,jdbcType=DOUBLE},
  670. </if>
  671. <if test="record.score != null">
  672. score = #{record.score,jdbcType=INTEGER},
  673. </if>
  674. <if test="record.memberNo != null">
  675. member_no = #{record.memberNo,jdbcType=VARCHAR},
  676. </if>
  677. <if test="record.memberAmt != null">
  678. member_amt = #{record.memberAmt,jdbcType=DOUBLE},
  679. </if>
  680. <if test="record.printCount != null">
  681. print_count = #{record.printCount,jdbcType=INTEGER},
  682. </if>
  683. <if test="record.carNo != null">
  684. car_no = #{record.carNo,jdbcType=VARCHAR},
  685. </if>
  686. <if test="record.customerPhone != null">
  687. customer_phone = #{record.customerPhone,jdbcType=VARCHAR},
  688. </if>
  689. <if test="record.customerGrade != null">
  690. customer_grade = #{record.customerGrade,jdbcType=VARCHAR},
  691. </if>
  692. <if test="oilType != null">
  693. oil_type = #{record.oilType,jdbcType=VARCHAR},
  694. </if>
  695. </set>
  696. <if test="_parameter != null">
  697. <include refid="Update_By_Example_Where_Clause" />
  698. </if>
  699. </update>
  700. <!--根据订单号查询订单信息和用户信息 此方法在随行付回调之后修改状态完成后-->
  701. <select id="getOrderInfoAndUserInfoByOrderNo" parameterType="com.platform.yijia.pojo.PayOrder" resultType="map">
  702. SELECT
  703. A.order_no AS orderNo,
  704. A.consumer AS consumer,
  705. A.station_name AS stationName,
  706. A.station_id AS stationId,
  707. A.status AS status,
  708. A.pay_way AS payWay,
  709. A.oil_name AS oilName,
  710. A.oil_gun AS oilGun,
  711. A.order_liters AS orderLiters,
  712. A.amt AS amt,
  713. A.order_type AS orderType,
  714. A.oil_pirce AS oilPirce,
  715. A.receivable_amt AS receivableAmt,
  716. A.discount_amt AS discountAmt,
  717. A.created_date AS createdDate,
  718. B.user_type AS userType,
  719. B.blog_openid AS blogOpenid,
  720. B.mina_openid AS minaOpenid,
  721. B.union_id AS unionId,
  722. B.mobile_phone AS mobilePhone
  723. FROM
  724. pay_order AS A
  725. LEFT JOIN app_user_info AS B ON A.consumer_id = B.user_id
  726. WHERE
  727. A.order_no = #{orderNo}
  728. </select>
  729. <!-- 更新订单-->
  730. <update id="updateOrderStatus" parameterType="com.platform.yijia.pojo.PayOrder">
  731. UPDATE
  732. pay_order
  733. <set>
  734. <if test="status != null">
  735. status = #{status,jdbcType=VARCHAR},
  736. </if>
  737. <if test="receivedAmt != null">
  738. received_amt = #{receivedAmt,jdbcType=DOUBLE},
  739. </if>
  740. <if test="payDate != null">
  741. pay_date = #{payDate,jdbcType=TIMESTAMP},
  742. </if>
  743. <if test="printCount != null">
  744. print_count = #{printCount,jdbcType=INTEGER},
  745. </if>
  746. </set>
  747. <where>
  748. order_no = #{orderNo,jdbcType=VARCHAR}
  749. </where>
  750. </update>
  751. <!--根据用户登录openId 获取用户信息用于插入客户表-->
  752. <select id="getUserInfoByOpenId" parameterType="com.platform.yijia.pojo.AppUserInfo" resultType="com.platform.yijia.pojo.AppUserInfo">
  753. SELECT
  754. user_id AS userId,
  755. blog_nick_name AS blogNickName,
  756. mina_openid AS minaOpenid,
  757. blog_openid AS blogOpenid,
  758. registe_date AS registeDate,
  759. mobile_phone AS mobilePhone,
  760. user_type AS userType,
  761. union_id AS unionId
  762. FROM
  763. app_user_info
  764. <where>
  765. <if test="mobilePhone !=null and mobilePhone !='' ">
  766. mobile_phone = #{mobilePhone}
  767. </if>
  768. </where>
  769. </select>
  770. <!-- 判断客户表是否已存在-->
  771. <select id="isExistCustomer" parameterType="com.platform.yijia.pojo.CustomerManage" resultType="com.platform.yijia.pojo.CustomerManage">
  772. SELECT
  773. id AS id,
  774. member_id AS memberId,
  775. member_grade AS memberGrade,
  776. phone_number AS phoneNumber,
  777. regtime AS regtime,
  778. station_name AS stationName,
  779. oil_name AS oilName,
  780. liters AS liters,
  781. amt AS amt
  782. FROM
  783. customer_manage
  784. <where>
  785. <if test="phoneNumber !=null and phoneNumber !='' ">
  786. phone_number = #{phoneNumber}
  787. </if>
  788. <if test="stationId !=null and stationId !='' ">
  789. AND station_id = #{stationId}
  790. </if>
  791. <if test="oilName !=null and oilName !='' ">
  792. AND oil_name = #{oilName}
  793. </if>
  794. </where>
  795. </select>
  796. <!-- 根据手机号更新客户表 -->
  797. <update id="updateCustomerByPhoneNumber" parameterType="com.platform.yijia.pojo.CustomerManage">
  798. UPDATE
  799. customer_manage
  800. <set>
  801. <if test="customerName !=null ">
  802. customer_name = #{customerName},
  803. </if>
  804. <if test="phoneNumber !=null ">
  805. phone_number = #{phoneNumber},
  806. </if>
  807. <if test="regtime !=null ">
  808. regtime = #{regtime},
  809. </if>
  810. <if test="stationName !=null ">
  811. station_name = #{stationName},
  812. </if>
  813. <if test="stationId !=null ">
  814. station_id = #{stationId},
  815. </if>
  816. <if test="blogUserId !=null ">
  817. blog_user_id = #{blogUserId},
  818. </if>
  819. <if test="minaUserId !=null ">
  820. mina_user_id = #{minaUserId},
  821. </if>
  822. <if test="oilName !=null ">
  823. oil_name = #{oilName},
  824. </if>
  825. <if test="liters !=null ">
  826. liters = #{liters},
  827. </if>
  828. <if test="amt !=null ">
  829. amt = #{amt},
  830. </if>
  831. <if test="unionId !=null and unionId !=null">
  832. union_id = #{unionId},
  833. </if>
  834. </set>
  835. <where>
  836. <if test="phoneNumber !=null and phoneNumber !='' ">
  837. phone_number = #{phoneNumber}
  838. </if>
  839. </where>
  840. </update>
  841. <!-- 更新客户表 -->
  842. <update id="updateCustomer" parameterType="com.platform.yijia.pojo.CustomerManage">
  843. UPDATE
  844. customer_manage
  845. <set>
  846. <if test="memberGrade !=null ">
  847. member_grade = #{memberGrade},
  848. </if>
  849. <if test="customerName !=null ">
  850. customer_name = #{customerName},
  851. </if>
  852. <if test="phoneNumber !=null ">
  853. phone_number = #{phoneNumber},
  854. </if>
  855. <if test="regtime !=null ">
  856. regtime = #{regtime},
  857. </if>
  858. <if test="stationName !=null ">
  859. station_name = #{stationName},
  860. </if>
  861. <if test="oilName !=null ">
  862. oil_name = #{oilName},
  863. </if>
  864. <if test="liters !=null ">
  865. liters = #{liters},
  866. </if>
  867. <if test="amt !=null ">
  868. amt = #{amt},
  869. </if>
  870. <if test="grade !=null ">
  871. grade = #{grade},
  872. </if>
  873. </set>
  874. <where>
  875. <if test="stationId != null and stationId !='' ">
  876. station_id = #{stationId}
  877. </if>
  878. <if test="phoneNumber !=null and phoneNumber !='' ">
  879. AND phone_number = #{phoneNumber}
  880. </if>
  881. <if test="oilName !=null and oilName !='' ">
  882. AND oil_name = #{oilName}
  883. </if>
  884. </where>
  885. </update>
  886. <!-- 插入客户表 -->
  887. <insert id="insertCustomer" parameterType="com.platform.yijia.pojo.CustomerManage">
  888. INSERT INTO customer_manage
  889. <trim prefix="(" suffix=")" suffixOverrides=",">
  890. <if test="memberId !=null ">
  891. member_id,
  892. </if>
  893. <if test="customerName !=null ">
  894. customer_name,
  895. </if>
  896. <if test="commendMan !=null ">
  897. commend_man,
  898. </if>
  899. <if test="memberGrade !=null ">
  900. member_grade,
  901. </if>
  902. <if test="phoneNumber !=null ">
  903. phone_number,
  904. </if>
  905. <if test="carNumber !=null ">
  906. car_number,
  907. </if>
  908. <if test="balance !=null ">
  909. balance,
  910. </if>
  911. <if test="integral !=null ">
  912. integral,
  913. </if>
  914. <if test="specialCarType !=null ">
  915. specialCarType,
  916. </if>
  917. <if test="regtime !=null ">
  918. regtime,
  919. </if>
  920. <if test="stationId !=null ">
  921. station_id,
  922. </if>
  923. <if test="stationName !=null ">
  924. station_name,
  925. </if>
  926. <if test="oilName !=null ">
  927. oil_name,
  928. </if>
  929. <if test="liters !=null ">
  930. liters,
  931. </if>
  932. <if test="amt !=null ">
  933. amt,
  934. </if>
  935. <if test="cyGrade !=null ">
  936. cy_grade,
  937. </if>
  938. <if test="qyGrade !=null ">
  939. qy_grade,
  940. </if>
  941. <if test="blogOpenid !=null ">
  942. blog_openid,
  943. </if>
  944. <if test="minaOpenid !=null ">
  945. mina_openid,
  946. </if>
  947. <if test="blogUserId !=null ">
  948. blog_user_id,
  949. </if>
  950. <if test="minaUserId !=null ">
  951. mina_user_id,
  952. </if>
  953. <if test="grade !=null ">
  954. grade,
  955. </if>
  956. <if test="unionId !=null and unionId !=''">
  957. union_id
  958. </if>
  959. </trim>
  960. <trim prefix="values (" suffix=")" suffixOverrides=",">
  961. <if test="memberId !=null ">
  962. #{memberId},
  963. </if>
  964. <if test="customerName !=null ">
  965. #{customerName},
  966. </if>
  967. <if test="commendMan !=null ">
  968. #{commendMan},
  969. </if>
  970. <if test="memberGrade !=null ">
  971. #{memberGrade},
  972. </if>
  973. <if test="phoneNumber !=null ">
  974. #{phoneNumber},
  975. </if>
  976. <if test="carNumber !=null ">
  977. #{carNumber},
  978. </if>
  979. <if test="balance !=null ">
  980. #{balance},
  981. </if>
  982. <if test="integral !=null ">
  983. #{integral},
  984. </if>
  985. <if test="specialCarType !=null ">
  986. #{specialCarType},
  987. </if>
  988. <if test="regtime !=null ">
  989. #{regtime},
  990. </if>
  991. <if test="stationId !=null ">
  992. #{stationId, jdbcType=INTEGER},
  993. </if>
  994. <if test="stationName !=null ">
  995. #{stationName, jdbcType=VARCHAR},
  996. </if>
  997. <if test="oilName !=null ">
  998. #{oilName},
  999. </if>
  1000. <if test="liters !=null ">
  1001. #{liters},
  1002. </if>
  1003. <if test="amt !=null ">
  1004. #{amt},
  1005. </if>
  1006. <if test="cyGrade !=null ">
  1007. #{cyGrade},
  1008. </if>
  1009. <if test="qyGrade !=null ">
  1010. #{qyGrade},
  1011. </if>
  1012. <if test="blogOpenid !=null ">
  1013. #{blogOpenid},
  1014. </if>
  1015. <if test="minaOpenid !=null ">
  1016. #{minaOpenid, jdbcType=VARCHAR},
  1017. </if>
  1018. <if test="blogUserId !=null ">
  1019. #{blogUserId, jdbcType=INTEGER},
  1020. </if>
  1021. <if test="minaUserId !=null ">
  1022. #{minaUserId, jdbcType=INTEGER},
  1023. </if>
  1024. <if test="grade !=null ">
  1025. #{grade, jdbcType=VARCHAR},
  1026. </if>
  1027. <if test="unionId !=null and unionId !=''">
  1028. #{unionId, jdbcType=VARCHAR}
  1029. </if>
  1030. </trim>
  1031. </insert>
  1032. <update id="updateByExample" parameterType="map">
  1033. <!--
  1034. WARNING - @mbg.generated
  1035. This element is automatically generated by MyBatis Generator, do not modify.
  1036. -->
  1037. update pay_order
  1038. set order_id = #{record.orderId,jdbcType=INTEGER},
  1039. order_no = #{record.orderNo,jdbcType=VARCHAR},
  1040. oil_gun = #{record.oilGun,jdbcType=VARCHAR},
  1041. oil_name = #{record.oilName,jdbcType=VARCHAR},
  1042. oil_pirce = #{record.oilPirce,jdbcType=VARCHAR},
  1043. consumer_id = #{record.consumerId,jdbcType=INTEGER},
  1044. consumer = #{record.consumer,jdbcType=VARCHAR},
  1045. amt = #{record.amt,jdbcType=DOUBLE},
  1046. station_id = #{record.stationId,jdbcType=INTEGER},
  1047. status = #{record.status,jdbcType=VARCHAR},
  1048. order_liters = #{record.orderLiters,jdbcType=VARCHAR},
  1049. pay_type = #{record.payType,jdbcType=VARCHAR},
  1050. pay_way = #{record.payWay,jdbcType=VARCHAR},
  1051. pay_date = #{record.payDate,jdbcType=TIMESTAMP},
  1052. oil_personnel = #{record.oilPersonnel,jdbcType=VARCHAR},
  1053. created_date = #{record.createdDate,jdbcType=TIMESTAMP},
  1054. order_type = #{record.orderType,jdbcType=CHAR},
  1055. station_name = #{record.stationName,jdbcType=VARCHAR},
  1056. receivable_amt = #{record.receivableAmt,jdbcType=DOUBLE},
  1057. received_amt = #{record.receivedAmt,jdbcType=DOUBLE},
  1058. discount_amt = #{record.discountAmt,jdbcType=DOUBLE},
  1059. discount_coupon_amt = #{record.discountCouponAmt,jdbcType=DOUBLE},
  1060. discount_coupon = #{record.discountCoupon,jdbcType=DOUBLE},
  1061. wx_amt = #{record.wxAmt,jdbcType=DOUBLE},
  1062. zfb_amt = #{record.zfbAmt,jdbcType=DOUBLE},
  1063. pos_amt = #{record.posAmt,jdbcType=DOUBLE},
  1064. xj_amt = #{record.xjAmt,jdbcType=DOUBLE},
  1065. didi_app_amt = #{record.didiAppAmt,jdbcType=DOUBLE},
  1066. ty_app_amt = #{record.tyAppAmt,jdbcType=DOUBLE},
  1067. other_amt = #{record.otherAmt,jdbcType=DOUBLE},
  1068. dzk_amt = #{record.dzkAmt,jdbcType=DOUBLE},
  1069. score = #{record.score,jdbcType=INTEGER},
  1070. member_no = #{record.memberNo,jdbcType=VARCHAR},
  1071. member_amt = #{record.memberAmt,jdbcType=DOUBLE},
  1072. print_count = #{record.printCount,jdbcType=INTEGER},
  1073. car_no = #{record.carNo,jdbcType=VARCHAR},
  1074. customer_phone = #{record.customerPhone,jdbcType=VARCHAR},
  1075. customer_grade = #{record.customerGrade,jdbcType=VARCHAR},
  1076. oil_type = #{record.oilType,jdbcType=VARCHAR}
  1077. <if test="_parameter != null">
  1078. <include refid="Update_By_Example_Where_Clause" />
  1079. </if>
  1080. </update>
  1081. <update id="updateByPrimaryKeySelective" parameterType="com.platform.yijia.pojo.PayOrder">
  1082. <!--
  1083. WARNING - @mbg.generated
  1084. This element is automatically generated by MyBatis Generator, do not modify.
  1085. -->
  1086. update pay_order
  1087. <set>
  1088. <if test="orderNo != null">
  1089. order_no = #{orderNo,jdbcType=VARCHAR},
  1090. </if>
  1091. <if test="oilGun != null">
  1092. oil_gun = #{oilGun,jdbcType=VARCHAR},
  1093. </if>
  1094. <if test="oilName != null">
  1095. oil_name = #{oilName,jdbcType=VARCHAR},
  1096. </if>
  1097. <if test="oilPirce != null">
  1098. oil_pirce = #{oilPirce,jdbcType=DOUBLE},
  1099. </if>
  1100. <if test="consumerId != null">
  1101. consumer_id = #{consumerId,jdbcType=INTEGER},
  1102. </if>
  1103. <if test="consumer != null">
  1104. consumer = #{consumer,jdbcType=VARCHAR},
  1105. </if>
  1106. <if test="amt != null">
  1107. amt = #{amt,jdbcType=DOUBLE},
  1108. </if>
  1109. <if test="stationId != null">
  1110. station_id = #{stationId,jdbcType=INTEGER},
  1111. </if>
  1112. <if test="status != null">
  1113. status = #{status,jdbcType=VARCHAR},
  1114. </if>
  1115. <if test="orderLiters != null">
  1116. order_liters = #{orderLiters,jdbcType=VARCHAR},
  1117. </if>
  1118. <if test="payType != null">
  1119. pay_type = #{payType,jdbcType=VARCHAR},
  1120. </if>
  1121. <if test="payWay != null">
  1122. pay_way = #{payWay,jdbcType=VARCHAR},
  1123. </if>
  1124. <if test="payDate != null">
  1125. pay_date = #{payDate,jdbcType=TIMESTAMP},
  1126. </if>
  1127. <if test="oilPersonnel != null">
  1128. oil_personnel = #{oilPersonnel,jdbcType=VARCHAR},
  1129. </if>
  1130. <if test="createdDate != null">
  1131. created_date = #{createdDate,jdbcType=TIMESTAMP},
  1132. </if>
  1133. <if test="orderType != null">
  1134. order_type = #{orderType,jdbcType=CHAR},
  1135. </if>
  1136. <if test="stationName != null">
  1137. station_name = #{stationName,jdbcType=CHAR},
  1138. </if>
  1139. <if test="receivableAmt != null">
  1140. receivable_amt = #{receivableAmt,jdbcType=DOUBLE},
  1141. </if>
  1142. <if test="receivedAmt != null">
  1143. received_amt = #{receivedAmt,jdbcType=DOUBLE},
  1144. </if>
  1145. <if test="discountAmt != null">
  1146. discount_amt = #{discountAmt,jdbcType=DOUBLE},
  1147. </if>
  1148. <if test="discountCouponAmt != null">
  1149. discount_coupon_amt = #{discountCouponAmt,jdbcType=DOUBLE},
  1150. </if>
  1151. <if test="discountCoupon != null">
  1152. discount_coupon = #{discountCoupon,jdbcType=VARCHAR},
  1153. </if>
  1154. <if test="wxAmt != null">
  1155. wx_amt = #{wxAmt,jdbcType=DOUBLE},
  1156. </if>
  1157. <if test="zfbAmt != null">
  1158. zfb_amt = #{zfbAmt,jdbcType=DOUBLE},
  1159. </if>
  1160. <if test="posAmt != null">
  1161. pos_amt = #{posAmt,jdbcType=DOUBLE},
  1162. </if>
  1163. <if test="xjAmt != null">
  1164. xj_amt = #{xjAmt,jdbcType=DOUBLE},
  1165. </if>
  1166. <if test="didiAppAmt != null">
  1167. didi_app_amt = #{didiAppAmt,jdbcType=DOUBLE},
  1168. </if>
  1169. <if test="tyAppAmt != null">
  1170. ty_app_amt = #{tyAppAmt,jdbcType=DOUBLE},
  1171. </if>
  1172. <if test="otherAmt != null">
  1173. other_amt = #{otherAmt,jdbcType=DOUBLE},
  1174. </if>
  1175. <if test="dzkAmt != null">
  1176. dzk_amt = #{dzkAmt,jdbcType=DOUBLE},
  1177. </if>
  1178. <if test="score != null">
  1179. score = #{score,jdbcType=INTEGER},
  1180. </if>
  1181. <if test="memberNo != null">
  1182. member_no = #{memberNo,jdbcType=VARCHAR},
  1183. </if>
  1184. <if test="memberAmt != null">
  1185. member_amt = #{memberAmt,jdbcType=DOUBLE},
  1186. </if>
  1187. <if test="printCount != null">
  1188. print_count = #{printCount,jdbcType=INTEGER},
  1189. </if>
  1190. <if test="carNo != null">
  1191. car_no = #{carNo,jdbcType=VARCHAR},
  1192. </if>
  1193. <if test="customerPhone != null">
  1194. customer_phone = #{customerPhone,jdbcType=VARCHAR},
  1195. </if>
  1196. <if test="oilType != null">
  1197. oil_type = #{oilType,jdbcType=VARCHAR}
  1198. </if>
  1199. </set>
  1200. where order_id = #{orderId,jdbcType=INTEGER}
  1201. </update>
  1202. <update id="updateByPrimaryKey" parameterType="com.platform.yijia.pojo.PayOrder">
  1203. <!--
  1204. WARNING - @mbg.generated
  1205. This element is automatically generated by MyBatis Generator, do not modify.
  1206. -->
  1207. update pay_order
  1208. set order_no = #{orderNo,jdbcType=VARCHAR},
  1209. oil_gun = #{oilGun,jdbcType=VARCHAR},
  1210. oil_name = #{oilName,jdbcType=VARCHAR},
  1211. oil_pirce = #{oilPirce,jdbcType=DOUBLE},
  1212. consumer_id = #{consumerId,jdbcType=INTEGER},
  1213. consumer = #{consumer,jdbcType=VARCHAR},
  1214. amt = #{amt,jdbcType=VARCHAR},
  1215. station_id = #{stationId,jdbcType=INTEGER},
  1216. status = #{status,jdbcType=VARCHAR},
  1217. order_liters = #{orderLiters,jdbcType=VARCHAR},
  1218. pay_type = #{payType,jdbcType=VARCHAR},
  1219. pay_way = #{payWay,jdbcType=VARCHAR},
  1220. pay_date = #{payDate,jdbcType=TIMESTAMP},
  1221. oil_personnel = #{oilPersonnel,jdbcType=VARCHAR},
  1222. created_date = #{createdDate,jdbcType=TIMESTAMP},
  1223. order_type = #{orderType,jdbcType=CHAR}
  1224. station_name = #{stationName,jdbcType=VARCHAR},
  1225. receivable_amt = #{receivableAmt,jdbcType=DOUBLE},
  1226. received_amt = #{receivedAmt,jdbcType=DOUBLE},
  1227. discount_amt = #{discountAmt,jdbcType=DOUBLE},
  1228. discount_coupon_amt = #{discountCouponAmt,jdbcType=DOUBLE},
  1229. discount_coupon = #{discountCoupon,jdbcType=DOUBLE},
  1230. wx_amt = #{wxAmt,jdbcType=DOUBLE},
  1231. zfb_amt = #{zfbAmt,jdbcType=DOUBLE},
  1232. pos_amt = #{posAmt,jdbcType=DOUBLE},
  1233. xj_amt = #{xjAmt,jdbcType=DOUBLE},
  1234. didi_app_amt = #{didiAppAmt,jdbcType=DOUBLE},
  1235. ty_app_amt = #{tyAppAmt,jdbcType=DOUBLE},
  1236. other_amt = #{otherAmt,jdbcType=DOUBLE},
  1237. dzk_amt = #{dzkAmt,jdbcType=DOUBLE},
  1238. score = #{score,jdbcType=INTEGER},
  1239. member_no = #{memberNo,jdbcType=VARCHAR},
  1240. member_amt = #{memberAmt,jdbcType=DOUBLE},
  1241. print_count = #{printCount,jdbcType=INTEGER},
  1242. car_no = #{carNo,jdbcType=VARCHAR},
  1243. customer_phone = #{customerPhone,jdbcType=VARCHAR},
  1244. customer_grade = #{customerGrade,jdbcType=VARCHAR},
  1245. oil_type = #{oilType,jdbcType=VARCHAR}
  1246. where order_id = #{orderId,jdbcType=INTEGER}
  1247. </update>
  1248. </mapper>