Merge branch 'master' into dev
# Conflicts: # order/src/main/java/com/yohoufo/order/controller/SellerOrderController.java # order/src/main/java/com/yohoufo/order/service/SellerOrderService.java
Showing
11 changed files
with
39 additions
and
54 deletions
@@ -30,13 +30,12 @@ public enum SellerOrderListType { | @@ -30,13 +30,12 @@ public enum SellerOrderListType { | ||
30 | Arrays.asList(OrderStatus.DONE.getCode()), | 30 | Arrays.asList(OrderStatus.DONE.getCode()), |
31 | Collections.<Integer>emptyList()), | 31 | Collections.<Integer>emptyList()), |
32 | 32 | ||
33 | - ORDER_FAILED(6, "交易失败", Arrays.asList(OrderStatus.SELLER_CANCEL_BEFORE_PAY.getCode(), | 33 | + ORDER_FAILED(6, "交易失败", Arrays.asList( |
34 | OrderStatus.SELLER_CANCEL_AFTER_PAY.getCode(), | 34 | OrderStatus.SELLER_CANCEL_AFTER_PAY.getCode(), |
35 | OrderStatus.SEND_OUT_TIMEOUT.getCode(), | 35 | OrderStatus.SEND_OUT_TIMEOUT.getCode(), |
36 | OrderStatus.CHECKING_FAKE.getCode(), | 36 | OrderStatus.CHECKING_FAKE.getCode(), |
37 | OrderStatus.BUYER_CANCEL_BEFORE_PAY.getCode(), | 37 | OrderStatus.BUYER_CANCEL_BEFORE_PAY.getCode(), |
38 | - OrderStatus.BUYER_CANCEL_TIMEOUT.getCode(), | ||
39 | - OrderStatus.CUSTOMER_SERVICE.getCode()), | 38 | + OrderStatus.BUYER_CANCEL_TIMEOUT.getCode()), |
40 | Collections.<Integer>emptyList()); | 39 | Collections.<Integer>emptyList()); |
41 | 40 | ||
42 | int type; | 41 | int type; |
@@ -7,6 +7,7 @@ import com.yohobuy.ufo.model.order.req.SellerOrderSubmitReq; | @@ -7,6 +7,7 @@ import com.yohobuy.ufo.model.order.req.SellerOrderSubmitReq; | ||
7 | import com.yohoufo.common.ApiResponse; | 7 | import com.yohoufo.common.ApiResponse; |
8 | import com.yohoufo.common.exception.GatewayException; | 8 | import com.yohoufo.common.exception.GatewayException; |
9 | import com.yohoufo.order.response.OrderListInfo; | 9 | import com.yohoufo.order.response.OrderListInfo; |
10 | +import com.yohoufo.order.response.OrderListInfoRsp; | ||
10 | import com.yohoufo.order.service.SellerOrderService; | 11 | import com.yohoufo.order.service.SellerOrderService; |
11 | import org.slf4j.Logger; | 12 | import org.slf4j.Logger; |
12 | import org.slf4j.LoggerFactory; | 13 | import org.slf4j.LoggerFactory; |
@@ -85,7 +86,7 @@ public class SellerOrderController { | @@ -85,7 +86,7 @@ public class SellerOrderController { | ||
85 | .page(page).limit(limit) | 86 | .page(page).limit(limit) |
86 | .build(); | 87 | .build(); |
87 | logger.info("in ufo.sellerOrder.getOrderList, req {}", req); | 88 | logger.info("in ufo.sellerOrder.getOrderList, req {}", req); |
88 | - OrderListInfo resp = sellerOrderService.getOrderList(req); | 89 | + OrderListInfoRsp resp = sellerOrderService.getOrderList(req); |
89 | return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("查询列表成功").build(); | 90 | return new ApiResponse.ApiResponseBuilder().data(resp).code(200).message("查询列表成功").build(); |
90 | } | 91 | } |
91 | 92 |
@@ -2,10 +2,9 @@ package com.yohoufo.order.controller; | @@ -2,10 +2,9 @@ package com.yohoufo.order.controller; | ||
2 | 2 | ||
3 | 3 | ||
4 | import com.yohoufo.common.ApiResponse; | 4 | import com.yohoufo.common.ApiResponse; |
5 | -import com.yohoufo.order.request.OrderListRequest; | ||
6 | import com.yohoufo.order.request.ShoppingRequest; | 5 | import com.yohoufo.order.request.ShoppingRequest; |
7 | import com.yohoufo.order.response.OrderSubmitResponse; | 6 | import com.yohoufo.order.response.OrderSubmitResponse; |
8 | -import com.yohoufo.order.response.ShoppingPaymentResponse; | 7 | +import com.yohoufo.order.response.PaymentResponse; |
9 | import com.yohoufo.order.service.IShoppingService; | 8 | import com.yohoufo.order.service.IShoppingService; |
10 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
11 | import org.springframework.web.bind.annotation.*; | 10 | import org.springframework.web.bind.annotation.*; |
@@ -27,7 +26,7 @@ public class ShoppingController { | @@ -27,7 +26,7 @@ public class ShoppingController { | ||
27 | public ApiResponse payment(@RequestParam(name = "uid") int uid, | 26 | public ApiResponse payment(@RequestParam(name = "uid") int uid, |
28 | @RequestParam(name = "skup") int skup){ | 27 | @RequestParam(name = "skup") int skup){ |
29 | 28 | ||
30 | - ShoppingPaymentResponse paymentResponse = buyerOrderService.payment(ShoppingRequest.builder().uid(uid).skup(skup).build()); | 29 | + PaymentResponse paymentResponse = buyerOrderService.payment(ShoppingRequest.builder().uid(uid).skup(skup).build()); |
31 | return new ApiResponse.ApiResponseBuilder().code(200).data(paymentResponse).message("结算成功").build(); | 30 | return new ApiResponse.ApiResponseBuilder().code(200).data(paymentResponse).message("结算成功").build(); |
32 | } | 31 | } |
33 | 32 |
@@ -16,12 +16,16 @@ public class GoodsInfo { | @@ -16,12 +16,16 @@ public class GoodsInfo { | ||
16 | /** | 16 | /** |
17 | * 商品图片 | 17 | * 商品图片 |
18 | */ | 18 | */ |
19 | - String imageUrl; | 19 | + String goodImg; |
20 | 20 | ||
21 | String colorName; | 21 | String colorName; |
22 | 22 | ||
23 | + int colorId; | ||
24 | + | ||
23 | String sizeName; | 25 | String sizeName; |
24 | 26 | ||
27 | + int sizeId; | ||
28 | + | ||
25 | /** | 29 | /** |
26 | * 商品价格 | 30 | * 商品价格 |
27 | */ | 31 | */ |
@@ -8,7 +8,7 @@ import java.util.List; | @@ -8,7 +8,7 @@ import java.util.List; | ||
8 | 8 | ||
9 | @Data | 9 | @Data |
10 | @ToString | 10 | @ToString |
11 | -public class ShoppingPaymentResponse { | 11 | +public class PaymentResponse { |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * 支付方式:在线支付 | 14 | * 支付方式:在线支付 |
@@ -23,7 +23,7 @@ public class ShoppingPaymentResponse { | @@ -23,7 +23,7 @@ public class ShoppingPaymentResponse { | ||
23 | /** | 23 | /** |
24 | * 商品情报 | 24 | * 商品情报 |
25 | */ | 25 | */ |
26 | - List<Goods> goodsList; | 26 | + GoodsInfo good; |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * 费用列表 | 29 | * 费用列表 |
@@ -59,25 +59,7 @@ public class ShoppingPaymentResponse { | @@ -59,25 +59,7 @@ public class ShoppingPaymentResponse { | ||
59 | private int deliveryWayCost; | 59 | private int deliveryWayCost; |
60 | } | 60 | } |
61 | 61 | ||
62 | - @Data | ||
63 | - @ToString | ||
64 | - public static class Goods{ | ||
65 | - | ||
66 | - // 封面图 | ||
67 | - private String goodsImg; | ||
68 | - | ||
69 | - private String productName; | ||
70 | 62 | ||
71 | - private int colorId; | ||
72 | - private String color; | ||
73 | - | ||
74 | - private int sizeId; | ||
75 | - private String sizeName; | ||
76 | - | ||
77 | - private int buyNumber; | ||
78 | - private BigDecimal salePrice; | ||
79 | - | ||
80 | - } | ||
81 | 63 | ||
82 | @Data | 64 | @Data |
83 | @ToString | 65 | @ToString |
@@ -3,7 +3,7 @@ package com.yohoufo.order.service; | @@ -3,7 +3,7 @@ package com.yohoufo.order.service; | ||
3 | 3 | ||
4 | import com.yohoufo.order.request.ShoppingRequest; | 4 | import com.yohoufo.order.request.ShoppingRequest; |
5 | import com.yohoufo.order.response.OrderSubmitResponse; | 5 | import com.yohoufo.order.response.OrderSubmitResponse; |
6 | -import com.yohoufo.order.response.ShoppingPaymentResponse; | 6 | +import com.yohoufo.order.response.PaymentResponse; |
7 | 7 | ||
8 | public interface IShoppingService { | 8 | public interface IShoppingService { |
9 | 9 | ||
@@ -12,7 +12,7 @@ public interface IShoppingService { | @@ -12,7 +12,7 @@ public interface IShoppingService { | ||
12 | * @param request | 12 | * @param request |
13 | * @return | 13 | * @return |
14 | */ | 14 | */ |
15 | - public ShoppingPaymentResponse payment(ShoppingRequest request); | 15 | + public PaymentResponse payment(ShoppingRequest request); |
16 | 16 | ||
17 | 17 | ||
18 | /** | 18 | /** |
@@ -18,6 +18,7 @@ import com.yohoufo.order.model.SellerOrderContext; | @@ -18,6 +18,7 @@ import com.yohoufo.order.model.SellerOrderContext; | ||
18 | import com.yohoufo.order.model.dto.PlatformFeeDto; | 18 | import com.yohoufo.order.model.dto.PlatformFeeDto; |
19 | import com.yohoufo.order.model.dto.SellerOrderComputeResult; | 19 | import com.yohoufo.order.model.dto.SellerOrderComputeResult; |
20 | import com.yohoufo.order.response.OrderListInfo; | 20 | import com.yohoufo.order.response.OrderListInfo; |
21 | +import com.yohoufo.order.response.OrderListInfoRsp; | ||
21 | import com.yohoufo.order.service.handler.SellerOrderComputeHandler; | 22 | import com.yohoufo.order.service.handler.SellerOrderComputeHandler; |
22 | import com.yohoufo.order.service.handler.SellerOrderSubmitHandler; | 23 | import com.yohoufo.order.service.handler.SellerOrderSubmitHandler; |
23 | import com.yohoufo.order.service.proxy.UserProxyService; | 24 | import com.yohoufo.order.service.proxy.UserProxyService; |
@@ -150,7 +151,7 @@ public class SellerOrderService { | @@ -150,7 +151,7 @@ public class SellerOrderService { | ||
150 | } | 151 | } |
151 | 152 | ||
152 | 153 | ||
153 | - public OrderListInfo getOrderList(SellerOrderListReq req){ | 154 | + public OrderListInfoRsp getOrderList(SellerOrderListReq req){ |
154 | 155 | ||
155 | return null; | 156 | return null; |
156 | } | 157 | } |
@@ -147,7 +147,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -147,7 +147,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
147 | goodsInfo.setProductName(sellerOrderGoods.getProductName()); | 147 | goodsInfo.setProductName(sellerOrderGoods.getProductName()); |
148 | goodsInfo.setColorName(sellerOrderGoods.getColorName()); | 148 | goodsInfo.setColorName(sellerOrderGoods.getColorName()); |
149 | goodsInfo.setSizeName(sellerOrderGoods.getSizeName()); | 149 | goodsInfo.setSizeName(sellerOrderGoods.getSizeName()); |
150 | - goodsInfo.setImageUrl(sellerOrderGoods.getImageUrl()); | 150 | + goodsInfo.setGoodImg(sellerOrderGoods.getImageUrl()); |
151 | goodsInfo.setGoodPrice(sellerOrderGoods.getGoodsPrice().toPlainString()); | 151 | goodsInfo.setGoodPrice(sellerOrderGoods.getGoodsPrice().toPlainString()); |
152 | return goodsInfo; | 152 | return goodsInfo; |
153 | } | 153 | } |
@@ -287,7 +287,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -287,7 +287,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
287 | GoodsInfo goodsInfo = new GoodsInfo(); | 287 | GoodsInfo goodsInfo = new GoodsInfo(); |
288 | goodsInfo.setColorName(sellerOrderGoods.getColorName()); | 288 | goodsInfo.setColorName(sellerOrderGoods.getColorName()); |
289 | goodsInfo.setProductName(sellerOrderGoods.getProductName()); | 289 | goodsInfo.setProductName(sellerOrderGoods.getProductName()); |
290 | - goodsInfo.setImageUrl(sellerOrderGoods.getImageUrl()); | 290 | + goodsInfo.setGoodImg(sellerOrderGoods.getImageUrl()); |
291 | goodsInfo.setSizeName(sellerOrderGoods.getSizeName()); | 291 | goodsInfo.setSizeName(sellerOrderGoods.getSizeName()); |
292 | goodsInfo.setGoodPrice(buyerOrderGoods.getGoodsPrice() == null ? "" :buyerOrderGoods.getGoodsPrice().toPlainString()); | 292 | goodsInfo.setGoodPrice(buyerOrderGoods.getGoodsPrice() == null ? "" :buyerOrderGoods.getGoodsPrice().toPlainString()); |
293 | 293 |
@@ -4,8 +4,8 @@ import com.yoho.core.dal.datasource.annotation.Database; | @@ -4,8 +4,8 @@ import com.yoho.core.dal.datasource.annotation.Database; | ||
4 | import com.yohoufo.common.utils.DateUtil; | 4 | import com.yohoufo.common.utils.DateUtil; |
5 | import com.yohoufo.dal.order.SellerOrderMapper; | 5 | import com.yohoufo.dal.order.SellerOrderMapper; |
6 | import com.yohoufo.dal.order.model.SellerOrder; | 6 | import com.yohoufo.dal.order.model.SellerOrder; |
7 | -import com.yohoufo.order.constants.SellerOrderCancelStatus; | ||
8 | import com.yohoufo.order.common.SellerOrderStatus; | 7 | import com.yohoufo.order.common.SellerOrderStatus; |
8 | +import com.yohoufo.order.constants.SellerOrderCancelStatus; | ||
9 | import com.yohoufo.order.model.SellerOrderContext; | 9 | import com.yohoufo.order.model.SellerOrderContext; |
10 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
11 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
@@ -3,7 +3,6 @@ package com.yohoufo.order.service.impl; | @@ -3,7 +3,6 @@ package com.yohoufo.order.service.impl; | ||
3 | import com.yoho.core.rest.client.ServiceCaller; | 3 | import com.yoho.core.rest.client.ServiceCaller; |
4 | import com.yoho.error.ServiceError; | 4 | import com.yoho.error.ServiceError; |
5 | import com.yoho.error.exception.ServiceException; | 5 | import com.yoho.error.exception.ServiceException; |
6 | -import com.yoho.service.model.request.UserAddressReqBO; | ||
7 | import com.yoho.service.model.response.UserAddressRspBO; | 6 | import com.yoho.service.model.response.UserAddressRspBO; |
8 | import com.yohoufo.common.utils.AddressUtil; | 7 | import com.yohoufo.common.utils.AddressUtil; |
9 | import com.yohoufo.dal.order.SellerOrderGoodsMapper; | 8 | import com.yohoufo.dal.order.SellerOrderGoodsMapper; |
@@ -14,7 +13,7 @@ import com.yohoufo.order.constants.OrderConstant; | @@ -14,7 +13,7 @@ import com.yohoufo.order.constants.OrderConstant; | ||
14 | import com.yohoufo.order.model.dto.OrderBuilder; | 13 | import com.yohoufo.order.model.dto.OrderBuilder; |
15 | import com.yohoufo.order.request.ShoppingRequest; | 14 | import com.yohoufo.order.request.ShoppingRequest; |
16 | import com.yohoufo.order.response.OrderSubmitResponse; | 15 | import com.yohoufo.order.response.OrderSubmitResponse; |
17 | -import com.yohoufo.order.response.ShoppingPaymentResponse; | 16 | +import com.yohoufo.order.response.PaymentResponse; |
18 | import com.yohoufo.order.service.IOrdeCreationService; | 17 | import com.yohoufo.order.service.IOrdeCreationService; |
19 | import com.yohoufo.order.service.IShoppingService; | 18 | import com.yohoufo.order.service.IShoppingService; |
20 | import com.yohoufo.order.service.proxy.UserProxyService; | 19 | import com.yohoufo.order.service.proxy.UserProxyService; |
@@ -26,7 +25,6 @@ import org.slf4j.LoggerFactory; | @@ -26,7 +25,6 @@ import org.slf4j.LoggerFactory; | ||
26 | import org.springframework.beans.factory.annotation.Autowired; | 25 | import org.springframework.beans.factory.annotation.Autowired; |
27 | import java.math.BigDecimal; | 26 | import java.math.BigDecimal; |
28 | import java.util.Arrays; | 27 | import java.util.Arrays; |
29 | -import java.util.concurrent.TimeUnit; | ||
30 | 28 | ||
31 | import org.springframework.stereotype.Service; | 29 | import org.springframework.stereotype.Service; |
32 | 30 | ||
@@ -59,7 +57,7 @@ public class ShoppingServiceImpl implements IShoppingService { | @@ -59,7 +57,7 @@ public class ShoppingServiceImpl implements IShoppingService { | ||
59 | * @param request | 57 | * @param request |
60 | * @return | 58 | * @return |
61 | */ | 59 | */ |
62 | - public ShoppingPaymentResponse payment(ShoppingRequest request){ | 60 | + public PaymentResponse payment(ShoppingRequest request){ |
63 | 61 | ||
64 | // 入口参数检查 | 62 | // 入口参数检查 |
65 | if (request.getSkup() < 0 || request.getUid() <0){ | 63 | if (request.getSkup() < 0 || request.getUid() <0){ |
@@ -70,10 +68,10 @@ public class ShoppingServiceImpl implements IShoppingService { | @@ -70,10 +68,10 @@ public class ShoppingServiceImpl implements IShoppingService { | ||
70 | // 检查 商品sku是否可售 | 68 | // 检查 商品sku是否可售 |
71 | SellerOrderGoods skupGood = checkSkupSellOrNot(request.getSkup()); | 69 | SellerOrderGoods skupGood = checkSkupSellOrNot(request.getSkup()); |
72 | 70 | ||
73 | - ShoppingPaymentResponse response = new ShoppingPaymentResponse(); | 71 | + PaymentResponse response = new PaymentResponse(); |
74 | response.setPaymentWay(shoppingSupport.getPaymentWay()); | 72 | response.setPaymentWay(shoppingSupport.getPaymentWay()); |
75 | response.setDeliveryWay(shoppingSupport.getDeliverWay()); | 73 | response.setDeliveryWay(shoppingSupport.getDeliverWay()); |
76 | - response.setGoodsList(Arrays.asList(shoppingSupport.getGoodsInfo(skupGood))); | 74 | + response.setGood(shoppingSupport.getGoodsInfo(skupGood)); |
77 | response.setPromotionFormulaList(shoppingSupport.getPromotionFormula(skupGood)); | 75 | response.setPromotionFormulaList(shoppingSupport.getPromotionFormula(skupGood)); |
78 | 76 | ||
79 | // TODO 赔偿金计算 | 77 | // TODO 赔偿金计算 |
@@ -2,7 +2,8 @@ package com.yohoufo.order.service.support; | @@ -2,7 +2,8 @@ package com.yohoufo.order.service.support; | ||
2 | 2 | ||
3 | import com.yohoufo.dal.order.model.SellerOrderGoods; | 3 | import com.yohoufo.dal.order.model.SellerOrderGoods; |
4 | import com.yohoufo.order.constants.OrderConstant; | 4 | import com.yohoufo.order.constants.OrderConstant; |
5 | -import com.yohoufo.order.response.ShoppingPaymentResponse; | 5 | +import com.yohoufo.order.response.GoodsInfo; |
6 | +import com.yohoufo.order.response.PaymentResponse; | ||
6 | import org.springframework.stereotype.Service; | 7 | import org.springframework.stereotype.Service; |
7 | 8 | ||
8 | import java.math.BigDecimal; | 9 | import java.math.BigDecimal; |
@@ -17,9 +18,9 @@ public class ShoppingSupport { | @@ -17,9 +18,9 @@ public class ShoppingSupport { | ||
17 | * 支付方式 | 18 | * 支付方式 |
18 | * @return | 19 | * @return |
19 | */ | 20 | */ |
20 | - public ShoppingPaymentResponse.PaymentWay getPaymentWay() { | 21 | + public PaymentResponse.PaymentWay getPaymentWay() { |
21 | // 支付方式: 在线支付 | 22 | // 支付方式: 在线支付 |
22 | - ShoppingPaymentResponse.PaymentWay paymentWay = new ShoppingPaymentResponse.PaymentWay(); | 23 | + PaymentResponse.PaymentWay paymentWay = new PaymentResponse.PaymentWay(); |
23 | paymentWay.setPaymentType(OrderConstant.PAYMENT_ONLINE); | 24 | paymentWay.setPaymentType(OrderConstant.PAYMENT_ONLINE); |
24 | paymentWay.setPaymentTypeName(OrderConstant.PAYMENT_ONLINE_NAME); | 25 | paymentWay.setPaymentTypeName(OrderConstant.PAYMENT_ONLINE_NAME); |
25 | return paymentWay; | 26 | return paymentWay; |
@@ -30,9 +31,9 @@ public class ShoppingSupport { | @@ -30,9 +31,9 @@ public class ShoppingSupport { | ||
30 | * 配送方式 | 31 | * 配送方式 |
31 | * @return | 32 | * @return |
32 | */ | 33 | */ |
33 | - public ShoppingPaymentResponse.DeliveryWay getDeliverWay() { | 34 | + public PaymentResponse.DeliveryWay getDeliverWay() { |
34 | // 快递方式 | 35 | // 快递方式 |
35 | - ShoppingPaymentResponse.DeliveryWay deliveryWay = new ShoppingPaymentResponse.DeliveryWay(); | 36 | + PaymentResponse.DeliveryWay deliveryWay = new PaymentResponse.DeliveryWay(); |
36 | deliveryWay.setDeliveryWayId(OrderConstant.DELIVERY_WAY_SF); | 37 | deliveryWay.setDeliveryWayId(OrderConstant.DELIVERY_WAY_SF); |
37 | deliveryWay.setDeliveryWayCost(OrderConstant.DELIVERY_WAY_SF_COST); | 38 | deliveryWay.setDeliveryWayCost(OrderConstant.DELIVERY_WAY_SF_COST); |
38 | deliveryWay.setDeliveryWayName(OrderConstant.DELIVERY_WAY_SF_NAME); | 39 | deliveryWay.setDeliveryWayName(OrderConstant.DELIVERY_WAY_SF_NAME); |
@@ -45,15 +46,15 @@ public class ShoppingSupport { | @@ -45,15 +46,15 @@ public class ShoppingSupport { | ||
45 | * @param skup | 46 | * @param skup |
46 | * @return | 47 | * @return |
47 | */ | 48 | */ |
48 | - public ShoppingPaymentResponse.Goods getGoodsInfo(SellerOrderGoods skup) { | ||
49 | - ShoppingPaymentResponse.Goods goods = new ShoppingPaymentResponse.Goods(); | 49 | + public GoodsInfo getGoodsInfo(SellerOrderGoods skup) { |
50 | + GoodsInfo goods = new GoodsInfo(); | ||
50 | goods.setProductName(skup.getProductName()); | 51 | goods.setProductName(skup.getProductName()); |
51 | goods.setColorId(skup.getColorId() == null ? 0 : skup.getColorId()); | 52 | goods.setColorId(skup.getColorId() == null ? 0 : skup.getColorId()); |
52 | - goods.setColor(skup.getColorName()); | 53 | + goods.setColorName(skup.getColorName()); |
53 | goods.setSizeId(skup.getSizeId() == null ? 0:skup.getSizeId()); | 54 | goods.setSizeId(skup.getSizeId() == null ? 0:skup.getSizeId()); |
54 | goods.setSizeName(skup.getSizeName()); | 55 | goods.setSizeName(skup.getSizeName()); |
55 | - goods.setSalePrice(skup.getGoodsPrice()); | ||
56 | - goods.setGoodsImg(skup.getImageUrl()); | 56 | + goods.setGoodPrice(skup.getGoodsPrice() == null ? "0" : skup.getGoodsPrice().toPlainString()); |
57 | + goods.setGoodImg(skup.getImageUrl()); | ||
57 | return goods; | 58 | return goods; |
58 | } | 59 | } |
59 | 60 | ||
@@ -62,16 +63,16 @@ public class ShoppingSupport { | @@ -62,16 +63,16 @@ public class ShoppingSupport { | ||
62 | * @param skup | 63 | * @param skup |
63 | * @return | 64 | * @return |
64 | */ | 65 | */ |
65 | - public List<ShoppingPaymentResponse.PromotionFormula> getPromotionFormula(SellerOrderGoods skup) { | ||
66 | - ShoppingPaymentResponse.PromotionFormula formula1 = new ShoppingPaymentResponse.PromotionFormula(); | 66 | + public List<PaymentResponse.PromotionFormula> getPromotionFormula(SellerOrderGoods skup) { |
67 | + PaymentResponse.PromotionFormula formula1 = new PaymentResponse.PromotionFormula(); | ||
67 | formula1.setPromotion(OrderConstant.GOODS_PRICE); | 68 | formula1.setPromotion(OrderConstant.GOODS_PRICE); |
68 | formula1.setPromotionAmount(OrderConstant.MONEY_SIGN + skup.getGoodsPrice()); | 69 | formula1.setPromotionAmount(OrderConstant.MONEY_SIGN + skup.getGoodsPrice()); |
69 | 70 | ||
70 | - ShoppingPaymentResponse.PromotionFormula formula2 = new ShoppingPaymentResponse.PromotionFormula(); | 71 | + PaymentResponse.PromotionFormula formula2 = new PaymentResponse.PromotionFormula(); |
71 | formula2.setPromotion(OrderConstant.DELIVERY_DESC); | 72 | formula2.setPromotion(OrderConstant.DELIVERY_DESC); |
72 | formula2.setPromotionAmount(OrderConstant.PLUS_SIGN + OrderConstant.MONEY_SIGN + OrderConstant.DELIVERY_WAY_SF_COST); | 73 | formula2.setPromotionAmount(OrderConstant.PLUS_SIGN + OrderConstant.MONEY_SIGN + OrderConstant.DELIVERY_WAY_SF_COST); |
73 | 74 | ||
74 | - ShoppingPaymentResponse.PromotionFormula formula3 = new ShoppingPaymentResponse.PromotionFormula(); | 75 | + PaymentResponse.PromotionFormula formula3 = new PaymentResponse.PromotionFormula(); |
75 | formula3.setPromotion(OrderConstant.GOODS_REAL_PRICE); | 76 | formula3.setPromotion(OrderConstant.GOODS_REAL_PRICE); |
76 | formula3.setPromotionAmount(OrderConstant.MONEY_SIGN + skup.getGoodsPrice().add(new BigDecimal(OrderConstant.DELIVERY_WAY_SF_COST))); | 77 | formula3.setPromotionAmount(OrderConstant.MONEY_SIGN + skup.getGoodsPrice().add(new BigDecimal(OrderConstant.DELIVERY_WAY_SF_COST))); |
77 | 78 |
-
Please register or login to post a comment