Commit e49f2ead752447e82afd6c1bc1e2ccd88c6830fd
1 parent
a29ac220
update:保存时增加字段
Showing
2 changed files
with
11 additions
and
6 deletions
etrade-order/src/main/java/com/diligrp/etrade/order/service/impl/OrderPaymenServiceImpl.java
@@ -396,7 +396,7 @@ public class OrderPaymenServiceImpl implements OrderPaymentService { | @@ -396,7 +396,7 @@ public class OrderPaymenServiceImpl implements OrderPaymentService { | ||
396 | } | 396 | } |
397 | 397 | ||
398 | //卖方订单并且使用买方元气卡支付时,记录园区卡支付的具体方式 | 398 | //卖方订单并且使用买方元气卡支付时,记录园区卡支付的具体方式 |
399 | - if (payChannel.equals(OrderPaymentAllChannel.CARD_CHANNEL.getCodeInteger()) || OrderOrderType.SELLER_ORDER.getCodeInteger().equals(order.getOrderType())) { | 399 | + if (payChannel.equals(OrderPaymentAllChannel.CARD_CHANNEL.getCodeInteger()) && OrderOrderType.SELLER_ORDER.getCodeInteger().equals(order.getOrderType())) { |
400 | if (orderPayDto.getPayChannelSub() == null) { | 400 | if (orderPayDto.getPayChannelSub() == null) { |
401 | orderPayment.setPayChannelSub(OrderPaymentSubChannel.CARD_CHANNEL_BUYER.getCodeInteger()); | 401 | orderPayment.setPayChannelSub(OrderPaymentSubChannel.CARD_CHANNEL_BUYER.getCodeInteger()); |
402 | } else { | 402 | } else { |
etrade-order/src/main/resources/com/diligrp/etrade/dao/mapper/order/OrderPaymentMapper.xml
@@ -34,13 +34,14 @@ | @@ -34,13 +34,14 @@ | ||
34 | <result column="seller_fee_state" jdbcType="VARCHAR" property="sellerFeeState" /> | 34 | <result column="seller_fee_state" jdbcType="VARCHAR" property="sellerFeeState" /> |
35 | <result column="order_status" jdbcType="TINYINT" property="orderStatus" /> | 35 | <result column="order_status" jdbcType="TINYINT" property="orderStatus" /> |
36 | <result column="relation_id" jdbcType="BIGINT" property="relationId" /> | 36 | <result column="relation_id" jdbcType="BIGINT" property="relationId" /> |
37 | + <result column="pay_channel_sub" jdbcType="TINYINT" property="payChannelSub"/> | ||
37 | </resultMap> | 38 | </resultMap> |
38 | <sql id="Base_Column_List"> | 39 | <sql id="Base_Column_List"> |
39 | id, `code`, order_id, order_code,market_id, pay_amount, pay_discount, payer_customer_id, payer_store_customer_id, | 40 | id, `code`, order_id, order_code,market_id, pay_amount, pay_discount, payer_customer_id, payer_store_customer_id, |
40 | payer_customer_name, payer_card_no, payer_account_id, payer_fund_account_id, payee_shop_id, | 41 | payer_customer_name, payer_card_no, payer_account_id, payer_fund_account_id, payee_shop_id, |
41 | payee_shop_name, payee_card_no, payee_account_id, payee_fund_account_id, payee_seller_id, | 42 | payee_shop_name, payee_card_no, payee_account_id, payee_fund_account_id, payee_seller_id, |
42 | payee_seller_name, pay_time, pay_mode, pay_channel, version, created_time, modified_time, | 43 | payee_seller_name, pay_time, pay_mode, pay_channel, version, created_time, modified_time, |
43 | - `state`, trade_id,totle_seller_fee,seller_fee_state,order_status,relation_id | 44 | + `state`, trade_id,totle_seller_fee,seller_fee_state,order_status,relation_id,pay_channel_sub |
44 | </sql> | 45 | </sql> |
45 | <sql id="VO_Column_List"> | 46 | <sql id="VO_Column_List"> |
46 | id, `code`, order_id, order_code, convert(pay_amount, decimal(20,2))/100 as pay_amount, convert(pay_discount, decimal(20,2))/100 as pay_discount, payer_customer_id, payer_store_customer_id, | 47 | id, `code`, order_id, order_code, convert(pay_amount, decimal(20,2))/100 as pay_amount, convert(pay_discount, decimal(20,2))/100 as pay_discount, payer_customer_id, payer_store_customer_id, |
@@ -58,7 +59,8 @@ | @@ -58,7 +59,8 @@ | ||
58 | payee_account_id, payee_fund_account_id, payee_seller_id, | 59 | payee_account_id, payee_fund_account_id, payee_seller_id, |
59 | payee_seller_name, pay_time, pay_mode, | 60 | payee_seller_name, pay_time, pay_mode, |
60 | pay_channel, version, state, trade_id, | 61 | pay_channel, version, state, trade_id, |
61 | - totle_seller_fee,seller_fee_state,order_status,relation_id | 62 | + totle_seller_fee,seller_fee_state,order_status,relation_id, |
63 | + pay_channel_sub | ||
62 | ) | 64 | ) |
63 | values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{orderId,jdbcType=INTEGER},#{marketId,jdbcType=BIGINT}, | 65 | values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{orderId,jdbcType=INTEGER},#{marketId,jdbcType=BIGINT}, |
64 | #{orderCode,jdbcType=VARCHAR}, #{payAmount,jdbcType=BIGINT}, #{payDiscount,jdbcType=BIGINT}, | 66 | #{orderCode,jdbcType=VARCHAR}, #{payAmount,jdbcType=BIGINT}, #{payDiscount,jdbcType=BIGINT}, |
@@ -68,7 +70,8 @@ | @@ -68,7 +70,8 @@ | ||
68 | #{payeeAccountId,jdbcType=BIGINT}, #{payeeFundAccountId,jdbcType=BIGINT}, #{payeeSellerId,jdbcType=BIGINT}, | 70 | #{payeeAccountId,jdbcType=BIGINT}, #{payeeFundAccountId,jdbcType=BIGINT}, #{payeeSellerId,jdbcType=BIGINT}, |
69 | #{payeeSellerName,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMode,jdbcType=INTEGER}, | 71 | #{payeeSellerName,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMode,jdbcType=INTEGER}, |
70 | #{payChannel,jdbcType=INTEGER}, #{version,jdbcType=INTEGER}, #{state,jdbcType=TINYINT}, #{tradeId,jdbcType=VARCHAR}, | 72 | #{payChannel,jdbcType=INTEGER}, #{version,jdbcType=INTEGER}, #{state,jdbcType=TINYINT}, #{tradeId,jdbcType=VARCHAR}, |
71 | - #{totleSellerFee,jdbcType=BIGINT}, #{sellerFeeState,jdbcType=TINYINT},#{orderStatus,jdbcType=TINYINT}, #{relationId,jdbcType=BIGINT}) | 73 | + #{totleSellerFee,jdbcType=BIGINT}, #{sellerFeeState,jdbcType=TINYINT},#{orderStatus,jdbcType=TINYINT}, #{relationId,jdbcType=BIGINT}, |
74 | + #{payChannelSub,jdbcType=INTEGER}) | ||
72 | </insert> | 75 | </insert> |
73 | <insert id="saveBatch" useGeneratedKeys="true" keyProperty="id"> | 76 | <insert id="saveBatch" useGeneratedKeys="true" keyProperty="id"> |
74 | insert into order_payment (id, code, order_id,market_id, | 77 | insert into order_payment (id, code, order_id,market_id, |
@@ -79,7 +82,8 @@ | @@ -79,7 +82,8 @@ | ||
79 | payee_account_id, payee_fund_account_id, payee_seller_id, | 82 | payee_account_id, payee_fund_account_id, payee_seller_id, |
80 | payee_seller_name, pay_time, pay_mode, | 83 | payee_seller_name, pay_time, pay_mode, |
81 | pay_channel, version, state, trade_id, | 84 | pay_channel, version, state, trade_id, |
82 | - totle_seller_fee,seller_fee_state,order_status,relation_id | 85 | + totle_seller_fee,seller_fee_state,order_status,relation_id, |
86 | + pay_channel_sub | ||
83 | ) | 87 | ) |
84 | values | 88 | values |
85 | <foreach collection="list" item="payment" separator=","> | 89 | <foreach collection="list" item="payment" separator=","> |
@@ -91,7 +95,8 @@ | @@ -91,7 +95,8 @@ | ||
91 | #{payment.payeeAccountId,jdbcType=BIGINT}, #{payment.payeeFundAccountId,jdbcType=BIGINT}, #{payment.payeeSellerId,jdbcType=BIGINT}, | 95 | #{payment.payeeAccountId,jdbcType=BIGINT}, #{payment.payeeFundAccountId,jdbcType=BIGINT}, #{payment.payeeSellerId,jdbcType=BIGINT}, |
92 | #{payment.payeeSellerName,jdbcType=VARCHAR}, #{payment.payTime,jdbcType=TIMESTAMP}, #{payment.payMode,jdbcType=INTEGER}, | 96 | #{payment.payeeSellerName,jdbcType=VARCHAR}, #{payment.payTime,jdbcType=TIMESTAMP}, #{payment.payMode,jdbcType=INTEGER}, |
93 | #{payment.payChannel,jdbcType=INTEGER}, #{payment.version,jdbcType=INTEGER}, #{payment.state,jdbcType=TINYINT}, #{payment.tradeId,jdbcType=VARCHAR}, | 97 | #{payment.payChannel,jdbcType=INTEGER}, #{payment.version,jdbcType=INTEGER}, #{payment.state,jdbcType=TINYINT}, #{payment.tradeId,jdbcType=VARCHAR}, |
94 | - #{payment.totleSellerFee,jdbcType=BIGINT}, #{payment.sellerFeeState,jdbcType=TINYINT},#{payment.orderStatus,jdbcType=TINYINT}, #{payment.relationId,jdbcType=BIGINT}) | 98 | + #{payment.totleSellerFee,jdbcType=BIGINT}, #{payment.sellerFeeState,jdbcType=TINYINT},#{payment.orderStatus,jdbcType=TINYINT}, #{payment.relationId,jdbcType=BIGINT}, |
99 | + #{payChannelSub,jdbcType=INTEGER}) | ||
95 | </foreach> | 100 | </foreach> |
96 | </insert> | 101 | </insert> |
97 | <update id="updatepayment" parameterType="com.diligrp.etrade.order.model.OrderPayment"> | 102 | <update id="updatepayment" parameterType="com.diligrp.etrade.order.model.OrderPayment"> |