12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.platform.yijia.dao.PayOrderMapper">
- <!--订单对象实体类-->
- <resultMap id="BaseResultMap" type="com.platform.yijia.pojo.PayOrder">
- <id column="order_id" jdbcType="INTEGER" property="orderId" />
- <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
- <result column="oil_gun" jdbcType="VARCHAR" property="oilGun" />
- <result column="oil_name" jdbcType="VARCHAR" property="oilName" />
- <result column="oil_pirce" jdbcType="VARCHAR" property="oilPirce" />
- <result column="consumer_id" jdbcType="INTEGER" property="consumerId" />
- <result column="consumer" jdbcType="VARCHAR" property="consumer" />
- <result column="amt" jdbcType="DOUBLE" property="amt" />
- <result column="station_id" jdbcType="INTEGER" property="stationId" />
- <result column="status" jdbcType="VARCHAR" property="status" />
- <result column="order_liters" jdbcType="VARCHAR" property="orderLiters" />
- <result column="pay_type" jdbcType="VARCHAR" property="payType" />
- <result column="pay_way" jdbcType="VARCHAR" property="payWay" />
- <result column="pay_date" jdbcType="TIMESTAMP" property="payDate" />
- <result column="oil_personnel" jdbcType="VARCHAR" property="oilPersonnel" />
- <result column="created_date" jdbcType="TIMESTAMP" property="createdDate" />
- <result column="order_type" jdbcType="CHAR" property="orderType" />
- <result column="station_name" jdbcType="CHAR" property="stationName" />
- <result column="receivable_amt" jdbcType="DOUBLE" property="receivableAmt" />
- <result column="received_amt" jdbcType="DOUBLE" property="receivedAmt" />
- <result column="discount_coupon" jdbcType="VARCHAR" property="discountCoupon" />
- <result column="discount_amt" jdbcType="DOUBLE" property="discountAmt" />
- <result column="discount_coupon_amt" jdbcType="DOUBLE" property="discountCouponAmt" />
- <result column="wx_amt" jdbcType="DOUBLE" property="wxAmt" />
- <result column="zfb_amt" jdbcType="DOUBLE" property="zfbAmt" />
- <result column="pos_amt" jdbcType="DOUBLE" property="posAmt" />
- <result column="xj_amt" jdbcType="DOUBLE" property="xjAmt" />
- <result column="didi_app_amt" jdbcType="DOUBLE" property="didiAppAmt" />
- <result column="ty_app_amt" jdbcType="DOUBLE" property="tyAppAmt" />
- <result column="other_amt" jdbcType="DOUBLE" property="otherAmt" />
- <result column="dzk_amt" jdbcType="DOUBLE" property="dzkAmt" />
- <result column="score" jdbcType="INTEGER" property="score" />
- <result column="member_no" jdbcType="VARCHAR" property="memberNo" />
- <result column="member_amt" jdbcType="DOUBLE" property="memberAmt" />
- <result column="print_count" jdbcType="INTEGER" property="printCount" />
- <result column="car_no" jdbcType="VARCHAR" property="carNo" />
- <result column="customer_phone" jdbcType="VARCHAR" property="customerPhone" />
- <result column="customer_grade" jdbcType="VARCHAR" property="customerGrade" />
- <result column="oil_type" jdbcType="VARCHAR" property="oilType" />
- <result column="payTypeName" property="payTypeName" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <where>
- <foreach collection="oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Update_By_Example_Where_Clause">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- <where>
- <foreach collection="example.oredCriteria" item="criteria" separator="or">
- <if test="criteria.valid">
- <trim prefix="(" prefixOverrides="and" suffix=")">
- <foreach collection="criteria.criteria" item="criterion">
- <choose>
- <when test="criterion.noValue">
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue">
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue">
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue">
- and ${criterion.condition}
- <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List_PayTypeName_Status">
- T1.order_id, T1.order_no, T1.oil_gun, T1.oil_name, T1.oil_pirce, T1.consumer_id, T1.consumer, T1.amt, T1.station_id,
- CASE T1.status WHEN "1" THEN "已支付" ELSE "未支付" END AS status,
- T1.order_liters, T1.pay_type, T1.pay_way, T1.pay_date, T1.oil_personnel, T1.created_date, T1.order_type, T1.station_name,
- T1.receivable_amt, T1.received_amt, T1.discount_amt, T1.discount_coupon_amt, T1.discount_coupon, T1.wx_amt,
- T1.zfb_amt, T1.pos_amt, T1.xj_amt, T1.didi_app_amt, T1.ty_app_amt, T1.other_amt, T1.dzk_amt, T1.score, T1.member_no, T1.member_amt,
- T1.print_count, T1.car_no, T1.customer_phone, T1.customer_grade, T1.oil_type,
- T2.dict_label AS payTypeName
- </sql>
- <sql id="Base_Column_List">
- order_id, order_no, oil_gun, oil_name, oil_pirce, consumer_id, consumer, amt, station_id, status,
- order_liters, pay_type, pay_way, pay_date, oil_personnel, created_date, order_type, station_name,
- 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, car_no, customer_phone, customer_grade, oil_type
- </sql>
- <!--根据订单号查询订单信息-->
- <select id="selectOrderInfoByOrdNo" parameterType="String" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM
- pay_order
- WHERE
- order_no =#{ordNo}
- </select>
- <sql id="Base_Column_List_oilName">
- SELECT
- T1.dict_label AS oilName,
- COUNT(T2.order_no) AS orderSum,
- SUM(IFNULL(T2.order_liters,0)) AS orderLitersSum,
- SUM(IFNULL(T2.receivable_amt,0)) AS receivableAmtSum,
- SUM(IFNULL(T2.discount_amt,0)) AS discountAmtSum,
- SUM(IFNULL(T2.amt,0)) AS amtSum
- FROM sys_dict_data AS T1
- LEFT JOIN pay_order AS T2 ON T1.dict_label = T2.oil_name
- <if test="stationId !=null">
- AND T2.station_id= #{stationId}
- </if>
- <if test="status !=null">
- AND T2.status= #{status}
- </if>
- <if test="beginTime !=null">
- AND T2.pay_date >= #{beginTime}
- </if>
- <if test="endTime !=null">
- AND T2.pay_date < #{endTime}
- </if>
- WHERE
- T1.dict_type ="oil_name"
- GROUP BY T1.dict_label
- ORDER BY amtSum DESC
- </sql>
- <sql id="Base_Column_List_payType">
- SELECT
- T1.dict_label AS payType,
- COUNT(T2.order_no) AS orderSum,
- SUM(IFNULL(T2.order_liters,0)) AS orderLitersSum,
- SUM(IFNULL(T2.receivable_amt,0)) AS receivableAmtSum,
- SUM(IFNULL(T2.discount_amt,0)) AS discountAmtSum,
- SUM(IFNULL(T2.amt,0)) AS amtSum
- FROM sys_dict_data AS T1
- LEFT JOIN pay_order AS T2 ON T1.dict_value = T2.pay_type
- <if test="stationId !=null">
- AND T2.station_id= #{stationId}
- </if>
- <if test="status !=null">
- AND T2.status= #{status}
- </if>
- <if test="beginTime !=null and beginTime !=''">
- AND T2.pay_date >= #{beginTime}
- </if>
- <if test="endTime !=null">
- AND T2.pay_date < #{endTime}
- </if>
- WHERE
- T1.dict_type ="pay_type"
- GROUP BY T1.dict_label
- ORDER BY amtSum DESC
- </sql>
- <sql id="Base_Column_List_NoGroupBy">
- SELECT
- COUNT(T2.order_no) AS orderSum,
- SUM(IFNULL(T2.order_liters,0)) AS orderLitersSum,
- SUM(IFNULL(T2.receivable_amt,0)) AS receivableAmtSum,
- SUM(IFNULL(T2.discount_amt,0)) AS discountAmtSum,
- SUM(IFNULL(T2.amt,0)) AS amtSum,
- SUM(IFNULL(T2.received_amt,0)) AS receivedAmtSum,
- SUM(IFNULL(T2.print_count,0)) AS printCountSum
- FROM
- pay_order AS T2
- <where>
- <if test="stationId !=null">
- T2.station_id= #{stationId}
- </if>
- <if test="status !=null">
- AND T2.status= #{status}
- </if>
- <if test="beginTime !=null">
- AND T2.pay_date >= #{beginTime}
- </if>
- <if test="endTime !=null">
- AND T2.pay_date < #{endTime}
- </if>
- </where>
- </sql>
- <!--获取支付类型列表-->
- <select id="selectPayTypeList" resultType="com.platform.yijia.pojo.PayType">
- SELECT
- dict_value AS payType,
- dict_label AS payTypeName
- FROM
- sys_dict_data
- WHERE
- dict_type ="pay_type"
- </select>
- <!--查询油品总和-->
- <select id="selectSum" parameterType="com.platform.yijia.pojo.PayOrder" resultType="Map">
- <if test="groupBy !=null and groupBy =='oilName'">
- <include refid="Base_Column_List_oilName"/>
- </if>
- <if test="groupBy !=null and groupBy =='payType'">
- <include refid="Base_Column_List_payType"/>
- </if>
- <if test="groupBy ==''">
- <include refid="Base_Column_List_NoGroupBy"/>
- </if>
- </select>
- <!--查询昨日数据-->
- <select id="selectPosYesterDayData" parameterType="com.platform.yijia.pojo.PayOrder" resultType="map">
- SELECT
- orderSum,
- averPrice,
- amtSum,
- IFNULL(TT2.amtSumTT2, 0) AS lastAmtSum,
- DATE_FORMAT(NOW() -INTERVAL 8 DAY,"%w") AS week,
- IFNULL(ROUND(((amtSum-amtSumTT2)/amtSumTT2),2), 0) AS QOQ
- FROM (
- (SELECT
- T1.station_id,
- IFNULL(SUM(T1.amt), 0) AS amtSum,
- COUNT(T1.order_no) AS orderSum,
- IFNULL(ROUND((SUM(T1.amt)/COUNT(T1.order_no)),2),0) AS averPrice
- FROM pay_order AS T1
- WHERE
- T1.station_id = #{stationId}
- AND T1.`status` = "1"
- AND T1.created_date >= #{beginTime}
- AND T1.created_date < #{endTime}) AS TT1 LEFT JOIN
- (SELECT
- T2.station_id,
- IFNULL(SUM(T2.amt), 0) AS amtSumTT2
- FROM pay_order AS T2
- WHERE
- T2.station_id = #{stationId}
- AND T2.`status` = "1"
- AND T2.created_date >= #{beginTimeQOQ}
- AND T2.created_date < #{endTimeQOQ}) AS TT2 ON TT1.station_id = TT2.station_id
- )
- </select>
- <!--POS机查询近七天数据-->
- <!-- <select id="selectPosRecentlySevenData" parameterType="com.platform.yijia.pojo.PayOrder" resultType="map">-->
- <!-- SELECT-->
- <!-- DATE_FORMAT(T3.days, '%m-%d') AS time,-->
- <!-- SUM(IFNULL(T2.amt,0)) AS amtSum,-->
- <!-- COUNT(T2.order_no) AS orderSum-->
- <!-- FROM (-->
- <!-- ( SELECT-->
- <!-- @date := DATE_ADD(@date, INTERVAL + 1 DAY) AS days-->
- <!-- FROM-->
- <!-- ( SELECT @date := DATE_ADD(#{endTime}, INTERVAL - 8 DAY) FROM pay_order LIMIT 7 ) T1-->
- <!-- ) T3 LEFT JOIN pay_order AS T2 ON T3.days = DATE_FORMAT(T2.created_date, '%Y-%m-%d')-->
- <!-- AND T2.station_id= #{stationId}-->
- <!-- AND T2.status= #{status}-->
- <!-- AND T2.created_date >= #{beginTime}-->
- <!-- AND T2.created_date < #{endTime}-->
- <!-- )-->
- <!-- GROUP BY T3.days-->
- <!-- </select>-->
- <!--POS机查询近七天数据-->
- <select id="selectPosRecentlySevenData" parameterType="com.platform.yijia.pojo.PayOrder" resultType="map">
- SELECT
- V.month_days AS time,
- ROUND(SUM(IFNULL(T1.amt,"0")),2) AS amtSum,
- COUNT(T1.order_no) AS orderSum
- FROM view_recently_seven_day AS V
- LEFT JOIN pay_order AS T1 ON V.month_days = DATE_FORMAT(T1.created_date,'%m-%d')
- <if test="stationId !=null">
- AND T1.station_id= #{stationId}
- </if>
- <if test="status !=null">
- AND T1.status= #{status}
- </if>
- <if test="beginTime !=null">
- AND T1.created_date >= #{beginTime}
- </if>
- <if test="endTime !=null">
- AND T1.created_date < #{endTime}
- </if>
- GROUP BY month_days
- </select>
- <!--查询班结时间内订单-->
- <select id="selectPayOrderListFormater" parameterType="com.platform.yijia.pojo.PayOrder" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List_PayTypeName_Status"/>
- FROM
- pay_order AS T1
- LEFT JOIN sys_dict_data AS T2 ON T1.pay_type = T2.dict_value
- <where>
- <if test="stationId !=null">
- T1.station_id= #{stationId}
- </if>
- <if test="payType !=null and payType !=''">
- AND T1.pay_type= #{payType}
- </if>
- <if test="status !=null">
- AND T1.status= #{status}
- </if>
- <if test="beginTime !=null and beginTime !=''">
- AND T1.pay_date >= #{beginTime}
- </if>
- <if test="endTime !=null and endTime !=''">
- AND T1.pay_date < #{endTime}
- </if>
- </where>
- </select>
- <!--查询班结时间内订单-->
- <select id="selectPayOrderList" parameterType="com.platform.yijia.pojo.PayOrder" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM
- pay_order
- <where>
- <if test="stationId !=null">
- station_id= #{stationId}
- </if>
- <if test="payType !=null and payType !=''">
- AND pay_type= #{payType}
- </if>
- <if test="status !=null">
- AND status= #{status}
- </if>
- <if test="beginTime !=null and beginTime !=''">
- AND pay_date >= #{beginTime}
- </if>
- <if test="endTime !=null and endTime !=''">
- AND pay_date < #{endTime}
- </if>
- </where>
- </select>
- <!--初次班结 班结时间默认为当前时间订单信息-->
- <select id="getPayOrderInfoMin" parameterType="com.platform.yijia.pojo.PayOrder" resultMap="BaseResultMap">
- SELECT
- <include refid="Base_Column_List"/>
- FROM
- pay_order
- <where>
- <if test="stationId !=null">
- station_id= #{stationId}
- </if>
- <if test="status !=null">
- AND status= #{status}
- </if>
- </where>
- ORDER BY pay_date ASC LIMIT 0,1
- </select>
- <!--根据用户openId和用户类型userType查询用户订单-->
- <select id="getOrderListByOpenIdAndUserType" parameterType="com.platform.yijia.pojo.AppUserInfo" resultType="com.platform.yijia.pojo.PayOrder">
- SELECT
- B.order_no AS orderNo,
- B.oil_gun AS oilGun,
- B.oil_name AS oilName,
- B.consumer AS consumer,
- B.order_liters AS orderLiters,
- B.pay_date AS payDate,
- B.amt AS amt,
- B.created_date AS createdDate,
- B.oil_pirce AS oilPirce,
- B.station_name AS stationName,
- B.receivable_amt AS receivableAmt,
- B.discount_amt AS discountAmt,
- B.score AS score,
- B.status AS status,
- B.discount_coupon_amt AS discountCouponAmt
- FROM
- app_user_info AS A LEFT JOIN pay_order AS B ON A.user_id = B.consumer_id
- <where>
- <if test="userType != null and userType !=''">
- A.user_type = #{userType}
- </if>
- <if test="blogOpenid != null and blogOpenid !=''">
- AND A.blog_openid = #{blogOpenid}
- </if>
- <if test="minaOpenid != null and minaOpenid !=''">
- AND A.mina_openid = #{minaOpenid}
- </if>
- </where>
- ORDER BY B.created_date DESC
- </select>
- <!-- 查询加油员-->
- <select id="selectPersonelName" parameterType="map" resultType="map">
- SELECT
- A.personnel_id AS personnelId,
- A.personnel_name AS personelName
- FROM
- station_personnel AS A
- <where>
- <if test="oliGunNo != null and oliGunNo !=''">
- FIND_IN_SET(#{oliGunNo}, A.gun_no)
- </if>
- <if test="stationId !=null and stationId !=''">
- AND A.station_id = #{stationId}
- </if>
- </where>
- </select>
- <!-- 根据油品名称和油站查询油枪编号和价格 -->
- <select id="selectOilGunNoAndOilPrice" parameterType="map" resultType="map">
- SELECT
- A.oil_gun_no AS oliGunNo,
- A.oil_name AS oilName,
- A.station_name AS stationName,
- B.oil_price AS oilPrice,
- C.personnel_name AS personelName
- FROM station_oil_gun AS A
- LEFT JOIN station_oil_price AS B ON A.oil_name = B.oil_name AND A.station_id = B.station_id
- LEFT JOIN station_personnel AS C ON A.oil_gun_no = C.gun_no AND A.station_id = C.station_id
- <where>
- <if test="oliGunNo != null and oliGunNo !=''">
- A.oil_gun_no = #{oliGunNo}
- </if>
- <if test="stationId !=null and stationId !=''">
- AND A.station_id = #{stationId}
- </if>
- </where>
- </select>
- <!-- 根据油品名称和油站id获取当前油品调价信息 -->
- <select id="selectOilPriceAdjust" parameterType="map" resultType="map">
- SELECT
- adjust_price_id AS adjustPriceId,
- oil_name AS oilName,
- oil_adjust_price AS oilAdjustPrice,
- take_effect_status AS takeEffectStatus,
- take_effect_date AS takeEffectDate,
- adjust_date AS adjustDate,
- station_id AS stationId,
- operator AS operator,
- status AS status
- FROM
- station_oil_price_adjust
- <where>
- <if test="oilName !=null and oilName !=''">
- oil_name = #{oilName}
- </if>
- <if test="stationId !=null and stationId !=''">
- AND station_id = #{stationId}
- </if>
- ORDER BY take_effect_date DESC
- </where>
- </select>
- <select id="selectByExample" parameterType="com.platform.yijia.pojo.PayOrderExample" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- select
- <if test="distinct">
- distinct
- </if>
- <include refid="Base_Column_List" />
- from pay_order
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- select
- <include refid="Base_Column_List" />
- from pay_order
- where order_id = #{orderId,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- delete from pay_order
- where order_id = #{orderId,jdbcType=INTEGER}
- </delete>
- <delete id="deleteByExample" parameterType="com.platform.yijia.pojo.PayOrderExample">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- delete from pay_order
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" parameterType="com.platform.yijia.pojo.PayOrder">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- INSERT into
- pay_order (order_id, order_no, oil_gun,
- oil_name, oil_pirce, consumer_id, consumer,
- amt, station_id, status,
- order_liters, pay_type, pay_way,
- pay_date, oil_personnel, created_date,
- order_type, station_name, 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, car_no, customer_phone, customer_grade, oil_type)
- VALUES (
- #{orderId,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{oilGun,jdbcType=VARCHAR},
- #{oilName,jdbcType=VARCHAR}, #{oilPirce,jdbcType=DOUBLE}, #{consumerId,jdbcType=INTEGER}, #{consumer,jdbcType=VARCHAR},
- #{amt,jdbcType=DOUBLE}, #{stationId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR},
- #{orderLiters,jdbcType=VARCHAR}, #{payType,jdbcType=VARCHAR}, #{payWay,jdbcType=VARCHAR},
- #{payDate,jdbcType=TIMESTAMP}, #{oilPersonnel,jdbcType=VARCHAR}, #{createdDate,jdbcType=TIMESTAMP},
- #{orderType,jdbcType=CHAR}, #{stationName,jdbcType=VARCHAR},
- #{receivableAmt,jdbcType=DOUBLE}, #{receivedAmt,jdbcType=DOUBLE},#{discountAmt,jdbcType=DOUBLE}, #{discountCouponAmt,jdbcType=DOUBLE},
- #{discountCoupon,jdbcType=INTEGER}, #{wxAmt,jdbcType=DOUBLE}, #{zfbAmt,jdbcType=DOUBLE},#{posAmt,jdbcType=DOUBLE},
- #{xjAmt,jdbcType=DOUBLE}, #{didiAppAmt,jdbcType=DOUBLE}, #{tyAppAmt,jdbcType=DOUBLE}, #{otherAmt,jdbcType=DOUBLE},
- #{dzkAmt,jdbcType=DOUBLE}, #{score,jdbcType=INTEGER}, #{memberNo,jdbcType=VARCHAR}, #{memberAmt,jdbcType=DOUBLE},
- #{printCount,jdbcType=INTEGER}, #{carNo,jdbcType=VARCHAR}, #{customerPhone,jdbcType=VARCHAR}, #{customerGrade,jdbcType=VARCHAR}, #{oilType,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.platform.yijia.pojo.PayOrder">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- insert into pay_order
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="orderId != null">
- order_id,
- </if>
- <if test="orderNo != null">
- order_no,
- </if>
- <if test="oilGun != null">
- oil_gun,
- </if>
- <if test="oilName != null">
- oil_name,
- </if>
- <if test="oilPirce != null">
- oil_pirce,
- </if>
- <if test="consumerId != null">
- consumer_id,
- </if>
- <if test="consumer != null">
- consumer,
- </if>
- <if test="amt != null">
- amt,
- </if>
- <if test="stationId != null">
- station_id,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="orderLiters != null">
- order_liters,
- </if>
- <if test="payType != null">
- pay_type,
- </if>
- <if test="payWay != null">
- pay_way,
- </if>
- <if test="payDate != null">
- pay_date,
- </if>
- <if test="oilPersonnel != null">
- oil_personnel,
- </if>
- <if test="createdDate != null">
- created_date,
- </if>
- <if test="orderType != null">
- order_type,
- </if>
- <if test="stationName != null">
- station_name,
- </if>
- <if test="receivableAmt != null">
- receivable_amt,
- </if>
- <if test="receivedAmt != null">
- received_amt,
- </if>
- <if test="discountAmt != null">
- discount_amt,
- </if>
- <if test="discountCouponAmt != null">
- discount_coupon_amt,
- </if>
- <if test="discountCoupon != null">
- discount_coupon,
- </if>
- <if test="wxAmt != null">
- wx_amt,
- </if>
- <if test="zfbAmt != null">
- zfb_amt,
- </if>
- <if test="posAmt != null">
- pos_amt,
- </if>
- <if test="didiAppAmt != null">
- didi_app_amt,
- </if>
- <if test="tyAppAmt != null">
- ty_app_amt,
- </if>
- <if test="otherAmt != null">
- other_amt,
- </if>
- <if test="dzkAmt != null">
- dzk_amt,
- </if>
- <if test="score != null">
- score,
- </if>
- <if test="memberNo != null">
- member_no,
- </if>
- <if test="memberAmt != null">
- member_amt,
- </if>
- <if test="printCount != null">
- print_count,
- </if>
- <if test="carNo != null">
- car_no,
- </if>
- <if test="customerPhone != null">
- customer_phone,
- </if>
- <if test="customerGrade != null">
- customer_grade,
- </if>
- <if test="oilType != null">
- oil_type
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="orderId != null">
- #{orderId,jdbcType=INTEGER},
- </if>
- <if test="orderNo != null">
- #{orderNo,jdbcType=VARCHAR},
- </if>
- <if test="oilGun != null">
- #{oilGun,jdbcType=VARCHAR},
- </if>
- <if test="oilName != null">
- #{oilName,jdbcType=VARCHAR},
- </if>
- <if test="oilPirce != null">
- #{oilPirce,jdbcType=DOUBLE},
- </if>
- <if test="consumerId != null">
- #{consumerId,jdbcType=INTEGER},
- </if>
- <if test="consumer != null">
- #{consumer,jdbcType=VARCHAR},
- </if>
- <if test="amt != null">
- #{amt,jdbcType=DOUBLE},
- </if>
- <if test="stationId != null">
- #{stationId,jdbcType=INTEGER},
- </if>
- <if test="status != null">
- #{status,jdbcType=VARCHAR},
- </if>
- <if test="orderLiters != null">
- #{orderLiters,jdbcType=VARCHAR},
- </if>
- <if test="payType != null">
- #{payType,jdbcType=VARCHAR},
- </if>
- <if test="payWay != null">
- #{payWay,jdbcType=VARCHAR},
- </if>
- <if test="payDate != null">
- #{payDate,jdbcType=TIMESTAMP},
- </if>
- <if test="oilPersonnel != null">
- #{oilPersonnel,jdbcType=VARCHAR},
- </if>
- <if test="createdDate != null">
- #{createdDate,jdbcType=TIMESTAMP},
- </if>
- <if test="orderType != null">
- #{orderType,jdbcType=CHAR},
- </if>
- <if test="stationName != null">
- #{stationName,jdbcType=VARCHAR},
- </if>
- <if test="receivableAmt != null">
- #{receivableAmt,jdbcType=DOUBLE},
- </if>
- <if test="receivedAmt != null">
- #{receivedAmt,jdbcType=DOUBLE},
- </if>
- <if test="discountAmt != null">
- #{discountAmt,jdbcType=DOUBLE},
- </if>
- <if test="discountCouponAmt != null">
- #{discountCouponAmt,jdbcType=DOUBLE},
- </if>
- <if test="discountCoupon != null">
- #{discountCoupon,jdbcType=VARCHAR},
- </if>
- <if test="wxAmt != null">
- #{wxAmt,jdbcType=DOUBLE},
- </if>
- <if test="zfbAmt != null">
- #{zfbAmt,jdbcType=DOUBLE},
- </if>
- <if test="posAmt != null">
- #{posAmt,jdbcType=DOUBLE},
- </if>
- <if test="xjAmt != null">
- #{xjAmt,jdbcType=DOUBLE},
- </if>
- <if test="didiAppAmt != null">
- #{didiAppAmt,jdbcType=DOUBLE},
- </if>
- <if test="tyAppAmt != null">
- #{tyAppAmt,jdbcType=DOUBLE},
- </if>
- <if test="otherAmt != null">
- #{otherAmt,jdbcType=DOUBLE},
- </if>
- <if test="dzkAmt != null">
- #{dzkAmt,jdbcType=DOUBLE},
- </if>
- <if test="score != null">
- #{score,jdbcType=INTEGER},
- </if>
- <if test="memberNo != null">
- #{memberNo,jdbcType=VARCHAR},
- </if>
- <if test="memberAmt != null">
- #{memberAmt,jdbcType=DOUBLE},
- </if>
- <if test="printCount != null">
- #{printCount,jdbcType=INTEGER},
- </if>
- <if test="carNo != null">
- #{carNo,jdbcType=VARCHAR},
- </if>
- <if test="customerPhone != null">
- #{customerPhone,jdbcType=VARCHAR},
- </if>
- <if test="customerGrade != null">
- #{customerGrade,jdbcType=VARCHAR},
- </if>
- <if test="oilType != null">
- #{oilType,jdbcType=VARCHAR}
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.platform.yijia.pojo.PayOrderExample" resultType="java.lang.Long">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- select count(*) from pay_order
- <if test="_parameter != null">
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByExampleSelective" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- update pay_order
- <set>
- <if test="record.orderId != null">
- order_id = #{record.orderId,jdbcType=INTEGER},
- </if>
- <if test="record.orderNo != null">
- order_no = #{record.orderNo,jdbcType=VARCHAR},
- </if>
- <if test="record.oilGun != null">
- oil_gun = #{record.oilGun,jdbcType=VARCHAR},
- </if>
- <if test="record.oilName != null">
- oil_name = #{record.oilName,jdbcType=VARCHAR},
- </if>
- <if test="record.oilPirce != null">
- oil_pirce = #{record.oilPirce,jdbcType=VARCHAR},
- </if>
- <if test="record.consumerId != null">
- consumer_id = #{record.consumerId,jdbcType=INTEGER},
- </if>
- <if test="record.consumer != null">
- consumer = #{record.consumer,jdbcType=VARCHAR},
- </if>
- <if test="record.amt != null">
- amt = #{record.amt,jdbcType=DOUBLE},
- </if>
- <if test="record.stationId != null">
- station_id = #{record.stationId,jdbcType=INTEGER},
- </if>
- <if test="record.status != null">
- status = #{record.status,jdbcType=VARCHAR},
- </if>
- <if test="record.orderLiters != null">
- order_liters = #{record.orderLiters,jdbcType=VARCHAR},
- </if>
- <if test="record.payType != null">
- pay_type = #{record.payType,jdbcType=VARCHAR},
- </if>
- <if test="record.payWay != null">
- pay_way = #{record.payWay,jdbcType=VARCHAR},
- </if>
- <if test="record.payDate != null">
- pay_date = #{record.payDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.oilPersonnel != null">
- oil_personnel = #{record.oilPersonnel,jdbcType=VARCHAR},
- </if>
- <if test="record.createdDate != null">
- created_date = #{record.createdDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.orderType != null">
- order_type = #{record.orderType,jdbcType=CHAR},
- </if>
- <if test="record.stationName != null">
- station_name = #{record.stationName,jdbcType=VARCHAR},
- </if>
- <if test="record.receivableAmt != null">
- receivable_amt = #{record.receivableAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.receivedAmt != null">
- received_amt = #{record.receivedAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.discountAmt != null">
- discount_amt = #{record.discountAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.discountCouponAmt != null">
- discount_coupon_amt = #{record.discountCouponAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.discountCoupon != null">
- discount_coupon = #{record.discountCoupon,jdbcType=VARCHAR},
- </if>
- <if test="record.wxAmt != null">
- wx_amt = #{record.wxAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.zfbAmt != null">
- zfb_amt = #{record.zfbAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.posAmt != null">
- pos_amt = #{record.posAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.xjAmt != null">
- xj_amt = #{record.xjAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.didiAppAmt != null">
- didi_app_amt = #{record.didiAppAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.tyAppAmt != null">
- ty_app_amt = #{record.tyAppAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.otherAmt != null">
- other_amt = #{record.otherAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.dzkAmt != null">
- dzk_amt = #{record.dzkAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.score != null">
- score = #{record.score,jdbcType=INTEGER},
- </if>
- <if test="record.memberNo != null">
- member_no = #{record.memberNo,jdbcType=VARCHAR},
- </if>
- <if test="record.memberAmt != null">
- member_amt = #{record.memberAmt,jdbcType=DOUBLE},
- </if>
- <if test="record.printCount != null">
- print_count = #{record.printCount,jdbcType=INTEGER},
- </if>
- <if test="record.carNo != null">
- car_no = #{record.carNo,jdbcType=VARCHAR},
- </if>
- <if test="record.customerPhone != null">
- customer_phone = #{record.customerPhone,jdbcType=VARCHAR},
- </if>
- <if test="record.customerGrade != null">
- customer_grade = #{record.customerGrade,jdbcType=VARCHAR},
- </if>
- <if test="oilType != null">
- oil_type = #{record.oilType,jdbcType=VARCHAR},
- </if>
- </set>
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <!--根据订单号查询订单信息和用户信息 此方法在随行付回调之后和电子卡支付后修改状态完成后-->
- <select id="getOrderInfoAndUserInfoByOrderNo" parameterType="com.platform.yijia.pojo.PayOrder" resultType="map">
- SELECT
- A.order_no AS orderNo,
- A.consumer AS consumer,
- A.station_id AS stationId,
- A.status AS status,
- A.pay_way AS payWay,
- A.pay_type AS payType,
- A.oil_name AS oilName,
- A.oil_gun AS oilGun,
- A.order_liters AS orderLiters,
- A.amt AS amt,
- A.order_type AS orderType,
- A.oil_pirce AS oilPirce,
- A.receivable_amt AS receivableAmt,
- A.discount_amt AS discountAmt,
- A.created_date AS createdDate,
- A.pay_date AS payDate,
- A.consumer_id AS consumerId,
- B.user_type AS userType,
- B.registe_date AS registeDate,
- B.blog_openid AS blogOpenid,
- B.mina_openid AS minaOpenid,
- B.union_id AS unionId,
- B.mobile_phone AS mobilePhone,
- C.dept_name AS stationName,
- C.parent_id AS groupId
- FROM
- pay_order AS A
- LEFT JOIN app_user_info AS B ON A.consumer_id = B.user_id
- LEFT JOIN sys_dept AS C ON A.station_id = C.dept_id
- WHERE
- A.order_no = #{orderNo}
- </select>
- <!-- 更新订单-->
- <update id="updateOrderStatus" parameterType="com.platform.yijia.pojo.PayOrder">
- UPDATE
- pay_order
- <set>
- <if test="status != null">
- status = #{status,jdbcType=VARCHAR},
- </if>
- <if test="receivedAmt != null">
- received_amt = #{receivedAmt,jdbcType=DOUBLE},
- </if>
- <if test="payType != null">
- pay_type = #{payType,jdbcType=VARCHAR},
- </if>
- <if test="wxAmt != null">
- wx_amt = #{wxAmt,jdbcType=DOUBLE},
- </if>
- <if test="dzkAmt != null">
- dzk_amt = #{dzkAmt,jdbcType=DOUBLE},
- </if>
- <if test="payDate != null">
- pay_date = #{payDate,jdbcType=TIMESTAMP},
- </if>
- <if test="printCount != null">
- print_count = #{printCount,jdbcType=INTEGER},
- </if>
- </set>
- <where>
- order_no = #{orderNo,jdbcType=VARCHAR}
- </where>
- </update>
- <!--根据用户登录openId 获取用户信息用于插入客户表-->
- <select id="getUserInfoByOpenId" parameterType="com.platform.yijia.pojo.AppUserInfo" resultType="com.platform.yijia.pojo.AppUserInfo">
- SELECT
- user_id AS userId,
- blog_nick_name AS blogNickName,
- mina_openid AS minaOpenid,
- blog_openid AS blogOpenid,
- registe_date AS registeDate,
- mobile_phone AS mobilePhone,
- user_type AS userType,
- union_id AS unionId,
- station_id AS stationId
- FROM
- app_user_info
- <where>
- <if test="mobilePhone !=null and mobilePhone !='' ">
- mobile_phone = #{mobilePhone}
- </if>
- <if test="stationId !=null and stationId !='' ">
- AND station_id = #{stationId}
- </if>
- </where>
- </select>
- <!-- 判断客户表是否已存在-->
- <select id="isExistCustomer" parameterType="com.platform.yijia.pojo.CustomerManage" resultType="com.platform.yijia.pojo.CustomerManage">
- SELECT
- id AS id,
- member_id AS memberId,
- member_grade AS memberGrade,
- phone_number AS phoneNumber,
- regtime AS regtime,
- station_name AS stationName,
- oil_name AS oilName,
- liters AS liters,
- amt AS amt
- FROM
- customer_manage
- <where>
- <if test="phoneNumber !=null and phoneNumber !='' ">
- phone_number = #{phoneNumber}
- </if>
- <if test="stationId !=null and stationId !='' ">
- AND station_id = #{stationId}
- </if>
- <if test="oilName !=null and oilName !='' ">
- AND oil_name = #{oilName}
- </if>
- </where>
- </select>
- <!-- 根据手机号更新客户表 -->
- <update id="updateCustomerByPhoneNumber" parameterType="com.platform.yijia.pojo.CustomerManage">
- UPDATE
- customer_manage
- <set>
- <if test="customerName !=null ">
- customer_name = #{customerName},
- </if>
- <if test="phoneNumber !=null ">
- phone_number = #{phoneNumber},
- </if>
- <if test="regtime !=null ">
- regtime = #{regtime},
- </if>
- <if test="stationName !=null ">
- station_name = #{stationName},
- </if>
- <if test="stationId !=null ">
- station_id = #{stationId},
- </if>
- <if test="blogUserId !=null ">
- blog_user_id = #{blogUserId},
- </if>
- <if test="minaUserId !=null ">
- mina_user_id = #{minaUserId},
- </if>
- <if test="oilName !=null ">
- oil_name = #{oilName},
- </if>
- <if test="liters !=null ">
- liters = #{liters},
- </if>
- <if test="amt !=null ">
- amt = #{amt},
- </if>
- <if test="unionId !=null and unionId !=null">
- union_id = #{unionId},
- </if>
- </set>
- <where>
- <if test="phoneNumber !=null and phoneNumber !='' ">
- phone_number = #{phoneNumber}
- </if>
- </where>
- </update>
- <!-- 更新客户表 -->
- <update id="updateCustomer" parameterType="com.platform.yijia.pojo.CustomerManage">
- UPDATE
- customer_manage
- <set>
- <if test="memberGrade !=null ">
- member_grade = #{memberGrade},
- </if>
- <if test="customerName !=null ">
- customer_name = #{customerName},
- </if>
- <if test="phoneNumber !=null ">
- phone_number = #{phoneNumber},
- </if>
- <if test="regtime !=null ">
- regtime = #{regtime},
- </if>
- <if test="stationName !=null ">
- station_name = #{stationName},
- </if>
- <if test="oilName !=null ">
- oil_name = #{oilName},
- </if>
- <if test="liters !=null ">
- liters = #{liters},
- </if>
- <if test="amt !=null ">
- amt = #{amt},
- </if>
- <if test="grade !=null ">
- grade = #{grade},
- </if>
- <if test="unionId !=null ">
- union_id = #{unionId},
- </if>
- </set>
- <where>
- <if test="stationId != null and stationId !='' ">
- station_id = #{stationId}
- </if>
- <if test="phoneNumber !=null and phoneNumber !='' ">
- AND phone_number = #{phoneNumber}
- </if>
- <if test="oilName !=null and oilName !='' ">
- AND oil_name = #{oilName}
- </if>
- </where>
- </update>
- <!-- 插入客户表 -->
- <insert id="insertCustomer" parameterType="com.platform.yijia.pojo.CustomerManage">
- INSERT INTO customer_manage
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="memberId !=null ">
- member_id,
- </if>
- <if test="customerName !=null ">
- customer_name,
- </if>
- <if test="commendMan !=null ">
- commend_man,
- </if>
- <if test="memberGrade !=null ">
- member_grade,
- </if>
- <if test="phoneNumber !=null ">
- phone_number,
- </if>
- <if test="carNumber !=null ">
- car_number,
- </if>
- <if test="balance !=null ">
- balance,
- </if>
- <if test="integral !=null ">
- integral,
- </if>
- <if test="specialCarType !=null ">
- specialCarType,
- </if>
- <if test="regtime !=null ">
- regtime,
- </if>
- <if test="stationId !=null ">
- station_id,
- </if>
- <if test="stationName !=null ">
- station_name,
- </if>
- <if test="oilName !=null ">
- oil_name,
- </if>
- <if test="liters !=null ">
- liters,
- </if>
- <if test="amt !=null ">
- amt,
- </if>
- <if test="cyGrade !=null ">
- cy_grade,
- </if>
- <if test="qyGrade !=null ">
- qy_grade,
- </if>
- <if test="blogOpenid !=null ">
- blog_openid,
- </if>
- <if test="minaOpenid !=null ">
- mina_openid,
- </if>
- <if test="blogUserId !=null ">
- blog_user_id,
- </if>
- <if test="minaUserId !=null ">
- mina_user_id,
- </if>
- <if test="grade !=null ">
- grade,
- </if>
- <if test="unionId !=null and unionId !=''">
- union_id
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="memberId !=null ">
- #{memberId},
- </if>
- <if test="customerName !=null ">
- #{customerName},
- </if>
- <if test="commendMan !=null ">
- #{commendMan},
- </if>
- <if test="memberGrade !=null ">
- #{memberGrade},
- </if>
- <if test="phoneNumber !=null ">
- #{phoneNumber},
- </if>
- <if test="carNumber !=null ">
- #{carNumber},
- </if>
- <if test="balance !=null ">
- #{balance},
- </if>
- <if test="integral !=null ">
- #{integral},
- </if>
- <if test="specialCarType !=null ">
- #{specialCarType},
- </if>
- <if test="regtime !=null ">
- #{regtime},
- </if>
- <if test="stationId !=null ">
- #{stationId, jdbcType=INTEGER},
- </if>
- <if test="stationName !=null ">
- #{stationName, jdbcType=VARCHAR},
- </if>
- <if test="oilName !=null ">
- #{oilName},
- </if>
- <if test="liters !=null ">
- #{liters},
- </if>
- <if test="amt !=null ">
- #{amt},
- </if>
- <if test="cyGrade !=null ">
- #{cyGrade},
- </if>
- <if test="qyGrade !=null ">
- #{qyGrade},
- </if>
- <if test="blogOpenid !=null ">
- #{blogOpenid},
- </if>
- <if test="minaOpenid !=null ">
- #{minaOpenid, jdbcType=VARCHAR},
- </if>
- <if test="blogUserId !=null ">
- #{blogUserId, jdbcType=INTEGER},
- </if>
- <if test="minaUserId !=null ">
- #{minaUserId, jdbcType=INTEGER},
- </if>
- <if test="grade !=null ">
- #{grade, jdbcType=VARCHAR},
- </if>
- <if test="unionId !=null and unionId !=''">
- #{unionId, jdbcType=VARCHAR}
- </if>
- </trim>
- </insert>
- <update id="updateByExample" parameterType="map">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- update pay_order
- set order_id = #{record.orderId,jdbcType=INTEGER},
- order_no = #{record.orderNo,jdbcType=VARCHAR},
- oil_gun = #{record.oilGun,jdbcType=VARCHAR},
- oil_name = #{record.oilName,jdbcType=VARCHAR},
- oil_pirce = #{record.oilPirce,jdbcType=VARCHAR},
- consumer_id = #{record.consumerId,jdbcType=INTEGER},
- consumer = #{record.consumer,jdbcType=VARCHAR},
- amt = #{record.amt,jdbcType=DOUBLE},
- station_id = #{record.stationId,jdbcType=INTEGER},
- status = #{record.status,jdbcType=VARCHAR},
- order_liters = #{record.orderLiters,jdbcType=VARCHAR},
- pay_type = #{record.payType,jdbcType=VARCHAR},
- pay_way = #{record.payWay,jdbcType=VARCHAR},
- pay_date = #{record.payDate,jdbcType=TIMESTAMP},
- oil_personnel = #{record.oilPersonnel,jdbcType=VARCHAR},
- created_date = #{record.createdDate,jdbcType=TIMESTAMP},
- order_type = #{record.orderType,jdbcType=CHAR},
- station_name = #{record.stationName,jdbcType=VARCHAR},
- receivable_amt = #{record.receivableAmt,jdbcType=DOUBLE},
- received_amt = #{record.receivedAmt,jdbcType=DOUBLE},
- discount_amt = #{record.discountAmt,jdbcType=DOUBLE},
- discount_coupon_amt = #{record.discountCouponAmt,jdbcType=DOUBLE},
- discount_coupon = #{record.discountCoupon,jdbcType=DOUBLE},
- wx_amt = #{record.wxAmt,jdbcType=DOUBLE},
- zfb_amt = #{record.zfbAmt,jdbcType=DOUBLE},
- pos_amt = #{record.posAmt,jdbcType=DOUBLE},
- xj_amt = #{record.xjAmt,jdbcType=DOUBLE},
- didi_app_amt = #{record.didiAppAmt,jdbcType=DOUBLE},
- ty_app_amt = #{record.tyAppAmt,jdbcType=DOUBLE},
- other_amt = #{record.otherAmt,jdbcType=DOUBLE},
- dzk_amt = #{record.dzkAmt,jdbcType=DOUBLE},
- score = #{record.score,jdbcType=INTEGER},
- member_no = #{record.memberNo,jdbcType=VARCHAR},
- member_amt = #{record.memberAmt,jdbcType=DOUBLE},
- print_count = #{record.printCount,jdbcType=INTEGER},
- car_no = #{record.carNo,jdbcType=VARCHAR},
- customer_phone = #{record.customerPhone,jdbcType=VARCHAR},
- customer_grade = #{record.customerGrade,jdbcType=VARCHAR},
- oil_type = #{record.oilType,jdbcType=VARCHAR}
- <if test="_parameter != null">
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.platform.yijia.pojo.PayOrder">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- update pay_order
- <set>
- <if test="orderNo != null">
- order_no = #{orderNo,jdbcType=VARCHAR},
- </if>
- <if test="oilGun != null">
- oil_gun = #{oilGun,jdbcType=VARCHAR},
- </if>
- <if test="oilName != null">
- oil_name = #{oilName,jdbcType=VARCHAR},
- </if>
- <if test="oilPirce != null">
- oil_pirce = #{oilPirce,jdbcType=DOUBLE},
- </if>
- <if test="consumerId != null">
- consumer_id = #{consumerId,jdbcType=INTEGER},
- </if>
- <if test="consumer != null">
- consumer = #{consumer,jdbcType=VARCHAR},
- </if>
- <if test="amt != null">
- amt = #{amt,jdbcType=DOUBLE},
- </if>
- <if test="stationId != null">
- station_id = #{stationId,jdbcType=INTEGER},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=VARCHAR},
- </if>
- <if test="orderLiters != null">
- order_liters = #{orderLiters,jdbcType=VARCHAR},
- </if>
- <if test="payType != null">
- pay_type = #{payType,jdbcType=VARCHAR},
- </if>
- <if test="payWay != null">
- pay_way = #{payWay,jdbcType=VARCHAR},
- </if>
- <if test="payDate != null">
- pay_date = #{payDate,jdbcType=TIMESTAMP},
- </if>
- <if test="oilPersonnel != null">
- oil_personnel = #{oilPersonnel,jdbcType=VARCHAR},
- </if>
- <if test="createdDate != null">
- created_date = #{createdDate,jdbcType=TIMESTAMP},
- </if>
- <if test="orderType != null">
- order_type = #{orderType,jdbcType=CHAR},
- </if>
- <if test="stationName != null">
- station_name = #{stationName,jdbcType=CHAR},
- </if>
- <if test="receivableAmt != null">
- receivable_amt = #{receivableAmt,jdbcType=DOUBLE},
- </if>
- <if test="receivedAmt != null">
- received_amt = #{receivedAmt,jdbcType=DOUBLE},
- </if>
- <if test="discountAmt != null">
- discount_amt = #{discountAmt,jdbcType=DOUBLE},
- </if>
- <if test="discountCouponAmt != null">
- discount_coupon_amt = #{discountCouponAmt,jdbcType=DOUBLE},
- </if>
- <if test="discountCoupon != null">
- discount_coupon = #{discountCoupon,jdbcType=VARCHAR},
- </if>
- <if test="wxAmt != null">
- wx_amt = #{wxAmt,jdbcType=DOUBLE},
- </if>
- <if test="zfbAmt != null">
- zfb_amt = #{zfbAmt,jdbcType=DOUBLE},
- </if>
- <if test="posAmt != null">
- pos_amt = #{posAmt,jdbcType=DOUBLE},
- </if>
- <if test="xjAmt != null">
- xj_amt = #{xjAmt,jdbcType=DOUBLE},
- </if>
- <if test="didiAppAmt != null">
- didi_app_amt = #{didiAppAmt,jdbcType=DOUBLE},
- </if>
- <if test="tyAppAmt != null">
- ty_app_amt = #{tyAppAmt,jdbcType=DOUBLE},
- </if>
- <if test="otherAmt != null">
- other_amt = #{otherAmt,jdbcType=DOUBLE},
- </if>
- <if test="dzkAmt != null">
- dzk_amt = #{dzkAmt,jdbcType=DOUBLE},
- </if>
- <if test="score != null">
- score = #{score,jdbcType=INTEGER},
- </if>
- <if test="memberNo != null">
- member_no = #{memberNo,jdbcType=VARCHAR},
- </if>
- <if test="memberAmt != null">
- member_amt = #{memberAmt,jdbcType=DOUBLE},
- </if>
- <if test="printCount != null">
- print_count = #{printCount,jdbcType=INTEGER},
- </if>
- <if test="carNo != null">
- car_no = #{carNo,jdbcType=VARCHAR},
- </if>
- <if test="customerPhone != null">
- customer_phone = #{customerPhone,jdbcType=VARCHAR},
- </if>
- <if test="oilType != null">
- oil_type = #{oilType,jdbcType=VARCHAR}
- </if>
- </set>
- where order_id = #{orderId,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.platform.yijia.pojo.PayOrder">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- update pay_order
- set order_no = #{orderNo,jdbcType=VARCHAR},
- oil_gun = #{oilGun,jdbcType=VARCHAR},
- oil_name = #{oilName,jdbcType=VARCHAR},
- oil_pirce = #{oilPirce,jdbcType=DOUBLE},
- consumer_id = #{consumerId,jdbcType=INTEGER},
- consumer = #{consumer,jdbcType=VARCHAR},
- amt = #{amt,jdbcType=VARCHAR},
- station_id = #{stationId,jdbcType=INTEGER},
- status = #{status,jdbcType=VARCHAR},
- order_liters = #{orderLiters,jdbcType=VARCHAR},
- pay_type = #{payType,jdbcType=VARCHAR},
- pay_way = #{payWay,jdbcType=VARCHAR},
- pay_date = #{payDate,jdbcType=TIMESTAMP},
- oil_personnel = #{oilPersonnel,jdbcType=VARCHAR},
- created_date = #{createdDate,jdbcType=TIMESTAMP},
- order_type = #{orderType,jdbcType=CHAR}
- station_name = #{stationName,jdbcType=VARCHAR},
- receivable_amt = #{receivableAmt,jdbcType=DOUBLE},
- received_amt = #{receivedAmt,jdbcType=DOUBLE},
- discount_amt = #{discountAmt,jdbcType=DOUBLE},
- discount_coupon_amt = #{discountCouponAmt,jdbcType=DOUBLE},
- discount_coupon = #{discountCoupon,jdbcType=DOUBLE},
- wx_amt = #{wxAmt,jdbcType=DOUBLE},
- zfb_amt = #{zfbAmt,jdbcType=DOUBLE},
- pos_amt = #{posAmt,jdbcType=DOUBLE},
- xj_amt = #{xjAmt,jdbcType=DOUBLE},
- didi_app_amt = #{didiAppAmt,jdbcType=DOUBLE},
- ty_app_amt = #{tyAppAmt,jdbcType=DOUBLE},
- other_amt = #{otherAmt,jdbcType=DOUBLE},
- dzk_amt = #{dzkAmt,jdbcType=DOUBLE},
- score = #{score,jdbcType=INTEGER},
- member_no = #{memberNo,jdbcType=VARCHAR},
- member_amt = #{memberAmt,jdbcType=DOUBLE},
- print_count = #{printCount,jdbcType=INTEGER},
- car_no = #{carNo,jdbcType=VARCHAR},
- customer_phone = #{customerPhone,jdbcType=VARCHAR},
- customer_grade = #{customerGrade,jdbcType=VARCHAR},
- oil_type = #{oilType,jdbcType=VARCHAR}
- where order_id = #{orderId,jdbcType=INTEGER}
- </update>
- </mapper>
|