1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159 |
- <?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">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- <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="TIMESTAMP" 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" />
- </resultMap>
- <sql id="Example_Where_Clause">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- <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">
- <!--
- WARNING - @mbg.generated
- This element is automatically generated by MyBatis Generator, do not modify.
- -->
- 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="selectPersonelName" parameterType="map" resultType="map">
- SELECT
- A.personnel_id AS personnelId,
- A.personnel_name AS personelName,
- A.station_name AS stationName
- 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, oli_price, 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=VARCHAR}, #{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=VARCHAR},
- </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">
- #{receivable_amt,jdbcType=DOUBLE},
- </if>
- <if test="receivedAmt != null">
- #{received_amt,jdbcType=DOUBLE},
- </if>
- <if test="discountAmt != null">
- #{discount_amt,jdbcType=DOUBLE},
- </if>
- <if test="discountCouponAmt != null">
- #{discount_coupon_amt,jdbcType=DOUBLE},
- </if>
- <if test="discountCoupon != null">
- #{discount_coupon,jdbcType=VARCHAR},
- </if>
- <if test="wxAmt != null">
- #{wx_amt,jdbcType=DOUBLE},
- </if>
- <if test="zfbAmt != null">
- #{zfb_amt,jdbcType=DOUBLE},
- </if>
- <if test="posAmt != null">
- #{pos_amt,jdbcType=DOUBLE},
- </if>
- <if test="xjAmt != null">
- #{xj_amt,jdbcType=DOUBLE},
- </if>
- <if test="didiAppAmt != null">
- #{didi_app_amt,jdbcType=DOUBLE},
- </if>
- <if test="tyAppAmt != null">
- #{ty_app_amt,jdbcType=DOUBLE},
- </if>
- <if test="otherAmt != null">
- #{other_amt,jdbcType=DOUBLE},
- </if>
- <if test="dzkAmt != null">
- #{dzk_amt,jdbcType=DOUBLE},
- </if>
- <if test="score != null">
- #{score,jdbcType=INTEGER},
- </if>
- <if test="memberNo != null">
- #{member_no,jdbcType=VARCHAR},
- </if>
- <if test="memberAmt != null">
- #{member_amt,jdbcType=DOUBLE},
- </if>
- <if test="printCount != null">
- #{print_count,jdbcType=INTEGER},
- </if>
- <if test="carNo != null">
- #{car_no,jdbcType=VARCHAR},
- </if>
- <if test="customerPhone != null">
- #{customer_phone,jdbcType=VARCHAR},
- </if>
- <if test="customerGrade != null">
- #{customer_grade,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>
- <!-- 更新订单-->
- <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="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>
- <!-- 判断客户表是否已存在-->
- <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,
- cy_liters AS cyLiters,
- qy_liters AS qyLiters,
- cy_amt AS cyAmt,
- qy_amt AS qyAmt
- FROM
- customer_manage
- <where>
- <if test="blogOpenid !=null and blogOpenid !='' ">
- blog_openid = #{blogOpenid}
- </if>
- <if test="minaOpenid !=null and minaOpenid !='' ">
- AND mina_openid = #{minaOpenid}
- </if>
- <if test="stationId !=null and stationId !='' ">
- AND station_id = #{stationId}
- </if>
- </where>
- </select>
- <!-- 更新客户表 -->
- <update id="updateCustomer" parameterType="com.platform.yijia.pojo.CustomerManage">
- UPDATE
- customer_manage
- SET
- <if test="memberGrade !=null ">
- member_grade = #{memberGrade},
- </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="cyLiters !=null ">
- cy_liters = #{cyLiters},
- </if>
- <if test="qyLiters !=null ">
- qy_liters = #{qyLiters},
- </if>
- <if test="cyAmt !=null ">
- cy_amt = #{cyAmt},
- </if>
- <if test="qyAmt !=null ">
- qy_amt = #{qyAmt}
- </if>
- <where>
- <if test="blogOpenid !=null and blogOpenid !='' ">
- blog_openid = #{blogOpenid} AND
- </if>
- <if test="minaOpenid !=null and minaOpenid !='' ">
- mina_openid = #{minaOpenid} AND
- </if>
- <if test="stationId !=null and stationId !='' ">
- station_id = #{stationId}
- </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="cyGrade !=null ">
- cy_grade,
- </if>
- <if test="qyGrade !=null ">
- qy_grade,
- </if>
- <if test="cyLiters !=null ">
- cy_liters,
- </if>
- <if test="qyLiters !=null ">
- qy_liters,
- </if>
- <if test="cyAmt !=null ">
- cy_amt,
- </if>
- <if test="qyAmt !=null ">
- qy_amt,
- </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>
- </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="cyGrade !=null ">
- #{cyGrade},
- </if>
- <if test="qyGrade !=null ">
- #{qyGrade},
- </if>
- <if test="cyLiters !=null ">
- #{cyLiters},
- </if>
- <if test="qyLiters !=null ">
- #{qyLiters},
- </if>
- <if test="cyAmt !=null ">
- #{cyAmt},
- </if>
- <if test="qyAmt !=null ">
- #{qyAmt},
- </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>
- </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=VARCHAR},
- </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=VARCHAR},
- 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>
|