Commit df99648637de77f0efd98332dd8cbca0be831a9b
1 parent
e01a85ed
update:运费与商品单价
Showing
14 changed files
with
108 additions
and
31 deletions
etrade-order/src/main/java/com/diligrp/etrade/order/domain/OrderDto.java
... | ... | @@ -237,6 +237,8 @@ public class OrderDto { |
237 | 237 | |
238 | 238 | /** 订单配送状态 */ |
239 | 239 | private Integer achieveState; |
240 | + /** 运费 */ | |
241 | + private Long transportFee; | |
240 | 242 | |
241 | 243 | public Integer getAchieveType() { |
242 | 244 | return achieveType; |
... | ... | @@ -715,4 +717,12 @@ public class OrderDto { |
715 | 717 | public void setRelationId(Long relationId) { |
716 | 718 | this.relationId = relationId; |
717 | 719 | } |
720 | + | |
721 | + public Long getTransportFee() { | |
722 | + return transportFee; | |
723 | + } | |
724 | + | |
725 | + public void setTransportFee(Long transportFee) { | |
726 | + this.transportFee = transportFee; | |
727 | + } | |
718 | 728 | } | ... | ... |
etrade-order/src/main/java/com/diligrp/etrade/order/domain/OrderPaymentDto.java
... | ... | @@ -80,6 +80,9 @@ public class OrderPaymentDto { |
80 | 80 | /** 订单卖家手续费收费状态 */ |
81 | 81 | private Integer sellerFeeState; |
82 | 82 | |
83 | + /** 运费 */ | |
84 | + private Long transportFee; | |
85 | + | |
83 | 86 | public BigDecimal getTotleSellerFee() { |
84 | 87 | return totleSellerFee; |
85 | 88 | } |
... | ... | @@ -319,4 +322,12 @@ public class OrderPaymentDto { |
319 | 322 | public void setTradeId(String tradeId) { |
320 | 323 | this.tradeId = tradeId; |
321 | 324 | } |
325 | + | |
326 | + public Long getTransportFee() { | |
327 | + return transportFee; | |
328 | + } | |
329 | + | |
330 | + public void setTransportFee(Long transportFee) { | |
331 | + this.transportFee = transportFee; | |
332 | + } | |
322 | 333 | } | ... | ... |
etrade-order/src/main/java/com/diligrp/etrade/order/domain/ProductDto.java
... | ... | @@ -70,6 +70,7 @@ public class ProductDto { |
70 | 70 | @NotNull(message = "店铺id不能为空",groups = {MultipleOrderDto.class}) |
71 | 71 | private Long shopId; |
72 | 72 | |
73 | + private String productUnit; | |
73 | 74 | |
74 | 75 | public String getCode() { |
75 | 76 | return code; |
... | ... | @@ -222,4 +223,12 @@ public class ProductDto { |
222 | 223 | public void setSalesMode(Integer salesMode) { |
223 | 224 | this.salesMode = salesMode; |
224 | 225 | } |
226 | + | |
227 | + public String getProductUnit() { | |
228 | + return productUnit; | |
229 | + } | |
230 | + | |
231 | + public void setProductUnit(String productUnit) { | |
232 | + this.productUnit = productUnit; | |
233 | + } | |
225 | 234 | } | ... | ... |
etrade-order/src/main/java/com/diligrp/etrade/order/domain/ProductExtDto.java
... | ... | @@ -73,6 +73,8 @@ public class ProductExtDto { |
73 | 73 | |
74 | 74 | private String orderCode; |
75 | 75 | |
76 | + private String productUnit; | |
77 | + | |
76 | 78 | /** 下单提货方式(1自提,2配送) */ |
77 | 79 | private Integer achieveType = 1; |
78 | 80 | |
... | ... | @@ -251,4 +253,12 @@ public class ProductExtDto { |
251 | 253 | public void setShopId(Long shopId) { |
252 | 254 | this.shopId = shopId; |
253 | 255 | } |
256 | + | |
257 | + public String getProductUnit() { | |
258 | + return productUnit; | |
259 | + } | |
260 | + | |
261 | + public void setProductUnit(String productUnit) { | |
262 | + this.productUnit = productUnit; | |
263 | + } | |
254 | 264 | } | ... | ... |
etrade-order/src/main/java/com/diligrp/etrade/order/model/OrderGoods.java
... | ... | @@ -94,6 +94,10 @@ public class OrderGoods { |
94 | 94 | * 关联订单id |
95 | 95 | */ |
96 | 96 | private Long relationId; |
97 | + /** | |
98 | + * 商品单位 | |
99 | + */ | |
100 | + private String productUnit; | |
97 | 101 | |
98 | 102 | public Integer getSalesMode() { |
99 | 103 | return salesMode; |
... | ... | @@ -310,4 +314,12 @@ public class OrderGoods { |
310 | 314 | public void setRelationId(Long relationId) { |
311 | 315 | this.relationId = relationId; |
312 | 316 | } |
317 | + | |
318 | + public String getProductUnit() { | |
319 | + return productUnit; | |
320 | + } | |
321 | + | |
322 | + public void setProductUnit(String productUnit) { | |
323 | + this.productUnit = productUnit; | |
324 | + } | |
313 | 325 | } |
314 | 326 | \ No newline at end of file | ... | ... |
etrade-order/src/main/java/com/diligrp/etrade/order/service/impl/OrderGoodsServiceImpl.java
... | ... | @@ -185,7 +185,7 @@ public class OrderGoodsServiceImpl implements OrderGoodsService { |
185 | 185 | waitCouponAmount = waitCouponAmount.subtract(couponAmount); |
186 | 186 | } |
187 | 187 | } |
188 | - //配送情况增加计算运费 | |
188 | + //TODO 配送情况增加计算运费 | |
189 | 189 | if(buyerOrderDto.getAchieveType().equals(OrderAchieveType.SELLER_DELIVERY.getCodeInteger())){ |
190 | 190 | allmount.add(buyerOrderDto.getTransportFee()); |
191 | 191 | } | ... | ... |
etrade-order/src/main/java/com/diligrp/etrade/order/type/BizNumberTypeEnum.java
etrade-order/src/main/java/com/diligrp/etrade/order/util/NumberTransform.java
... | ... | @@ -4,13 +4,13 @@ import java.math.BigDecimal; |
4 | 4 | |
5 | 5 | public class NumberTransform { |
6 | 6 | /** 500 */ |
7 | - public static BigDecimal FIVE_HUNDERD = new BigDecimal(500); | |
7 | + public static BigDecimal FIVE_HUNDERD = new BigDecimal(100); | |
8 | 8 | |
9 | 9 | /** 100 */ |
10 | 10 | public static BigDecimal ONE_HUNDERD = new BigDecimal(100); |
11 | 11 | |
12 | 12 | /** 200 */ |
13 | - public static BigDecimal TWO_HUNDERD = new BigDecimal(200); | |
13 | + public static BigDecimal TWO_HUNDERD = new BigDecimal(100); | |
14 | 14 | |
15 | 15 | /** 10 */ |
16 | 16 | public static BigDecimal TEN = new BigDecimal(10); | ... | ... |
etrade-order/src/main/resources/com/diligrp/etrade/dao/mapper/order/OrderGoodsMapper.xml
... | ... | @@ -27,12 +27,13 @@ |
27 | 27 | <result column="product_seller_fee_state" jdbcType="TINYINT" property="productSellerFeeState" /> |
28 | 28 | <result column="order_status" jdbcType="TINYINT" property="orderStatus" /> |
29 | 29 | <result column="relation_id" jdbcType="BIGINT" property="relationId" /> |
30 | + <result column="product_unit" jdbcType="VARCHAR" property="productUnit" /> | |
30 | 31 | </resultMap> |
31 | 32 | <sql id="Base_Column_List"> |
32 | 33 | id, market_id, order_id, order_code, product_id, product_code,product_category_id, product_name, product_price, |
33 | 34 | product_total_price, product_weight, product_pieces, product_piece_weight, product_piece_price, |
34 | 35 | product_trade_type,product_coupon_amount, product_img_url, `state`, created_time, modified_time, version,product_seller_fee |
35 | - ,product_seller_fee_state,`code`,order_status,relation_id | |
36 | + ,product_seller_fee_state,`code`,order_status,relation_id,product_unit | |
36 | 37 | </sql> |
37 | 38 | <insert id="saveBatch" useGeneratedKeys="true" keyProperty="id"> |
38 | 39 | insert into order_goods (id, market_id, order_id, |
... | ... | @@ -40,7 +41,7 @@ |
40 | 41 | product_name, product_price, product_total_price, |
41 | 42 | product_weight, product_pieces, product_piece_weight, |
42 | 43 | product_piece_price,product_coupon_amount, product_trade_type, product_img_url, |
43 | - state, version,product_seller_fee,product_seller_fee_state,`code`,order_status,relation_id) | |
44 | + state, version,product_seller_fee,product_seller_fee_state,`code`,order_status,relation_id,product_unit) | |
44 | 45 | values |
45 | 46 | <foreach collection="list" item="goods" separator=","> |
46 | 47 | (#{goods.id,jdbcType=BIGINT}, #{goods.marketId,jdbcType=BIGINT}, #{goods.orderId,jdbcType=BIGINT}, |
... | ... | @@ -48,7 +49,7 @@ |
48 | 49 | #{goods.productName,jdbcType=VARCHAR}, #{goods.productPrice,jdbcType=BIGINT}, #{goods.productTotalPrice,jdbcType=BIGINT}, |
49 | 50 | #{goods.productWeight,jdbcType=BIGINT}, #{goods.productPieces,jdbcType=BIGINT}, #{goods.productPieceWeight,jdbcType=BIGINT}, |
50 | 51 | #{goods.productPiecePrice,jdbcType=BIGINT},#{goods.productCouponAmount,jdbcType=BIGINT}, #{goods.productTradeType,jdbcType=TINYINT}, #{goods.productImgUrl,jdbcType=VARCHAR}, |
51 | - #{goods.state,jdbcType=TINYINT}, #{goods.version,jdbcType=INTEGER},#{goods.productSellerFee,jdbcType=BIGINT},#{goods.productSellerFeeState,jdbcType=TINYINT}, #{goods.code,jdbcType=VARCHAR},#{goods.orderStatus,jdbcType=TINYINT}, #{goods.relationId,jdbcType=BIGINT}) | |
52 | + #{goods.state,jdbcType=TINYINT}, #{goods.version,jdbcType=INTEGER},#{goods.productSellerFee,jdbcType=BIGINT},#{goods.productSellerFeeState,jdbcType=TINYINT}, #{goods.code,jdbcType=VARCHAR},#{goods.orderStatus,jdbcType=TINYINT}, #{goods.relationId,jdbcType=BIGINT}, #{goods.productUnit,jdbcType=VARCHAR}) | |
52 | 53 | </foreach> |
53 | 54 | </insert> |
54 | 55 | <update id="updateOrderGoodsState"> |
... | ... | @@ -67,11 +68,11 @@ |
67 | 68 | product_code, |
68 | 69 | product_category_id, |
69 | 70 | product_name, |
70 | - convert(product_price, decimal(20,2))/200 as product_price, | |
71 | + convert(product_price, decimal(20,2))/100 as product_price, | |
71 | 72 | convert(product_total_price, decimal(20,2))/100 as product_total_price, |
72 | - convert(product_weight, decimal(20,2))/500 as product_weight, | |
73 | + convert(product_weight, decimal(20,2))/100 as product_weight, | |
73 | 74 | convert(product_pieces, decimal(20,2))/100 as product_pieces, |
74 | - convert(product_piece_weight, decimal(20,2))/500 as product_piece_weight, | |
75 | + convert(product_piece_weight, decimal(20,2))/100 as product_piece_weight, | |
75 | 76 | convert(product_piece_price, decimal(20,2))/100 as product_piece_price, |
76 | 77 | convert(product_coupon_amount, decimal(20,2))/100 as coupon_amount, |
77 | 78 | product_trade_type, |
... | ... | @@ -82,7 +83,8 @@ |
82 | 83 | version, |
83 | 84 | convert(product_seller_fee, decimal(20,2))/100 as product_seller_fee, |
84 | 85 | product_seller_fee_state, |
85 | - `code` | |
86 | + `code`, | |
87 | + product_unit | |
86 | 88 | from order_goods |
87 | 89 | where order_id = #{orderId,jdbcType=BIGINT} and `state` = #{state} |
88 | 90 | </select> |
... | ... | @@ -110,9 +112,9 @@ |
110 | 112 | product_name, |
111 | 113 | convert(product_price, decimal(20,2))/100 as product_price, |
112 | 114 | convert(product_total_price, decimal(20,2))/100 as product_total_price, |
113 | - convert(product_weight, decimal(20,2))/1000 as product_weight, | |
115 | + convert(product_weight, decimal(20,2))/100 as product_weight, | |
114 | 116 | convert(product_pieces, decimal(20,2))/100 as product_pieces, |
115 | - convert(product_piece_weight, decimal(20,2))/1000 as product_piece_weight, | |
117 | + convert(product_piece_weight, decimal(20,2))/100 as product_piece_weight, | |
116 | 118 | convert(product_piece_price, decimal(20,2))/100 as product_piece_price, |
117 | 119 | convert(product_coupon_amount, decimal(20,2))/100 as coupon_amount, |
118 | 120 | product_trade_type, |
... | ... | @@ -123,7 +125,8 @@ |
123 | 125 | version, |
124 | 126 | convert(product_seller_fee, decimal(20,2))/100 as product_seller_fee, |
125 | 127 | product_seller_fee_state, |
126 | - `code` | |
128 | + `code`, | |
129 | + product_unit | |
127 | 130 | from order_goods |
128 | 131 | where order_id = #{orderId,jdbcType=BIGINT} and `state` = #{state} |
129 | 132 | </select> |
... | ... | @@ -139,9 +142,9 @@ |
139 | 142 | product_name, |
140 | 143 | convert(product_price, decimal(20,2))/100 as product_price, |
141 | 144 | convert(product_total_price, decimal(20,2))/100 as product_total_price, |
142 | - convert(product_weight, decimal(20,2))/1000 as product_weight, | |
145 | + convert(product_weight, decimal(20,2))/100 as product_weight, | |
143 | 146 | convert(product_pieces, decimal(20,2))/100 as product_pieces, |
144 | - convert(product_piece_weight, decimal(20,2))/1000 as product_piece_weight, | |
147 | + convert(product_piece_weight, decimal(20,2))/100 as product_piece_weight, | |
145 | 148 | convert(product_piece_price, decimal(20,2))/100 as product_piece_price, |
146 | 149 | convert(product_coupon_amount, decimal(20,2))/100 as coupon_amount, |
147 | 150 | product_trade_type, |
... | ... | @@ -153,6 +156,7 @@ |
153 | 156 | convert(product_seller_fee, decimal(20,2))/100 as product_seller_fee, |
154 | 157 | product_seller_fee_state, |
155 | 158 | `code`, |
159 | + product_unit, | |
156 | 160 | #{shopId} shop_id, |
157 | 161 | #{shopCustomerId} shop_customer_id |
158 | 162 | from order_goods | ... | ... |
etrade-order/src/main/resources/com/diligrp/etrade/dao/mapper/order/OrderMapper.xml
... | ... | @@ -58,6 +58,7 @@ |
58 | 58 | <result column="achieve_type" jdbcType="INTEGER" property="achieveType" /> |
59 | 59 | <result column="achieve_address" jdbcType="VARCHAR" property="achieveAddress" /> |
60 | 60 | <result column="achieve_state" jdbcType="INTEGER" property="achieveState" /> |
61 | + <result column="transport_fee" jdbcType="BIGINT" property="transportFee" /> | |
61 | 62 | </resultMap> |
62 | 63 | <sql id="Base_Column_List"> |
63 | 64 | id, code, mapping_code, market_id, buyer_code, buyer_id,buyer_store_customer_id, buyer_name, buyer_account_id, |
... | ... | @@ -67,7 +68,7 @@ |
67 | 68 | pay_time, order_state, `state`, version, creater_id, creater, created_time, modifier_id, |
68 | 69 | modifier, modified_time, verify_ids, verifier,verify_state, verifier_time, cancel_id, cancel_name, |
69 | 70 | cancel_time, out_time,`source`,totle_seller_fee,district_id,district_name,sub_district_id,sub_district_name,location |
70 | - ,order_status,relation_id,achieve_type,achieve_address,achieve_state | |
71 | + ,order_status,relation_id,achieve_type,achieve_address,achieve_state,transport_fee | |
71 | 72 | </sql> |
72 | 73 | <sql id="Dto_Column_List"> |
73 | 74 | id, |
... | ... | @@ -94,7 +95,7 @@ |
94 | 95 | convert(totle_pay_amount, decimal(20,2))/100 as totle_pay_amount, |
95 | 96 | convert(totle_paid_amount, decimal(20,2))/100 as totle_paid_amount, |
96 | 97 | convert(totle_discount, decimal(20,2))/100 as totle_discount, |
97 | - convert(totle_weight, decimal(20,2))/500 as totle_weight, | |
98 | + convert(totle_weight, decimal(20,2))/100 as totle_weight, | |
98 | 99 | order_type, |
99 | 100 | pay_state, |
100 | 101 | pay_time, |
... | ... | @@ -124,7 +125,8 @@ |
124 | 125 | location, |
125 | 126 | achieve_type, |
126 | 127 | achieve_address, |
127 | - achieve_state | |
128 | + achieve_state, | |
129 | + transport_fee | |
128 | 130 | </sql> |
129 | 131 | <insert id="saveOrder" parameterType="com.diligrp.etrade.order.model.Order" useGeneratedKeys="true" keyProperty="id" > |
130 | 132 | insert into `order` (id, code, mapping_code, |
... | ... | @@ -143,7 +145,7 @@ |
143 | 145 | cancel_id, cancel_name, cancel_time, |
144 | 146 | out_time,`source`,totle_seller_fee, |
145 | 147 | district_id,district_name,sub_district_id,sub_district_name,location |
146 | - ,order_status,relation_id,achieve_type,achieve_address,achieve_state) | |
148 | + ,order_status,relation_id,achieve_type,achieve_address,achieve_state,transport_fee) | |
147 | 149 | values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{mappingCode,jdbcType=VARCHAR}, |
148 | 150 | #{marketId,jdbcType=BIGINT}, #{buyerCode,jdbcType=VARCHAR}, #{buyerId,jdbcType=BIGINT},#{buyerStoreCustomerId,jdbcType=BIGINT}, |
149 | 151 | #{buyerName,jdbcType=VARCHAR}, #{buyerAccountId,jdbcType=BIGINT}, #{buyerCardNo,jdbcType=VARCHAR}, |
... | ... | @@ -160,7 +162,7 @@ |
160 | 162 | #{cancelId,jdbcType=BIGINT}, #{cancelName,jdbcType=VARCHAR}, #{cancelTime,jdbcType=TIMESTAMP}, |
161 | 163 | #{outTime,jdbcType=TIMESTAMP},#{source,jdbcType=TINYINT}, #{totleSellerFee,jdbcType=BIGINT}, |
162 | 164 | #{districtId,jdbcType=BIGINT},#{districtName},#{subDistrictId,jdbcType=BIGINT},#{subDistrictName},#{location} |
163 | - ,#{orderStatus,jdbcType=TINYINT}, #{relationId,jdbcType=BIGINT}, #{achieveType,jdbcType=TINYINT},#{achieveAddress,jdbcType=VARCHAR},#{achieveState,jdbcType=TINYINT}) | |
165 | + ,#{orderStatus,jdbcType=TINYINT}, #{relationId,jdbcType=BIGINT}, #{achieveType,jdbcType=TINYINT},#{achieveAddress,jdbcType=VARCHAR},#{achieveState,jdbcType=TINYINT},#{transportFee,jdbcType=VARCHAR}) | |
164 | 166 | </insert> |
165 | 167 | <update id="updateOrderById" parameterType="com.diligrp.etrade.order.model.Order"> |
166 | 168 | update `order` |
... | ... | @@ -212,7 +214,8 @@ |
212 | 214 | location = #{location}, |
213 | 215 | achieve_type = #{achieveType,jdbcType=TINYINT}, |
214 | 216 | achieve_address = #{achieveAddress,jdbcType=VARCHAR}, |
215 | - achieve_state = #{achieveState,jdbcType=TINYINT} | |
217 | + achieve_state = #{achieveState,jdbcType=TINYINT}, | |
218 | + transport_fee = #{transportFee,jdbcType=VARCHAR} | |
216 | 219 | where id = #{id,jdbcType=BIGINT} and version = #{version,jdbcType=BIGINT} |
217 | 220 | </update> |
218 | 221 | |
... | ... | @@ -369,6 +372,9 @@ |
369 | 372 | <if test="achieveState != null"> |
370 | 373 | achieve_state = #{achieveState,jdbcType=TINYINT}, |
371 | 374 | </if> |
375 | + <if test="transportFee != null"> | |
376 | + transport_fee = #{transportFee,jdbcType=VARCHAR}, | |
377 | + </if> | |
372 | 378 | </set> |
373 | 379 | where id = #{id,jdbcType=BIGINT} and version = #{version,jdbcType=INTEGER} |
374 | 380 | </update> | ... | ... |
etrade-order/src/main/resources/com/diligrp/etrade/dao/mapper/order/OrderPaymentMapper.xml
... | ... | @@ -34,20 +34,21 @@ |
34 | 34 | <result column="seller_fee_state" jdbcType="VARCHAR" property="sellerFeeState" /> |
35 | 35 | <result column="order_status" jdbcType="TINYINT" property="orderStatus" /> |
36 | 36 | <result column="relation_id" jdbcType="BIGINT" property="relationId" /> |
37 | + <result column="transport_fee" jdbcType="BIGINT" property="transportFee" /> | |
37 | 38 | </resultMap> |
38 | 39 | <sql id="Base_Column_List"> |
39 | 40 | id, `code`, order_id, order_code,market_id, pay_amount, pay_discount, payer_customer_id, payer_store_customer_id, |
40 | 41 | payer_customer_name, payer_card_no, payer_account_id, payer_fund_account_id, payee_shop_id, |
41 | 42 | payee_shop_name, payee_card_no, payee_account_id, payee_fund_account_id, payee_seller_id, |
42 | 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,transport_fee | |
44 | 45 | </sql> |
45 | 46 | <sql id="VO_Column_List"> |
46 | 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, |
47 | 48 | payer_customer_name, payer_card_no, payer_account_id, payer_fund_account_id, payee_shop_id, |
48 | 49 | payee_shop_name, payee_card_no, payee_account_id, payee_fund_account_id, payee_seller_id, |
49 | 50 | payee_seller_name, pay_time, pay_mode, pay_channel, version, created_time, modified_time, |
50 | - `state`, trade_id,convert(totle_seller_fee, decimal(20,2))/100 as totle_seller_fee,seller_fee_state | |
51 | + `state`, trade_id,convert(totle_seller_fee, decimal(20,2))/100 as totle_seller_fee,seller_fee_state,transport_fee | |
51 | 52 | </sql> |
52 | 53 | <insert id="save" parameterType="com.diligrp.etrade.order.model.OrderPayment" useGeneratedKeys="true" keyProperty="id" > |
53 | 54 | insert into order_payment (id, code, order_id,market_id, |
... | ... | @@ -59,6 +60,7 @@ |
59 | 60 | payee_seller_name, pay_time, pay_mode, |
60 | 61 | pay_channel, version, state, trade_id, |
61 | 62 | totle_seller_fee,seller_fee_state,order_status,relation_id |
63 | + ,transport_fee | |
62 | 64 | ) |
63 | 65 | values (#{id,jdbcType=BIGINT}, #{code,jdbcType=VARCHAR}, #{orderId,jdbcType=INTEGER},#{marketId,jdbcType=BIGINT}, |
64 | 66 | #{orderCode,jdbcType=VARCHAR}, #{payAmount,jdbcType=BIGINT}, #{payDiscount,jdbcType=BIGINT}, |
... | ... | @@ -68,7 +70,8 @@ |
68 | 70 | #{payeeAccountId,jdbcType=BIGINT}, #{payeeFundAccountId,jdbcType=BIGINT}, #{payeeSellerId,jdbcType=BIGINT}, |
69 | 71 | #{payeeSellerName,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{payMode,jdbcType=INTEGER}, |
70 | 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 | + ,#{transportFee,jdbcType=BIGINT}) | |
72 | 75 | </insert> |
73 | 76 | <insert id="saveBatch" useGeneratedKeys="true" keyProperty="id"> |
74 | 77 | insert into order_payment (id, code, order_id,market_id, |
... | ... | @@ -80,6 +83,7 @@ |
80 | 83 | payee_seller_name, pay_time, pay_mode, |
81 | 84 | pay_channel, version, state, trade_id, |
82 | 85 | totle_seller_fee,seller_fee_state,order_status,relation_id |
86 | + ,transport_fee | |
83 | 87 | ) |
84 | 88 | values |
85 | 89 | <foreach collection="list" item="payment" separator=","> |
... | ... | @@ -91,7 +95,8 @@ |
91 | 95 | #{payment.payeeAccountId,jdbcType=BIGINT}, #{payment.payeeFundAccountId,jdbcType=BIGINT}, #{payment.payeeSellerId,jdbcType=BIGINT}, |
92 | 96 | #{payment.payeeSellerName,jdbcType=VARCHAR}, #{payment.payTime,jdbcType=TIMESTAMP}, #{payment.payMode,jdbcType=INTEGER}, |
93 | 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 | + ,#{payment.transportFee,jdbcType=BIGINT}) | |
95 | 100 | </foreach> |
96 | 101 | </insert> |
97 | 102 | <update id="updatepayment" parameterType="com.diligrp.etrade.order.model.OrderPayment"> |
... | ... | @@ -120,7 +125,8 @@ |
120 | 125 | state = #{state,jdbcType=TINYINT}, |
121 | 126 | trade_id = #{tradeId,jdbcType=VARCHAR}, |
122 | 127 | totle_seller_fee = #{totleSellerFee,jdbcType=BIGINT}, |
123 | - seller_fee_state = #{sellerFeeState,jdbcType=TINYINT} | |
128 | + seller_fee_state = #{sellerFeeState,jdbcType=TINYINT}, | |
129 | + transport_fee = #{transportFee,jdbcType=BIGINT} | |
124 | 130 | where id = #{id,jdbcType=BIGINT} |
125 | 131 | </update> |
126 | 132 | <update id="finishPayUpdata" > | ... | ... |
etrade-order/src/main/resources/com/diligrp/etrade/dao/mapper/order/OrderQueryBuyerMapper.xml
... | ... | @@ -49,6 +49,7 @@ |
49 | 49 | <result column="source" jdbcType="TIMESTAMP" property="source" /> |
50 | 50 | <result column="achieve_type" jdbcType="TIMESTAMP" property="achieveType" /> |
51 | 51 | <result column="achieve_state" jdbcType="TIMESTAMP" property="achieveState" /> |
52 | + <result column="transport_fee" jdbcType="BIGINT" property="transportFee" /> | |
52 | 53 | <collection property="productList" ofType="com.diligrp.etrade.order.domain.ProductDto"> |
53 | 54 | <result property="productId" column="id"/> |
54 | 55 | <result property="productImgUrl" column="product_img_url"/> |
... | ... | @@ -107,7 +108,7 @@ |
107 | 108 | convert(ord.totle_pay_amount, decimal(20,2))/100 as totle_pay_amount, |
108 | 109 | convert(ord.totle_paid_amount, decimal(20,2))/100 as totle_paid_amount, |
109 | 110 | convert(ord.totle_discount, decimal(20,2))/100 as totle_discount, |
110 | - convert(ord.totle_weight, decimal(20,2))/500 as totle_weight, | |
111 | + convert(ord.totle_weight, decimal(20,2))/100 as totle_weight, | |
111 | 112 | ord.order_type as order_type, |
112 | 113 | ord.pay_state as pay_state, |
113 | 114 | ord.pay_time as pay_time, |
... | ... | @@ -130,7 +131,9 @@ |
130 | 131 | ord.out_time as out_time, |
131 | 132 | ord.`source` as `source`, |
132 | 133 | ord.achieve_type as achieve_type, |
133 | - ord.achieve_state as achieve_state | |
134 | + ord.achieve_state as achieve_state, | |
135 | + ord.transport_fee as transport_fee | |
136 | + | |
134 | 137 | </sql> |
135 | 138 | <select id="queryOrderStateNumberBuyer" resultType="com.diligrp.etrade.order.domain.OrderStateNumberDto" |
136 | 139 | parameterType="com.diligrp.etrade.order.domain.OrderQueryBuyerDto"> | ... | ... |
etrade-order/src/main/resources/com/diligrp/etrade/dao/mapper/order/OrderQueryMapper.xml
... | ... | @@ -54,6 +54,7 @@ |
54 | 54 | <result column="relation_id" jdbcType="DECIMAL" property="relationId" /> |
55 | 55 | <result column="achieve_type" jdbcType="DECIMAL" property="achieveType" /> |
56 | 56 | <result column="achieve_state" jdbcType="DECIMAL" property="achieveState" /> |
57 | + <result column="transport_fee" jdbcType="BIGINT" property="transportFee" /> | |
57 | 58 | </resultMap> |
58 | 59 | <sql id="Base_Column_List"> |
59 | 60 | id, `code`, mapping_code, market_id, buyer_code, buyer_id,buyer_store_customer_id, buyer_name, buyer_account_id, |
... | ... | @@ -119,7 +120,8 @@ |
119 | 120 | `relation_id`, |
120 | 121 | location, |
121 | 122 | achieve_type, |
122 | - achieve_state | |
123 | + achieve_state, | |
124 | + transport_fee | |
123 | 125 | </sql> |
124 | 126 | <select id="queryOrderStateNumber" resultType="com.diligrp.etrade.order.domain.OrderStateNumberDto" |
125 | 127 | parameterType="com.diligrp.etrade.order.domain.OrderQueryDto"> |
... | ... | @@ -210,6 +212,7 @@ |
210 | 212 | opa.pay_channel as pay_channel, |
211 | 213 | ord.achieve_type as achieve_type, |
212 | 214 | ord.achieve_state as achieve_state, |
215 | + ord.transport_fee as transport_fee, | |
213 | 216 | (CASE WHEN opa.payee_seller_name IS NULL OR opa.payee_seller_name = '' THEN ord.shop_customer_name ELSE opa.payee_seller_name END) AS payee_seller_name |
214 | 217 | from `order` ord |
215 | 218 | left join order_payment opa on opa.order_id = ord.id and opa.`state` = 2 | ... | ... |
etrade-order/src/main/resources/com/diligrp/etrade/dao/mapper/order/OrderQuerySellerMapper.xml
... | ... | @@ -49,6 +49,7 @@ |
49 | 49 | <result column="source" jdbcType="TINYINT" property="source" /> |
50 | 50 | <result column="achieve_type" jdbcType="TINYINT" property="achieveType" /> |
51 | 51 | <result column="achieve_state" jdbcType="TINYINT" property="achieveState" /> |
52 | + <result column="transport_fee" jdbcType="BIGINT" property="transportFee" /> | |
52 | 53 | <collection property="productList" ofType="com.diligrp.etrade.order.domain.ProductDto"> |
53 | 54 | <result property="productId" column="id"/> |
54 | 55 | <result property="productImgUrl" column="product_img_url"/> |
... | ... | @@ -89,7 +90,7 @@ |
89 | 90 | convert(ord.totle_pay_amount, decimal(20,2))/100 as totle_pay_amount, |
90 | 91 | convert(ord.totle_paid_amount, decimal(20,2))/100 as totle_paid_amount, |
91 | 92 | convert(ord.totle_discount, decimal(20,2))/100 as totle_discount, |
92 | - convert(ord.totle_weight, decimal(20,2))/500 as totle_weight, | |
93 | + convert(ord.totle_weight, decimal(20,2))/100 as totle_weight, | |
93 | 94 | ord.order_type, |
94 | 95 | ord.pay_state, |
95 | 96 | ord.pay_time, |
... | ... | @@ -112,7 +113,8 @@ |
112 | 113 | ord.out_time, |
113 | 114 | ord.achieve_type, |
114 | 115 | ord.achieve_state, |
115 | - ord.`source` | |
116 | + ord.`source`, | |
117 | + ord.transport_fee | |
116 | 118 | </sql> |
117 | 119 | <!--<update id="updateOrderById" parameterType="com.diligrp.etrade.order.model.Order"> |
118 | 120 | update `order` | ... | ... |