| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637 |
- <?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.ccnet.WxOrderMapper" >
- <select id="getWxOrderByWxOrderId" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from wx_order
- where wx_order_id = #{wxOrderId,jdbcType=VARCHAR}
- </select>
- <insert id="insertWxOrderBatch" parameterType="java.util.List" >
- insert into wx_order
- <trim prefix="(" suffix=")" suffixOverrides="," >
- wx_order_sn,
- merch_order_id,
- order_sn,
- wx_order_id,
- merch_sn,
- merch_name,
- plat_sn,
- plat_name,
- third_party_merch_code,
- third_party_merch_name,
- place_orderl_time,
- auto_send,
- buyer_reg_no,
- buyer_bill_time,
- buyer_id_type,
- buyer_id_code,
- buyer_name,
- buyer_tel,
- consignee_id_type,
- consignee_id_code,
- consignee_name,
- consignee_mob,
- consignee_tel,
- consignee_country_code,
- consignee_province_code,
- consignee_province,
- consignee_city_code,
- consignee_city,
- consignee_district_code,
- consignee_district,
- consignee_address,
- consignee_zip_code,
- payer_name,
- payer_id_type,
- payer_id_code,
- payer_mob,
- pay_ent_cus_code,
- pay_no,
- goods_value,
- freight,
- discount,
- tax_total,
- actural_paid,
- pay_time,
- expr_type,
- expr_comp_id,
- expr_agreement_type,
- decl_expr_fee,
- batch_numbers,
- decl_post_tax,
- shop_id,
- extra_tag,
- currency_code,
- ws_flag,
- buyer_pay_check,
- wx_order_detail,
- clec_order_status,
- way_order_status,
- project_check_status,
- play_order_status,
- remark,
- creater_sn,
- create_time,
- moder_sn,
- mod_time,
- tstm,
- ex_field,
- ex_field2,
- ex_field3,
- ex_field4,
- ex_field5,
- </trim>
- VALUES
- <foreach collection="list" item="item" index="index" separator=",">
- <trim prefix="(" suffix=")" suffixOverrides="," >
- #{item.wxOrderSn,jdbcType=VARCHAR},
- #{item.merchOrderId,jdbcType=VARCHAR},
- #{item.orderSn,jdbcType=VARCHAR},
- #{item.wxOrderId,jdbcType=VARCHAR},
- #{item.merchSn,jdbcType=VARCHAR},
- #{item.merchName,jdbcType=VARCHAR},
- #{item.platSn,jdbcType=VARCHAR},
- #{item.platName,jdbcType=VARCHAR},
- #{item.thirdPartyMerchCode,jdbcType=VARCHAR},
- #{item.thirdPartyMerchName,jdbcType=VARCHAR},
- #{item.placeOrderlTime,jdbcType=TIMESTAMP},
- #{item.autoSend,jdbcType=CHAR},
- #{item.buyerRegNo,jdbcType=VARCHAR},
- #{item.buyerBillTime,jdbcType=TIMESTAMP},
- #{item.buyerIdType,jdbcType=VARCHAR},
- #{item.buyerIdCode,jdbcType=VARCHAR},
- #{item.buyerName,jdbcType=VARCHAR},
- #{item.buyerTel,jdbcType=VARCHAR},
- #{item.consigneeIdType,jdbcType=VARCHAR},
- #{item.consigneeIdCode,jdbcType=VARCHAR},
- #{item.consigneeName,jdbcType=VARCHAR},
- #{item.consigneeMob,jdbcType=VARCHAR},
- #{item.consigneeTel,jdbcType=VARCHAR},
- #{item.consigneeCountryCode,jdbcType=VARCHAR},
- #{item.consigneeProvinceCode,jdbcType=VARCHAR},
- #{item.consigneeProvince,jdbcType=VARCHAR},
- #{item.consigneeCityCode,jdbcType=VARCHAR},
- #{item.consigneeCity,jdbcType=VARCHAR},
- #{item.consigneeDistrictCode,jdbcType=VARCHAR},
- #{item.consigneeDistrict,jdbcType=VARCHAR},
- #{item.consigneeAddress,jdbcType=VARCHAR},
- #{item.consigneeZipCode,jdbcType=VARCHAR},
- #{item.payerName,jdbcType=VARCHAR},
- #{item.payerIdType,jdbcType=VARCHAR},
- #{item.payerIdCode,jdbcType=VARCHAR},
- #{item.payerMob,jdbcType=VARCHAR},
- #{item.payEntCusCode,jdbcType=VARCHAR},
- #{item.payNo,jdbcType=VARCHAR},
- #{item.goodsValue,jdbcType=DECIMAL},
- #{item.freight,jdbcType=DECIMAL},
- #{item.discount,jdbcType=DECIMAL},
- #{item.taxTotal,jdbcType=DECIMAL},
- #{item.acturalPaid,jdbcType=DECIMAL},
- #{item.payTime,jdbcType=TIMESTAMP},
- #{item.exprType,jdbcType=CHAR},
- #{item.exprCompId,jdbcType=VARCHAR},
- #{item.exprAgreementType,jdbcType=CHAR},
- #{item.declExprFee,jdbcType=DECIMAL},
- #{item.batchNumbers,jdbcType=VARCHAR},
- #{item.declPostTax,jdbcType=DECIMAL},
- #{item.shopId,jdbcType=VARCHAR},
- #{item.extraTag,jdbcType=VARCHAR},
- #{item.currencyCode,jdbcType=VARCHAR},
- #{item.wsFlag,jdbcType=CHAR},
- #{item.buyerPayCheck,jdbcType=CHAR},
- #{item.wxOrderDetail,jdbcType=CHAR},
- #{item.clecOrderStatus,jdbcType=CHAR},
- #{item.wayOrderStatus,jdbcType=CHAR},
- #{item.projectCheckStatus,jdbcType=CHAR},
- #{item.playOrderStatus,jdbcType=CHAR},
- #{item.remark,jdbcType=VARCHAR},
- #{item.createrSn,jdbcType=VARCHAR},
- #{item.createTime,jdbcType=TIMESTAMP},
- #{item.moderSn,jdbcType=VARCHAR},
- #{item.modTime,jdbcType=TIMESTAMP},
- #{item.tstm,jdbcType=TIMESTAMP},
- #{item.exField,jdbcType=VARCHAR},
- #{item.exField2,jdbcType=VARCHAR},
- #{item.exField3,jdbcType=VARCHAR},
- #{item.exField4,jdbcType=VARCHAR},
- #{item.exField5,jdbcType=VARCHAR},
- </trim>
- </foreach>
- </insert>
- <update id="updateWxOrderBatch" parameterType="java.util.List">
- <foreach collection="list" item="item" index="index" open="" close="" separator=";">
- update wx_order
- <set >
- <if test="item.merchOrderId != null" >
- merch_order_id = #{item.merchOrderId,jdbcType=VARCHAR},
- </if>
- <if test="item.orderSn != null" >
- order_sn = #{item.orderSn,jdbcType=VARCHAR},
- </if>
- <if test="item.wxOrderId != null" >
- wx_order_id = #{item.wxOrderId,jdbcType=VARCHAR},
- </if>
- <if test="item.merchSn != null" >
- merch_sn = #{item.merchSn,jdbcType=VARCHAR},
- </if>
- <if test="item.merchName != null" >
- merch_name = #{item.merchName,jdbcType=VARCHAR},
- </if>
- <if test="item.platSn != null" >
- plat_sn = #{item.platSn,jdbcType=VARCHAR},
- </if>
- <if test="item.platName != null" >
- plat_name = #{item.platName,jdbcType=VARCHAR},
- </if>
- <if test="item.thirdPartyMerchCode != null" >
- third_party_merch_code = #{item.thirdPartyMerchCode,jdbcType=VARCHAR},
- </if>
- <if test="item.thirdPartyMerchName != null" >
- third_party_merch_name = #{item.thirdPartyMerchName,jdbcType=VARCHAR},
- </if>
- <if test="item.placeOrderlTime != null" >
- place_orderl_time = #{item.placeOrderlTime,jdbcType=TIMESTAMP},
- </if>
- <if test="item.autoSend != null" >
- auto_send = #{item.autoSend,jdbcType=CHAR},
- </if>
- <if test="item.buyerRegNo != null" >
- buyer_reg_no = #{item.buyerRegNo,jdbcType=VARCHAR},
- </if>
- <if test="item.buyerBillTime != null" >
- buyer_bill_time = #{item.buyerBillTime,jdbcType=TIMESTAMP},
- </if>
- <if test="item.buyerIdType != null" >
- buyer_id_type = #{item.buyerIdType,jdbcType=VARCHAR},
- </if>
- <if test="item.buyerIdCode != null" >
- buyer_id_code = #{item.buyerIdCode,jdbcType=VARCHAR},
- </if>
- <if test="item.buyerName != null" >
- buyer_name = #{item.buyerName,jdbcType=VARCHAR},
- </if>
- <if test="item.buyerTel != null" >
- buyer_tel = #{item.buyerTel,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeIdType != null" >
- consignee_id_type = #{item.consigneeIdType,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeIdCode != null" >
- consignee_id_code = #{item.consigneeIdCode,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeName != null" >
- consignee_name = #{item.consigneeName,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeMob != null" >
- consignee_mob = #{item.consigneeMob,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeTel != null" >
- consignee_tel = #{item.consigneeTel,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeCountryCode != null" >
- consignee_country_code = #{item.consigneeCountryCode,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeProvinceCode != null" >
- consignee_province_code = #{item.consigneeProvinceCode,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeProvince != null" >
- consignee_province = #{item.consigneeProvince,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeCityCode != null" >
- consignee_city_code = #{item.consigneeCityCode,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeCity != null" >
- consignee_city = #{item.consigneeCity,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeDistrictCode != null" >
- consignee_district_code = #{item.consigneeDistrictCode,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeDistrict != null" >
- consignee_district = #{item.consigneeDistrict,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeAddress != null" >
- consignee_address = #{item.consigneeAddress,jdbcType=VARCHAR},
- </if>
- <if test="item.consigneeZipCode != null" >
- consignee_zip_code = #{item.consigneeZipCode,jdbcType=VARCHAR},
- </if>
- <if test="item.payerName != null" >
- payer_name = #{item.payerName,jdbcType=VARCHAR},
- </if>
- <if test="item.payerIdType != null" >
- payer_id_type = #{item.payerIdType,jdbcType=VARCHAR},
- </if>
- <if test="item.payerIdCode != null" >
- payer_id_code = #{item.payerIdCode,jdbcType=VARCHAR},
- </if>
- <if test="item.payerMob != null" >
- payer_mob = #{item.payerMob,jdbcType=VARCHAR},
- </if>
- <if test="item.payEntCusCode != null" >
- pay_ent_cus_code = #{item.payEntCusCode,jdbcType=VARCHAR},
- </if>
- <if test="item.payNo != null" >
- pay_no = #{item.payNo,jdbcType=VARCHAR},
- </if>
- <if test="item.goodsValue != null" >
- goods_value = #{item.goodsValue,jdbcType=DECIMAL},
- </if>
- <if test="item.freight != null" >
- freight = #{item.freight,jdbcType=DECIMAL},
- </if>
- <if test="item.discount != null" >
- discount = #{item.discount,jdbcType=DECIMAL},
- </if>
- <if test="item.taxTotal != null" >
- tax_total = #{item.taxTotal,jdbcType=DECIMAL},
- </if>
- <if test="item.acturalPaid != null" >
- actural_paid = #{item.acturalPaid,jdbcType=DECIMAL},
- </if>
- <if test="item.payTime != null" >
- pay_time = #{item.payTime,jdbcType=TIMESTAMP},
- </if>
- <if test="item.exprType != null" >
- expr_type = #{item.exprType,jdbcType=CHAR},
- </if>
- <if test="item.exprCompId != null" >
- expr_comp_id = #{item.exprCompId,jdbcType=VARCHAR},
- </if>
- <if test="item.exprAgreementType != null" >
- expr_agreement_type = #{item.exprAgreementType,jdbcType=CHAR},
- </if>
- <if test="item.declExprFee != null" >
- decl_expr_fee = #{item.declExprFee,jdbcType=DECIMAL},
- </if>
- <if test="item.batchNumbers != null" >
- batch_numbers = #{item.batchNumbers,jdbcType=VARCHAR},
- </if>
- <if test="item.declPostTax != null" >
- decl_post_tax = #{item.declPostTax,jdbcType=DECIMAL},
- </if>
- <if test="item.shopId != null" >
- shop_id = #{item.shopId,jdbcType=VARCHAR},
- </if>
- <if test="item.extraTag != null" >
- extra_tag = #{item.extraTag,jdbcType=VARCHAR},
- </if>
- <if test="item.currencyCode != null" >
- currency_code = #{item.currencyCode,jdbcType=VARCHAR},
- </if>
- <if test="item.wsFlag != null" >
- ws_flag = #{item.wsFlag,jdbcType=CHAR},
- </if>
- <if test="item.buyerPayCheck != null" >
- buyer_pay_check = #{item.buyerPayCheck,jdbcType=CHAR},
- </if>
- <if test="item.wxOrderDetail != null" >
- wx_order_detail = #{item.wxOrderDetail,jdbcType=CHAR},
- </if>
- <if test="item.clecOrderStatus != null" >
- clec_order_status = #{item.clecOrderStatus,jdbcType=CHAR},
- </if>
- <if test="item.wayOrderStatus != null" >
- way_order_status = #{item.wayOrderStatus,jdbcType=CHAR},
- </if>
- <if test="item.projectCheckStatus != null" >
- project_check_status = #{item.projectCheckStatus,jdbcType=CHAR},
- </if>
- <if test="item.playOrderStatus != null" >
- play_order_status = #{item.playOrderStatus,jdbcType=CHAR},
- </if>
- <if test="item.remark != null" >
- remark = #{item.remark,jdbcType=VARCHAR},
- </if>
- <if test="item.createrSn != null" >
- creater_sn = #{item.createrSn,jdbcType=VARCHAR},
- </if>
- <if test="item.createTime != null" >
- create_time = #{item.createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="item.moderSn != null" >
- moder_sn = #{item.moderSn,jdbcType=VARCHAR},
- </if>
- <if test="item.modTime != null" >
- mod_time = #{item.modTime,jdbcType=TIMESTAMP},
- </if>
- <if test="item.tstm != null" >
- tstm = #{item.tstm,jdbcType=TIMESTAMP},
- </if>
- <if test="item.exField != null" >
- ex_field = #{item.exField,jdbcType=VARCHAR},
- </if>
- <if test="item.exField2 != null" >
- ex_field2 = #{item.exField2,jdbcType=VARCHAR},
- </if>
- <if test="item.exField3 != null" >
- ex_field3 = #{item.exField3,jdbcType=VARCHAR},
- </if>
- <if test="item.exField4 != null" >
- ex_field4 = #{item.exField4,jdbcType=VARCHAR},
- </if>
- <if test="item.exField5 != null" >
- ex_field5 = #{item.exField5,jdbcType=VARCHAR},
- </if>
- </set>
- where wx_order_sn = #{item.wxOrderSn,jdbcType=VARCHAR}
- </foreach>
- </update>
- <select id="getWxOrder" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from wx_order where 1 = 1
- <if test="wxOrderDetail != null">
- and wx_order_detail = #{wxOrderDetail,jdbcType=CHAR}
- </if>
- <if test="clecOrderStatus != null">
- and clec_order_status = #{clecOrderStatus,jdbcType=CHAR}
- </if>
- <if test="wayOrderStatus != null">
- and way_order_status = #{wayOrderStatus,jdbcType=CHAR}
- </if>
- <if test="playOrderStatus != null">
- and play_order_status = #{playOrderStatus,jdbcType=CHAR}
- </if>
- <if test="projectCheckStatus != null">
- and project_check_status = #{projectCheckStatus,jdbcType=CHAR}
- </if>
- <if test="buyerPayCheck != null">
- and buyer_pay_check = #{buyerPayCheck,jdbcType=CHAR}
- </if>
- ORDER BY wx_order_sn limit #{number}
- </select>
- <update id="updateWxOrderStatusBatch" parameterType="List">
- UPDATE wx_order
- <trim prefix="set" suffixOverrides=",">
- <trim prefix="wx_order_detail =case" suffix="end,">
- <foreach collection="list" item="i" index="idx">
- <if test="i.wxOrderDetail !=null and i.wxOrderDetail !=''">
- when order_sn=#{i.orderSn} then #{i.wxOrderDetail}
- </if>
- </foreach>
- </trim>
- <trim prefix="clec_order_status =case" suffix="end,">
- <foreach collection="list" item="i" index="idx">
- <if test="i.clecOrderStatus !=null and i.clecOrderStatus !=''">
- when order_sn=#{i.orderSn} then #{i.clecOrderStatus}
- </if>
- </foreach>
- </trim>
- <trim prefix="way_order_status =case" suffix="end,">
- <foreach collection="list" item="i" index="idx">
- <if test="i.wayOrderStatus !=null and i.wayOrderStatus !=''">
- when order_sn=#{i.orderSn} then #{i.wayOrderStatus}
- </if>
- </foreach>
- </trim>
- <trim prefix="play_order_status =case" suffix="end,">
- <foreach collection="list" item="i" index="idx">
- <if test="i.playOrderStatus !=null and i.playOrderStatus !=''">
- when order_sn=#{i.orderSn} then #{i.playOrderStatus}
- </if>
- </foreach>
- </trim>
- <trim prefix="project_check_status =case" suffix="end,">
- <foreach collection="list" item="i" index="idx">
- <if test="i.projectCheckStatus !=null and i.projectCheckStatus !=''">
- when order_sn=#{i.orderSn} then #{i.projectCheckStatus}
- </if>
- </foreach>
- </trim>
- <trim prefix="buyer_payer_check =case" suffix="end,">
- <foreach collection="list" item="i" index="idx">
- <if test="i.buyerPayerCheck !=null and i.buyerPayerCheck !=''">
- when order_sn=#{i.orderSn} then #{i.buyerPayerCheck}
- </if>
- </foreach>
- </trim>
- </trim>
- <where>
- <if test="list != null and list.size()>0">
- <foreach collection="list" item="i" index="index" separator="or" >
- order_sn=#{i.orderSn}
- </foreach>
- </if>
- </where>
- </update>
- <update id="updateWxOrderStatus" parameterType="hashMap">
- UPDATE wx_order
- <set>
- <if test="clecOrderStatus !=null and clecOrderStatus !=''">
- clec_order_status = #{clecOrderStatus}
- </if>
- <if test="projectCheckStatus !=null and projectCheckStatus !=''">
- project_check_status = #{projectCheckStatus}
- </if>
- <if test="wayOrderStatus !=null and wayOrderStatus !=''">
- way_order_status = #{wayOrderStatus}
- </if>
- <if test="playOrderStatus !=null and playOrderStatus !=''">
- play_order_status = #{playOrderStatus}
- </if>
- <if test="buyerPayerCheck !=null and buyerPayerCheck !=''">
- when buyer_payer_check = #{buyerPayerCheck}
- </if>
- </set>
- <where>
- order_sn=#{orderSn}
- </where>
- </update>
- <select id="getWxOrderByOrderSn" resultMap="BaseResultMap" parameterType="java.lang.String" >
- select
- <include refid="Base_Column_List" />
- from wx_order
- where order_sn = #{orderSn,jdbcType=VARCHAR}
- </select>
- <resultMap id="BaseResultMap2" type="com.emato.ccnet.wx.dao.entity.ccnet.WxOrder" >
- <id column="wx_order_sn" property="wxOrderSn" jdbcType="VARCHAR" />
- <result column="merch_order_id" property="merchOrderId" jdbcType="VARCHAR" />
- <result column="order_sn" property="orderSn" jdbcType="VARCHAR" />
- <result column="wx_order_id" property="wxOrderId" jdbcType="VARCHAR" />
- <result column="merch_sn" property="merchSn" jdbcType="VARCHAR" />
- <result column="merch_name" property="merchName" jdbcType="VARCHAR" />
- <result column="plat_sn" property="platSn" jdbcType="VARCHAR" />
- <result column="plat_name" property="platName" jdbcType="VARCHAR" />
- <result column="third_party_merch_code" property="thirdPartyMerchCode" jdbcType="VARCHAR" />
- <result column="third_party_merch_name" property="thirdPartyMerchName" jdbcType="VARCHAR" />
- <result column="place_orderl_time" property="placeOrderlTime" jdbcType="TIMESTAMP" />
- <result column="auto_send" property="autoSend" jdbcType="CHAR" />
- <result column="buyer_reg_no" property="buyerRegNo" jdbcType="VARCHAR" />
- <result column="buyer_bill_time" property="buyerBillTime" jdbcType="TIMESTAMP" />
- <result column="buyer_id_type" property="buyerIdType" jdbcType="VARCHAR" />
- <result column="buyer_id_code" property="buyerIdCode" jdbcType="VARCHAR" />
- <result column="buyer_name" property="buyerName" jdbcType="VARCHAR" />
- <result column="buyer_tel" property="buyerTel" jdbcType="VARCHAR" />
- <result column="consignee_id_type" property="consigneeIdType" jdbcType="VARCHAR" />
- <result column="consignee_id_code" property="consigneeIdCode" jdbcType="VARCHAR" />
- <result column="consignee_name" property="consigneeName" jdbcType="VARCHAR" />
- <result column="consignee_mob" property="consigneeMob" jdbcType="VARCHAR" />
- <result column="consignee_tel" property="consigneeTel" jdbcType="VARCHAR" />
- <result column="consignee_country_code" property="consigneeCountryCode" jdbcType="VARCHAR" />
- <result column="consignee_province_code" property="consigneeProvinceCode" jdbcType="VARCHAR" />
- <result column="consignee_province" property="consigneeProvince" jdbcType="VARCHAR" />
- <result column="consignee_city_code" property="consigneeCityCode" jdbcType="VARCHAR" />
- <result column="consignee_city" property="consigneeCity" jdbcType="VARCHAR" />
- <result column="consignee_district_code" property="consigneeDistrictCode" jdbcType="VARCHAR" />
- <result column="consignee_district" property="consigneeDistrict" jdbcType="VARCHAR" />
- <result column="consignee_address" property="consigneeAddress" jdbcType="VARCHAR" />
- <result column="consignee_zip_code" property="consigneeZipCode" jdbcType="VARCHAR" />
- <result column="payer_name" property="payerName" jdbcType="VARCHAR" />
- <result column="payer_id_type" property="payerIdType" jdbcType="VARCHAR" />
- <result column="payer_id_code" property="payerIdCode" jdbcType="VARCHAR" />
- <result column="payer_mob" property="payerMob" jdbcType="VARCHAR" />
- <result column="pay_ent_cus_code" property="payEntCusCode" jdbcType="VARCHAR" />
- <result column="pay_no" property="payNo" jdbcType="VARCHAR" />
- <result column="goods_value" property="goodsValue" jdbcType="DECIMAL" />
- <result column="freight" property="freight" jdbcType="DECIMAL" />
- <result column="discount" property="discount" jdbcType="DECIMAL" />
- <result column="tax_total" property="taxTotal" jdbcType="DECIMAL" />
- <result column="actural_paid" property="acturalPaid" jdbcType="DECIMAL" />
- <result column="pay_time" property="payTime" jdbcType="TIMESTAMP" />
- <result column="expr_type" property="exprType" jdbcType="CHAR" />
- <result column="expr_comp_id" property="exprCompId" jdbcType="VARCHAR" />
- <result column="expr_agreement_type" property="exprAgreementType" jdbcType="CHAR" />
- <result column="decl_expr_fee" property="declExprFee" jdbcType="DECIMAL" />
- <result column="batch_numbers" property="batchNumbers" jdbcType="VARCHAR" />
- <result column="decl_post_tax" property="declPostTax" jdbcType="DECIMAL" />
- <result column="shop_id" property="shopId" jdbcType="VARCHAR" />
- <result column="extra_tag" property="extraTag" jdbcType="VARCHAR" />
- <result column="currency_code" property="currencyCode" jdbcType="VARCHAR" />
- <result column="ws_flag" property="wsFlag" jdbcType="CHAR" />
- <result column="buyer_pay_check" property="buyerPayCheck" jdbcType="CHAR" />
- <result column="wx_order_detail" property="wxOrderDetail" jdbcType="CHAR" />
- <result column="clec_order_status" property="clecOrderStatus" jdbcType="CHAR" />
- <result column="way_order_status" property="wayOrderStatus" jdbcType="CHAR" />
- <result column="project_check_status" property="projectCheckStatus" jdbcType="CHAR" />
- <result column="play_order_status" property="playOrderStatus" jdbcType="CHAR" />
- <result column="remark" property="remark" jdbcType="VARCHAR" />
- <result column="creater_sn" property="createrSn" jdbcType="VARCHAR" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="moder_sn" property="moderSn" jdbcType="VARCHAR" />
- <result column="mod_time" property="modTime" jdbcType="TIMESTAMP" />
- <result column="tstm" property="tstm" jdbcType="TIMESTAMP" />
- <result column="ex_field" property="exField" jdbcType="VARCHAR" />
- <result column="ex_field2" property="exField2" jdbcType="VARCHAR" />
- <result column="ex_field3" property="exField3" jdbcType="VARCHAR" />
- <result column="ex_field4" property="exField4" jdbcType="VARCHAR" />
- <result column="ex_field5" property="exField5" jdbcType="VARCHAR" />
- </resultMap>
- <select id="getResendWxOrder" resultMap="BaseResultMap2" parameterType="java.lang.String" >
- SELECT DISTINCT
- '支付单' AS 'name',
- oo.wx_order_sn, oo.merch_order_id, oo.order_sn, oo.wx_order_id, oo.merch_sn, oo.merch_name, oo.plat_sn,
- oo.plat_name, oo.third_party_merch_code, oo.third_party_merch_name, oo.place_orderl_time, oo.auto_send,
- oo.buyer_reg_no, oo.buyer_bill_time, oo.buyer_id_type, oo.buyer_id_code, oo.buyer_name, oo.buyer_tel,
- oo.consignee_id_type, oo.consignee_id_code, oo.consignee_name, oo.consignee_mob, oo.consignee_tel,
- oo.consignee_country_code, oo.consignee_province_code, oo.consignee_province, oo.consignee_city_code,
- oo.consignee_city, oo.consignee_district_code, oo.consignee_district, oo.consignee_address, oo.consignee_zip_code,
- oo.payer_name, oo.payer_id_type, oo.payer_id_code, oo.payer_mob, oo.pay_ent_cus_code, oo.pay_no, oo.goods_value,
- oo.freight, oo.discount, oo.tax_total, oo.actural_paid, oo.pay_time, oo.expr_type, oo.expr_comp_id, oo.decl_expr_fee,
- oo.batch_numbers, oo.decl_post_tax, oo.shop_id, oo.extra_tag, oo.currency_code, oo.ws_flag, oo.buyer_pay_check, oo.wx_order_detail, oo.clec_order_status,oo.expr_agreement_type,
- oo.way_order_status, oo.project_check_status, oo.play_order_status, oo.remark, oo.creater_sn, oo.create_time,
- oo.moder_sn, oo.mod_time,
- ww.wx_cuspay_sn 'sn',
- ww.CODE 'failCode',
- ww.msg 'failMsg'
- FROM
- wx_cuspay_resp ww
- INNER JOIN wx_pay_doc d ON ww.wx_cuspay_sn = d.wx_cuspay_sn
- INNER JOIN wx_order oo ON d.out_trade_no = oo.merch_order_id
- WHERE
- ( play_order_status = 3 OR project_check_status = 3 )
- AND cus_decl_status = 13 UNION ALL
- (
- SELECT DISTINCT
- '运单' AS 'name',
- oo.wx_order_sn, oo.merch_order_id, oo.order_sn, oo.wx_order_id, oo.merch_sn, oo.merch_name, oo.plat_sn,
- oo.plat_name, oo.third_party_merch_code, oo.third_party_merch_name, oo.place_orderl_time, oo.auto_send,
- oo.buyer_reg_no, oo.buyer_bill_time, oo.buyer_id_type, oo.buyer_id_code, oo.buyer_name, oo.buyer_tel,
- oo.consignee_id_type, oo.consignee_id_code, oo.consignee_name, oo.consignee_mob, oo.consignee_tel,
- oo.consignee_country_code, oo.consignee_province_code, oo.consignee_province, oo.consignee_city_code,
- oo.consignee_city, oo.consignee_district_code, oo.consignee_district, oo.consignee_address, oo.consignee_zip_code,
- oo.payer_name, oo.payer_id_type, oo.payer_id_code, oo.payer_mob, oo.pay_ent_cus_code, oo.pay_no, oo.goods_value,
- oo.freight, oo.discount, oo.tax_total, oo.actural_paid, oo.pay_time, oo.expr_type, oo.expr_comp_id, oo.decl_expr_fee,
- oo.batch_numbers, oo.decl_post_tax, oo.shop_id, oo.extra_tag, oo.currency_code, oo.ws_flag, oo.buyer_pay_check, oo.wx_order_detail, oo.clec_order_status,oo.expr_agreement_type,
- oo.way_order_status, oo.project_check_status, oo.play_order_status, oo.remark, oo.creater_sn, oo.create_time,
- oo.moder_sn, oo.mod_time,
- ww.cus_waybill_sn 'sn',
- ww.biz_info_code 'failCode',
- ww.biz_info_desc 'failMsg'
- FROM
- cus_waybill_resp ww
- INNER JOIN cus_waybill w ON ww.cus_waybill_sn = w.cus_waybill_sn
- INNER JOIN wx_order oo ON w.merch_order_id = oo.order_sn
- WHERE
- way_order_status = 3
- ) UNION ALL
- (
- SELECT DISTINCT
- '电子订单' AS 'name',
- oo.wx_order_sn, oo.merch_order_id, oo.order_sn, oo.wx_order_id, oo.merch_sn, oo.merch_name, oo.plat_sn,
- oo.plat_name, oo.third_party_merch_code, oo.third_party_merch_name, oo.place_orderl_time, oo.auto_send,
- oo.buyer_reg_no, oo.buyer_bill_time, oo.buyer_id_type, oo.buyer_id_code, oo.buyer_name, oo.buyer_tel,
- oo.consignee_id_type, oo.consignee_id_code, oo.consignee_name, oo.consignee_mob, oo.consignee_tel,
- oo.consignee_country_code, oo.consignee_province_code, oo.consignee_province, oo.consignee_city_code,
- oo.consignee_city, oo.consignee_district_code, oo.consignee_district, oo.consignee_address, oo.consignee_zip_code,
- oo.payer_name, oo.payer_id_type, oo.payer_id_code, oo.payer_mob, oo.pay_ent_cus_code, oo.pay_no, oo.goods_value,
- oo.freight, oo.discount, oo.tax_total, oo.actural_paid, oo.pay_time, oo.expr_type, oo.expr_comp_id, oo.decl_expr_fee,
- oo.batch_numbers, oo.decl_post_tax, oo.shop_id, oo.extra_tag, oo.currency_code, oo.ws_flag, oo.buyer_pay_check, oo.wx_order_detail, oo.clec_order_status,oo.expr_agreement_type,
- oo.way_order_status, oo.project_check_status, oo.play_order_status, oo.remark, oo.creater_sn, oo.create_time,
- oo.moder_sn, oo.mod_time,
- ww.cus_order_sn 'sn',
- ww.cus_resp_code 'failCode',
- ww.cus_resp_desc 'failMsg'
- FROM
- cus_order_resp ww
- INNER JOIN cus_order w ON ww.cus_order_sn = w.cus_order_sn
- INNER JOIN wx_order oo ON w.merch_order_sn = oo.order_sn
- WHERE
- clec_order_status = 3
- )
- </select>
- </mapper>
|