123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <?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.emato.ccnet.wx.dao.mapper.wx.WxOrderGrabMapper" >
- <resultMap id="wxOrderDate" type="com.emato.ccnet.wx.dao.entity.wx.WxOrderDate" >
- <result column="merch_order_sn" property="merchOrderId" jdbcType="VARCHAR" />
- <result column="order_sn" property="orderSn" jdbcType="VARCHAR" />
- <result column="id" property="wxOrderId" jdbcType="VARCHAR" />
- <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
- <result column="merch_name" property="merchName" jdbcType="VARCHAR" />
- <result column="third_party_merch_code" property="thirdPartyMerchCode" jdbcType="VARCHAR" />
- <result column="third_party_merch_name" property="thirdPartyMerchName" jdbcType="VARCHAR" />
- <result column="store_number" property="shopId" jdbcType="VARCHAR" />
- <result column="add_time" property="placeOrderlTime" jdbcType="TIMESTAMP" />
- <result column="user_id" property="buyerRegNo" jdbcType="VARCHAR" />
- <result column="buyer_bill_time" property="buyerBillTime" jdbcType="TIMESTAMP" />
- <result column="id_no" property="buyerIdCode" jdbcType="VARCHAR" />
- <result column="username" property="buyerName" jdbcType="VARCHAR" />
- <result column="buyer_tel" property="buyerTel" jdbcType="VARCHAR" />
- <result column="id_no" property="consigneeIdCode" jdbcType="VARCHAR" />
- <result column="consignee" property="consigneeName" jdbcType="VARCHAR" />
- <result column="mobile" property="consigneeMob" jdbcType="VARCHAR" />
- <result column="province" property="consigneeProvince" jdbcType="VARCHAR" />
- <result column="city" property="consigneeCity" jdbcType="VARCHAR" />
- <result column="district" property="consigneeDistrict" jdbcType="VARCHAR" />
- <result column="address" property="consigneeAddress" jdbcType="VARCHAR" />
- <result column="pay_name" property="payerName" jdbcType="VARCHAR" />
- <result column="id_no" property="payerIdCode" jdbcType="VARCHAR" />
- <result column="pay_mobile" property="payerMob" jdbcType="VARCHAR" />
- <result column="pay_transaction_id" property="payNo" jdbcType="VARCHAR" />
- <result column="actual_price" property="acturalPaid" jdbcType="DECIMAL" />
- <result column="pay_time" property="payTime" jdbcType="TIMESTAMP" />
- <result column="order_biz_type" property="wsFlag" jdbcType="CHAR" />
- <result column="buyer_pay_check" property="buyerPayCheck" jdbcType="CHAR" />
- <result column="expr_agreement_type" property="exprAgreementType" />
- <result column="coupon_price" property="couponPrice" />
- <result column="full_cut_price" property="fullCutPrice" />
- </resultMap>
- <resultMap id="wxOrderGoodsDate" type="com.emato.ccnet.wx.dao.entity.wx.WxOrderGoodsDate" >
- <result column="order_id" property="wxOrderId" jdbcType="VARCHAR" />
- <result column="sku" property="itemNo" jdbcType="VARCHAR" />
- <result column="goods_name" property="itemName" jdbcType="VARCHAR" />
- <result column="prod_barcode" property="barCode" jdbcType="VARCHAR" />
- <result column="unit_code" property="unit" jdbcType="VARCHAR" />
- <result column="number" property="qty" jdbcType="DECIMAL" />
- <result column="settle_price" property="totalPrice" jdbcType="DECIMAL" />
- <result column="ori_cnt_code" property="country" jdbcType="VARCHAR" />
- <result column="cus_rec_code" property="ciqGno" jdbcType="VARCHAR" />
- <result column="cus_goods_code" property="gcode" jdbcType="VARCHAR" />
- <result column="cus_decl_ele" property="gmodel" jdbcType="VARCHAR" />
- <result column="ciq_prod_model" property="ciqGmodel" jdbcType="VARCHAR" />
- <result column="goods_rate" property="taxTotal" jdbcType="VARCHAR" />
- <result column="brand" property="brand" jdbcType="VARCHAR" />
- </resultMap>
- <!-- 获取运单数据-->
- <select id="getWxOrderDate" parameterType="hashMap" resultMap="wxOrderDate">
- SELECT mo.merch_order_sn,mo.order_sn,mo.id,ms.merch_sn,ms.merch_name, ms.store_number,ms.third_party_merch_code,ms.third_party_merch_name,mo.store_id,mo.add_time,mo.user_id,mo.add_time AS buyer_bill_time,mu.id_no,mu.username,
- mu.mobile AS buyer_tel,mo.consignee,mo.mobile,mo.province,mo.city,mo.district,mo.address,mo.pay_name,mo.pay_mobile,mo.pay_transaction_id,mo.actual_price,
- mo.pay_time,mo.order_biz_type, mo.buyer_pay_check,ms.expr_agreement_type,mo.coupon_price,mo.full_cut_price
- FROM mall_order mo
- LEFT OUTER JOIN mall_user mu ON mo.user_id = mu.id
- LEFT OUTER JOIN mall_store ms ON mo.store_id = ms.id
- <where>
- mo.order_biz_type in ('00','02','10') and mo.order_status = '201' and mo.is_scan = 0
- </where>
- ORDER BY mo.id limit #{number}
- </select>
- <!--商品详情-->
- <select id="getWxOrderGoodsDate" parameterType="java.lang.String" resultMap="wxOrderGoodsDate">
- SELECT mog.order_id,mog.sku,mog.goods_name,mog.number,mog.settle_price, mg.goods_desc,
- mg.prod_barcode,mg.unit_code, mg.ori_cnt_code,mg.cus_rec_code,mg.cus_goods_code,
- mg.cus_decl_ele,mg.ciq_prod_model,mg.goods_rate, mg.brand
- FROM mall_order_goods mog
- LEFT OUTER JOIN mall_goods mg ON mog.goods_id = mg.id
- WHERE
- mog.order_id in
- <foreach collection="list" item="orderId" index="index" open="(" close=")" separator="," >
- #{orderId}
- </foreach>
- ORDER BY mog.id
- </select>
- <update id="updateIsScanBatch" parameterType="List">
- UPDATE mall_order
- <trim prefix="set" suffixOverrides=",">
- <trim prefix="is_scan =case" suffix="end,">
- <foreach collection="list" item="i" index="idx">
- <if test="i.isScan !=null and i.isScan !=''">
- when id=#{i.orderId} then #{i.isScan}
- </if>
- </foreach>
- </trim>
- </trim>
- <where>
- <if test="list != null and list.size()>0">
- <foreach collection="list" item="i" index="index" separator="or" >
- id=#{i.orderId}
- </foreach>
- </if>
- </where>
- </update>
- <update id="updateMallOrderProcessRecord" parameterType="hashMap">
- update mall_order_process_record
- <set >
- <if test="paymentStartTime != null">
- payment_start_time = #{paymentStartTime},
- </if>
- <if test="paymentSuccTime != null">
- payment_succ_time = #{paymentSuccTime}, </if>
- <if test="isPaymentSend != null" >
- is_payment_send = #{isPaymentSend,jdbcType=VARCHAR},
- </if>
- <if test="eleOrderStartTime != null" >
- ele_order_start_time = #{eleOrderStartTime,jdbcType=VARCHAR},
- </if>
- <if test="eleOrderSuccTime != null" >
- ele_order_succ_time = #{eleOrderSuccTime,jdbcType=VARCHAR},
- </if>
- <if test="isEleOrderSend != null" >
- is_ele_order_send = #{isEleOrderSend,jdbcType=VARCHAR},
- </if>
- <if test="waybillStartTime != null" >
- waybill_start_time = #{waybillStartTime,jdbcType=VARCHAR},
- </if>
- <if test="waybillSuccTime != null" >
- waybill_succ_time = #{waybillSuccTime,jdbcType=VARCHAR},
- </if>
- <if test="customsStartTime != null" >
- customs_start_time = #{customsStartTime,jdbcType=VARCHAR},
- </if>
- <if test="customsSuccTime != null" >
- customs_succ_time = #{customsSuccTime,jdbcType=VARCHAR},
- </if>
- <if test="isCustomsSend != null" >
- is_customs_send = #{isCustomsSend,jdbcType=TIMESTAMP},
- </if>
- <if test="shipmentStartTime != null" >
- shipment_start_time = #{shipmentStartTime,jdbcType=VARCHAR},
- </if>
- <if test="shipmentSuccTime != null" >
- shipment_succ_time = #{shipmentSuccTime,jdbcType=VARCHAR},
- </if>
- <if test="logisticsNo != null">
- logistics_no = #{logisticsNo},
- </if>
- <if test="invtNo != null">
- invt_no = #{invtNo},
- </if>
- </set>
- where order_sn = #{orderSn,jdbcType=VARCHAR}
- </update>
- <update id="updateBuyerPayCheck" parameterType="hashMap">
- update mall_order
- <set >
- <if test="buyerPayCheck != null">
- buyer_pay_check = #{buyerPayCheck},
- </if>
- <if test="orderStatus != null">
- order_status = #{orderStatus},
- </if>
- <if test="shippingNo != null">
- shipping_no = #{shippingNo},
- </if>
- <if test="shippingCode != null">
- shipping_code = #{shippingCode},
- </if>
- <if test="shippingName != null">
- shipping_name = #{shippingName},
- </if>
- <if test="shippingStatus != null">
- shipping_status = #{shippingStatus},
- </if>
- </set>
- where order_sn = #{orderSn,jdbcType=VARCHAR}
- </update>
- </mapper>
|