Merge branch 'test6.9.8' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.8
Showing
5 changed files
with
11 additions
and
26 deletions
dal/src/main/java/com/yohoufo/dal/order/model/DepositOrder.java
100644 → 100755
@@ -4,6 +4,7 @@ import lombok.*; | @@ -4,6 +4,7 @@ import lombok.*; | ||
4 | 4 | ||
5 | import java.math.BigDecimal; | 5 | import java.math.BigDecimal; |
6 | 6 | ||
7 | + | ||
7 | @ToString | 8 | @ToString |
8 | @Builder | 9 | @Builder |
9 | @NoArgsConstructor | 10 | @NoArgsConstructor |
@@ -18,7 +19,7 @@ public class DepositOrder { | @@ -18,7 +19,7 @@ public class DepositOrder { | ||
18 | 19 | ||
19 | private String depositCode; | 20 | private String depositCode; |
20 | 21 | ||
21 | - private BigDecimal amount; // 总费用 | 22 | + private BigDecimal amount; |
22 | 23 | ||
23 | private Integer payment; | 24 | private Integer payment; |
24 | 25 | ||
@@ -32,9 +33,9 @@ public class DepositOrder { | @@ -32,9 +33,9 @@ public class DepositOrder { | ||
32 | 33 | ||
33 | private Integer updateTime; | 34 | private Integer updateTime; |
34 | 35 | ||
35 | - private BigDecimal contractFee; //违约费用 | 36 | + private BigDecimal contractFee; |
36 | 37 | ||
37 | - private BigDecimal shipFee; //运费 | 38 | + private BigDecimal shipFee; |
38 | 39 | ||
39 | - private Integer initStatus; // 修改状态之前应该的状态 | 40 | + private Integer initStatus; |
40 | } | 41 | } |
@@ -2,13 +2,11 @@ package com.yohoufo.order.charge; | @@ -2,13 +2,11 @@ package com.yohoufo.order.charge; | ||
2 | 2 | ||
3 | import com.google.common.collect.Lists; | 3 | import com.google.common.collect.Lists; |
4 | import com.yohobuy.ufo.model.order.constants.RegionEnum; | 4 | import com.yohobuy.ufo.model.order.constants.RegionEnum; |
5 | -import com.yohobuy.ufo.model.order.constants.SkupType; | ||
6 | import com.yohobuy.ufo.model.promotion.UserCouponsBo; | 5 | import com.yohobuy.ufo.model.promotion.UserCouponsBo; |
7 | import com.yohobuy.ufo.model.promotion.constant.CouponProductLimitTypeEnum; | 6 | import com.yohobuy.ufo.model.promotion.constant.CouponProductLimitTypeEnum; |
8 | import com.yohobuy.ufo.model.promotion.constant.CouponUseLimitTypeEnum; | 7 | import com.yohobuy.ufo.model.promotion.constant.CouponUseLimitTypeEnum; |
9 | import com.yohoufo.order.charge.model.ChargeGoods; | 8 | import com.yohoufo.order.charge.model.ChargeGoods; |
10 | import com.yohoufo.order.charge.model.CouponMatchResult; | 9 | import com.yohoufo.order.charge.model.CouponMatchResult; |
11 | -import com.yohoufo.order.utils.BuyerOrderUtils; | ||
12 | import com.yohoufo.order.utils.LoggerUtils; | 10 | import com.yohoufo.order.utils.LoggerUtils; |
13 | import org.apache.commons.collections.CollectionUtils; | 11 | import org.apache.commons.collections.CollectionUtils; |
14 | import org.slf4j.Logger; | 12 | import org.slf4j.Logger; |
@@ -157,23 +155,14 @@ public class CouponRuleMatcher { | @@ -157,23 +155,14 @@ public class CouponRuleMatcher { | ||
157 | @Override | 155 | @Override |
158 | public boolean match(ChargeGoods chargeGoods, UserCouponsBo couponsBo) { | 156 | public boolean match(ChargeGoods chargeGoods, UserCouponsBo couponsBo) { |
159 | 157 | ||
160 | - // 闪购寄存不可以用券 TODO 后台可控制 | ||
161 | - if (chargeGoods.getSkupType() == SkupType.QUICK_DELIVER && chargeGoods.isDepositRequirement()) { | ||
162 | - return false; | ||
163 | - } | ||
164 | - | ||
165 | if (couponsBo.getSkupForbidType() == null){ | 158 | if (couponsBo.getSkupForbidType() == null){ |
166 | return true; | 159 | return true; |
167 | } | 160 | } |
168 | 161 | ||
169 | - | ||
170 | - | ||
171 | if (Arrays.asList(couponsBo.getSkupForbidType().split(",")).contains(String.valueOf(chargeGoods.getAttributes()))){ | 162 | if (Arrays.asList(couponsBo.getSkupForbidType().split(",")).contains(String.valueOf(chargeGoods.getAttributes()))){ |
172 | return false; | 163 | return false; |
173 | } | 164 | } |
174 | 165 | ||
175 | - | ||
176 | - | ||
177 | return true; | 166 | return true; |
178 | } | 167 | } |
179 | } | 168 | } |
@@ -4,8 +4,6 @@ import com.google.common.collect.Lists; | @@ -4,8 +4,6 @@ import com.google.common.collect.Lists; | ||
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.yohobuy.ufo.model.order.bo.GoodsInfo; | 6 | import com.yohobuy.ufo.model.order.bo.GoodsInfo; |
7 | -import com.yohobuy.ufo.model.order.common.EntrySellerDepositType; | ||
8 | -import com.yohobuy.ufo.model.order.common.EntrySellerType; | ||
9 | import com.yohobuy.ufo.model.order.common.OrderCodeType; | 7 | import com.yohobuy.ufo.model.order.common.OrderCodeType; |
10 | import com.yohobuy.ufo.model.order.constants.DepositEventTypeEnum; | 8 | import com.yohobuy.ufo.model.order.constants.DepositEventTypeEnum; |
11 | import com.yohobuy.ufo.model.order.constants.OrderConstant; | 9 | import com.yohobuy.ufo.model.order.constants.OrderConstant; |
@@ -13,28 +11,23 @@ import com.yohobuy.ufo.model.order.req.DepositOrderComputeReq; | @@ -13,28 +11,23 @@ import com.yohobuy.ufo.model.order.req.DepositOrderComputeReq; | ||
13 | import com.yohobuy.ufo.model.order.resp.DepositOrderComputeResp; | 11 | import com.yohobuy.ufo.model.order.resp.DepositOrderComputeResp; |
14 | import com.yohobuy.ufo.model.order.vo.AddressInfo; | 12 | import com.yohobuy.ufo.model.order.vo.AddressInfo; |
15 | import com.yohoufo.common.exception.UfoServiceException; | 13 | import com.yohoufo.common.exception.UfoServiceException; |
16 | -import com.yohoufo.common.utils.DateUtil; | ||
17 | import com.yohoufo.common.utils.StringUtil; | 14 | import com.yohoufo.common.utils.StringUtil; |
18 | import com.yohoufo.dal.order.BuyerOrderGoodsMapper; | 15 | import com.yohoufo.dal.order.BuyerOrderGoodsMapper; |
19 | import com.yohoufo.dal.order.DepositOrderMapper; | 16 | import com.yohoufo.dal.order.DepositOrderMapper; |
20 | import com.yohoufo.dal.order.SellerOrderGoodsMapper; | 17 | import com.yohoufo.dal.order.SellerOrderGoodsMapper; |
21 | -import com.yohoufo.dal.order.SellerOrderMapper; | ||
22 | -import com.yohoufo.dal.order.model.*; | 18 | +import com.yohoufo.dal.order.StorageDepositMapper; |
23 | import com.yohoufo.dal.order.model.BuyerOrderGoods; | 19 | import com.yohoufo.dal.order.model.BuyerOrderGoods; |
24 | import com.yohoufo.dal.order.model.DepositOrder; | 20 | import com.yohoufo.dal.order.model.DepositOrder; |
25 | import com.yohoufo.dal.order.model.SellerOrderGoods; | 21 | import com.yohoufo.dal.order.model.SellerOrderGoods; |
26 | import com.yohoufo.dal.order.model.StorageDeposit; | 22 | import com.yohoufo.dal.order.model.StorageDeposit; |
27 | -import com.yohoufo.dal.order.StorageDepositMapper; | ||
28 | import com.yohoufo.order.convert.GoodsInfoConvertor; | 23 | import com.yohoufo.order.convert.GoodsInfoConvertor; |
29 | import com.yohoufo.order.model.response.OrderSubmitResponse; | 24 | import com.yohoufo.order.model.response.OrderSubmitResponse; |
30 | import com.yohoufo.order.service.DepositService; | 25 | import com.yohoufo.order.service.DepositService; |
31 | import com.yohoufo.order.service.IBuyerOrderMetaService; | 26 | import com.yohoufo.order.service.IBuyerOrderMetaService; |
32 | import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; | 27 | import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; |
33 | import org.apache.commons.collections.CollectionUtils; | 28 | import org.apache.commons.collections.CollectionUtils; |
34 | -import org.apache.commons.lang3.StringUtils; | ||
35 | import org.slf4j.Logger; | 29 | import org.slf4j.Logger; |
36 | import org.slf4j.LoggerFactory; | 30 | import org.slf4j.LoggerFactory; |
37 | -import org.slf4j.helpers.MessageFormatter; | ||
38 | import org.springframework.beans.factory.annotation.Autowired; | 31 | import org.springframework.beans.factory.annotation.Autowired; |
39 | import org.springframework.stereotype.Service; | 32 | import org.springframework.stereotype.Service; |
40 | 33 | ||
@@ -113,7 +106,9 @@ public class DepositOrderService { | @@ -113,7 +106,9 @@ public class DepositOrderService { | ||
113 | DepositOrderComputeResp.PriceInfo priceInfo = getFeeInfo(orderCode); | 106 | DepositOrderComputeResp.PriceInfo priceInfo = getFeeInfo(orderCode); |
114 | 107 | ||
115 | DepositOrder depositOrder = DepositOrder.builder().uid(uid).amount(priceInfo.getAmount()) | 108 | DepositOrder depositOrder = DepositOrder.builder().uid(uid).amount(priceInfo.getAmount()) |
116 | - .contractFee(priceInfo.getContractFee()).shipFee(priceInfo.getShipFee()).createTime(now).depositCode(req.getDepositCode()) | 109 | + .contractFee(priceInfo.getContractFee()) |
110 | + .shipFee(priceInfo.getShipFee()) | ||
111 | + .createTime(now).depositCode(req.getDepositCode()) | ||
117 | .eventType(DepositEventTypeEnum.DEPOSIT_RECALL_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build(); | 112 | .eventType(DepositEventTypeEnum.DEPOSIT_RECALL_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build(); |
118 | 113 | ||
119 | LOG.info("enter publishDepositOrder begin save depositOrder {} ",depositOrder); | 114 | LOG.info("enter publishDepositOrder begin save depositOrder {} ",depositOrder); |
@@ -21,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; | @@ -21,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; | ||
21 | import org.springframework.stereotype.Service; | 21 | import org.springframework.stereotype.Service; |
22 | 22 | ||
23 | @Service | 23 | @Service |
24 | -public class DeposiOrderPaymentService extends AbstractOrderPaymentService { | 24 | +public class DepositOrderPaymentService extends AbstractOrderPaymentService { |
25 | private final Logger logger = LoggerFactory.getLogger(getClass()); | 25 | private final Logger logger = LoggerFactory.getLogger(getClass()); |
26 | 26 | ||
27 | @Autowired | 27 | @Autowired |
@@ -103,7 +103,7 @@ public class PaymentServiceImpl implements IPaymentService { | @@ -103,7 +103,7 @@ public class PaymentServiceImpl implements IPaymentService { | ||
103 | MerchantOrderPaymentService merchantOrderPaymentService; | 103 | MerchantOrderPaymentService merchantOrderPaymentService; |
104 | 104 | ||
105 | @Autowired | 105 | @Autowired |
106 | - private DeposiOrderPaymentService deposiOrderPaymentService; | 106 | + private DepositOrderPaymentService deposiOrderPaymentService; |
107 | 107 | ||
108 | @Autowired | 108 | @Autowired |
109 | OrderCodeGenerator orderCodeGenerator; | 109 | OrderCodeGenerator orderCodeGenerator; |
-
Please register or login to post a comment