Merge branch 'test6.9.8' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.8
Showing
12 changed files
with
100 additions
and
24 deletions
@@ -205,7 +205,7 @@ | @@ -205,7 +205,7 @@ | ||
205 | storage_id in | 205 | storage_id in |
206 | <foreach item="storageId" index="index" collection="skuList" open="(" separator="," close=")"> | 206 | <foreach item="storageId" index="index" collection="skuList" open="(" separator="," close=")"> |
207 | #{storageId, jdbcType=INTEGER} | 207 | #{storageId, jdbcType=INTEGER} |
208 | - </foreach> and status = 1 and is_hide = 0 and pre_sale_flag=3 and region=1 | 208 | + </foreach> and status = 1 and is_hide = 0 and pre_sale_flag=3 and region=0 |
209 | group by storage_id | 209 | group by storage_id |
210 | </select> | 210 | </select> |
211 | 211 |
@@ -37,6 +37,7 @@ import com.yohoufo.order.service.proxy.DeliveryMinutesService; | @@ -37,6 +37,7 @@ import com.yohoufo.order.service.proxy.DeliveryMinutesService; | ||
37 | import com.yohoufo.order.service.proxy.InBoxFacade; | 37 | import com.yohoufo.order.service.proxy.InBoxFacade; |
38 | import com.yohoufo.order.service.proxy.OrderStatusFlowService; | 38 | import com.yohoufo.order.service.proxy.OrderStatusFlowService; |
39 | import com.yohoufo.order.utils.BuyerOrderUtils; | 39 | import com.yohoufo.order.utils.BuyerOrderUtils; |
40 | +import com.yohoufo.order.utils.SellerGoodsHelper; | ||
40 | import com.yohoufo.order.utils.TimeUtils; | 41 | import com.yohoufo.order.utils.TimeUtils; |
41 | import org.apache.commons.lang3.StringUtils; | 42 | import org.apache.commons.lang3.StringUtils; |
42 | import org.slf4j.Logger; | 43 | import org.slf4j.Logger; |
@@ -96,6 +97,17 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { | @@ -96,6 +97,17 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { | ||
96 | 97 | ||
97 | @Autowired | 98 | @Autowired |
98 | private AppraiseService appraiseService; | 99 | private AppraiseService appraiseService; |
100 | + | ||
101 | + private boolean isDepositWithQuickDeliverGoods(int uid, long orderCode, Integer oa){ | ||
102 | + BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode); | ||
103 | + SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(pbog.getSkup()); | ||
104 | + Integer goodsAttr=null ; | ||
105 | + boolean result = BuyerOrderUtils.isDeposit(oa) | ||
106 | + && SellerGoodsHelper.isQuickDeliver(SkupType.getSkupType(goodsAttr=psog.getAttributes())); | ||
107 | + logger.info("after paid isDepositWithQuickDeliverGoods, uid {} ordercode {} orderAttr {} goodsAttr {}", | ||
108 | + uid, orderCode, oa, goodsAttr); | ||
109 | + return result; | ||
110 | + } | ||
99 | /** | 111 | /** |
100 | * 更新订单状态 | 112 | * 更新订单状态 |
101 | * @param orderInfo | 113 | * @param orderInfo |
@@ -108,12 +120,16 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { | @@ -108,12 +120,16 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { | ||
108 | buyerOrder.setUid(uid); | 120 | buyerOrder.setUid(uid); |
109 | OrderStatus targetOrderStatus = OrderStatus.HAS_PAYED; | 121 | OrderStatus targetOrderStatus = OrderStatus.HAS_PAYED; |
110 | boolean isQuickDeliver = false; | 122 | boolean isQuickDeliver = false; |
123 | + boolean isDepositWithQuickDeliverGoods = false; | ||
111 | //门店订单支付后直接完成 | 124 | //门店订单支付后直接完成 |
112 | if(BuyerOrderUtils.isOffline(orderInfo) ) { | 125 | if(BuyerOrderUtils.isOffline(orderInfo) ) { |
113 | targetOrderStatus = OrderStatus.DONE; | 126 | targetOrderStatus = OrderStatus.DONE; |
114 | - }else if(isQuickDeliver=BuyerOrderUtils.isQuickDeliver(orderInfo.getAttributes())){ | 127 | + }else if((isQuickDeliver=BuyerOrderUtils.isQuickDeliver(orderInfo.getAttributes())) |
128 | + || (isDepositWithQuickDeliverGoods = isDepositWithQuickDeliverGoods(uid, orderCode, orderInfo.getAttributes()))){ | ||
115 | targetOrderStatus = OrderStatus.WAITING_RECEIVE; | 129 | targetOrderStatus = OrderStatus.WAITING_RECEIVE; |
116 | } | 130 | } |
131 | + logger.info("after paid updateOrderStatusPaid uid {} orderCode {} isQuickDeliver {} isDepositWithQuickDeliverGoods {} ", | ||
132 | + uid, orderCode, isQuickDeliver, isDepositWithQuickDeliverGoods); | ||
117 | int orderStatusCode = targetOrderStatus.getCode(); | 133 | int orderStatusCode = targetOrderStatus.getCode(); |
118 | buyerOrder.setStatus(orderStatusCode); | 134 | buyerOrder.setStatus(orderStatusCode); |
119 | 135 | ||
@@ -136,24 +152,36 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { | @@ -136,24 +152,36 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { | ||
136 | return result; | 152 | return result; |
137 | } | 153 | } |
138 | 154 | ||
139 | - private void processDepositOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){ | ||
140 | - //寄存订单 & 闪购商品 | ||
141 | - if (SkupType.QUICK_DELIVER.getCode() == sellerOrderGoods.getAttributes()){ | ||
142 | - Integer sellerUid = null; | ||
143 | - Integer buyerUid = null; | ||
144 | - Long orderCode = null; | ||
145 | - Integer skup = null; | ||
146 | - try { | ||
147 | - depositService.changeOwner(sellerUid = buyerOrder.getSellerUid(), skup = sellerOrderGoods.getId(), | ||
148 | - orderCode = buyerOrder.getOrderCode(), buyerUid = buyerOrder.getUid(), true); | ||
149 | - }catch (Exception ex){ | ||
150 | - logger.warn("pay successful, processDepositOrder invoke depositService.changeOwner fail, sellerUid {}, buyerUid {},orderCode {},skup {}", | ||
151 | - sellerUid, buyerUid, orderCode, skup); | ||
152 | - } | ||
153 | - | 155 | + private void processDepositOrderOfQuickDeliverGoods(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){ |
156 | + Integer sellerUid = null; | ||
157 | + Integer buyerUid = null; | ||
158 | + Long orderCode = null; | ||
159 | + Integer skup = null; | ||
160 | + try { | ||
161 | + depositService.changeOwner(sellerUid = buyerOrder.getSellerUid(), skup = sellerOrderGoods.getId(), | ||
162 | + orderCode = buyerOrder.getOrderCode(), buyerUid = buyerOrder.getUid(), true); | ||
163 | + }catch (Exception ex){ | ||
164 | + logger.warn("pay successful, processDepositOrder invoke depositService.changeOwner fail, sellerUid {}, buyerUid {},orderCode {},skup {}", | ||
165 | + sellerUid, buyerUid, orderCode, skup); | ||
154 | } | 166 | } |
167 | + } | ||
168 | + | ||
169 | + private void processDepositOrderOfInstockGoods(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){ | ||
155 | processInStockOrder(buyerOrder, sellerOrderGoods); | 170 | processInStockOrder(buyerOrder, sellerOrderGoods); |
171 | + } | ||
172 | + | ||
156 | 173 | ||
174 | + private void processDepositOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){ | ||
175 | + SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes()); | ||
176 | + //寄存订单 & 闪购商品 | ||
177 | + switch (skupType){ | ||
178 | + case QUICK_DELIVER: | ||
179 | + processDepositOrderOfQuickDeliverGoods(buyerOrder, sellerOrderGoods); | ||
180 | + break; | ||
181 | + case IN_STOCK: | ||
182 | + processDepositOrderOfInstockGoods(buyerOrder, sellerOrderGoods); | ||
183 | + break; | ||
184 | + } | ||
157 | } | 185 | } |
158 | 186 | ||
159 | private void processInStockOrder(BuyerOrder orderInfo, SellerOrderGoods sellerOrderGoods){ | 187 | private void processInStockOrder(BuyerOrder orderInfo, SellerOrderGoods sellerOrderGoods){ |
@@ -226,7 +226,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen | @@ -226,7 +226,7 @@ public abstract class AbsOrderDetailService extends AbsOrderViewService implemen | ||
226 | GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods); | 226 | GoodsInfo goodsInfo = getGoodsInfo(sellerOrderGoods); |
227 | SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes()); | 227 | SkupType skupType = SkupType.getSkupType(sellerOrderGoods.getAttributes()); |
228 | goodsInfo.setProductName(goodsInfo.getProductName()); | 228 | goodsInfo.setProductName(goodsInfo.getProductName()); |
229 | - goodsInfo.setTypeTag(SellerGoodsHelper.buildGoodsTypeTag(BuyerOrderUtils.convertSkupTypeIfNeed(buyerOrder.getAttributes(), skupType))); | 229 | + goodsInfo.setTypeTag(buildOrderTypeTag(buyerOrder.getAttributes(), skupType)); |
230 | if(isOffline) { | 230 | if(isOffline) { |
231 | goodsInfo.setTypeTag("门店订单"); | 231 | goodsInfo.setTypeTag("门店订单"); |
232 | } | 232 | } |
@@ -7,6 +7,7 @@ import com.yohobuy.ufo.model.order.common.OrderAttributes; | @@ -7,6 +7,7 @@ import com.yohobuy.ufo.model.order.common.OrderAttributes; | ||
7 | import com.yohobuy.ufo.model.order.common.OrderStatus; | 7 | import com.yohobuy.ufo.model.order.common.OrderStatus; |
8 | import com.yohobuy.ufo.model.order.common.TabType; | 8 | import com.yohobuy.ufo.model.order.common.TabType; |
9 | import com.yohobuy.ufo.model.order.constants.RegionEnum; | 9 | import com.yohobuy.ufo.model.order.constants.RegionEnum; |
10 | +import com.yohobuy.ufo.model.order.constants.SkupType; | ||
10 | import com.yohoufo.dal.order.model.BuyerOrder; | 11 | import com.yohoufo.dal.order.model.BuyerOrder; |
11 | import com.yohobuy.ufo.model.order.common.Payment; | 12 | import com.yohobuy.ufo.model.order.common.Payment; |
12 | import com.yohoufo.dal.order.model.BuyerOrderGoods; | 13 | import com.yohoufo.dal.order.model.BuyerOrderGoods; |
@@ -175,4 +176,6 @@ public abstract class AbsOrderViewService { | @@ -175,4 +176,6 @@ public abstract class AbsOrderViewService { | ||
175 | } | 176 | } |
176 | } | 177 | } |
177 | 178 | ||
179 | + protected abstract String buildOrderTypeTag(Integer orderAttr, SkupType skupType); | ||
180 | + | ||
178 | } | 181 | } |
@@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.common.OrderAttributes; | @@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.common.OrderAttributes; | ||
6 | import com.yohobuy.ufo.model.order.common.OrderStatus; | 6 | import com.yohobuy.ufo.model.order.common.OrderStatus; |
7 | import com.yohobuy.ufo.model.order.common.TabType; | 7 | import com.yohobuy.ufo.model.order.common.TabType; |
8 | import com.yohobuy.ufo.model.order.constants.OrderConstant; | 8 | import com.yohobuy.ufo.model.order.constants.OrderConstant; |
9 | +import com.yohobuy.ufo.model.order.constants.SkupType; | ||
9 | import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail; | 10 | import com.yohobuy.ufo.model.order.resp.ExpressInfoDetail; |
10 | import com.yohobuy.ufo.model.order.vo.AddressInfo; | 11 | import com.yohobuy.ufo.model.order.vo.AddressInfo; |
11 | import com.yohoufo.common.helper.ImageUrlAssist; | 12 | import com.yohoufo.common.helper.ImageUrlAssist; |
@@ -23,7 +24,9 @@ import com.yohoufo.order.model.response.OrderDetailInfo; | @@ -23,7 +24,9 @@ import com.yohoufo.order.model.response.OrderDetailInfo; | ||
23 | import com.yohoufo.order.service.IOrderDetailService; | 24 | import com.yohoufo.order.service.IOrderDetailService; |
24 | import com.yohoufo.order.service.cache.OrderCacheService; | 25 | import com.yohoufo.order.service.cache.OrderCacheService; |
25 | import com.yohoufo.order.service.handler.BuyerOrderButtonsHandler; | 26 | import com.yohoufo.order.service.handler.BuyerOrderButtonsHandler; |
27 | +import com.yohoufo.order.utils.BuyerOrderUtils; | ||
26 | import com.yohoufo.order.utils.LoggerUtils; | 28 | import com.yohoufo.order.utils.LoggerUtils; |
29 | +import com.yohoufo.order.utils.SellerGoodsHelper; | ||
27 | import org.apache.commons.lang3.StringUtils; | 30 | import org.apache.commons.lang3.StringUtils; |
28 | import org.slf4j.Logger; | 31 | import org.slf4j.Logger; |
29 | import org.slf4j.helpers.MessageFormatter; | 32 | import org.slf4j.helpers.MessageFormatter; |
@@ -231,6 +234,11 @@ public class BuyerOrderDetailService extends AbsOrderDetailService implements IO | @@ -231,6 +234,11 @@ public class BuyerOrderDetailService extends AbsOrderDetailService implements IO | ||
231 | return logger; | 234 | return logger; |
232 | } | 235 | } |
233 | 236 | ||
237 | + @Override | ||
238 | + protected String buildOrderTypeTag(Integer orderAttr, SkupType skupType) { | ||
239 | + return SellerGoodsHelper.buildGoodsTypeTag(BuyerOrderUtils.convertSkupTypeIfNeed(orderAttr, skupType)); | ||
240 | + } | ||
241 | + | ||
234 | /** | 242 | /** |
235 | * 门店订单收货人设置 | 243 | * 门店订单收货人设置 |
236 | * @param userAddress | 244 | * @param userAddress |
@@ -8,6 +8,7 @@ import com.yohobuy.ufo.model.order.common.OrderAttributes; | @@ -8,6 +8,7 @@ import com.yohobuy.ufo.model.order.common.OrderAttributes; | ||
8 | import com.yohobuy.ufo.model.order.common.OrderListType; | 8 | import com.yohobuy.ufo.model.order.common.OrderListType; |
9 | import com.yohobuy.ufo.model.order.common.TabType; | 9 | import com.yohobuy.ufo.model.order.common.TabType; |
10 | import com.yohobuy.ufo.model.order.constants.OrderConstant; | 10 | import com.yohobuy.ufo.model.order.constants.OrderConstant; |
11 | +import com.yohobuy.ufo.model.order.constants.SkupType; | ||
11 | import com.yohobuy.ufo.model.order.resp.OrderListInfo; | 12 | import com.yohobuy.ufo.model.order.resp.OrderListInfo; |
12 | import com.yohobuy.ufo.model.order.resp.PageResp; | 13 | import com.yohobuy.ufo.model.order.resp.PageResp; |
13 | import com.yohobuy.ufo.model.order.vo.AddressInfo; | 14 | import com.yohobuy.ufo.model.order.vo.AddressInfo; |
@@ -23,7 +24,9 @@ import com.yohoufo.order.model.request.OrderListRequest; | @@ -23,7 +24,9 @@ import com.yohoufo.order.model.request.OrderListRequest; | ||
23 | import com.yohoufo.order.service.IBuyerOrderMetaService; | 24 | import com.yohoufo.order.service.IBuyerOrderMetaService; |
24 | import com.yohoufo.order.service.IOrderListService; | 25 | import com.yohoufo.order.service.IOrderListService; |
25 | import com.yohoufo.order.service.handler.BuyerOrderButtonsHandler; | 26 | import com.yohoufo.order.service.handler.BuyerOrderButtonsHandler; |
27 | +import com.yohoufo.order.utils.BuyerOrderUtils; | ||
26 | import com.yohoufo.order.utils.LoggerUtils; | 28 | import com.yohoufo.order.utils.LoggerUtils; |
29 | +import com.yohoufo.order.utils.SellerGoodsHelper; | ||
27 | import org.apache.commons.collections.CollectionUtils; | 30 | import org.apache.commons.collections.CollectionUtils; |
28 | import org.slf4j.Logger; | 31 | import org.slf4j.Logger; |
29 | import org.springframework.beans.factory.annotation.Autowired; | 32 | import org.springframework.beans.factory.annotation.Autowired; |
@@ -170,6 +173,11 @@ public class BuyerOrderListServiceImpl extends AbsOrderListService implements IO | @@ -170,6 +173,11 @@ public class BuyerOrderListServiceImpl extends AbsOrderListService implements IO | ||
170 | return logger; | 173 | return logger; |
171 | } | 174 | } |
172 | 175 | ||
176 | + @Override | ||
177 | + protected String buildOrderTypeTag(Integer orderAttr, SkupType skupType) { | ||
178 | + return SellerGoodsHelper.buildGoodsTypeTag(BuyerOrderUtils.convertSkupTypeIfNeed(orderAttr, skupType)); | ||
179 | + } | ||
180 | + | ||
173 | private AddressInfo getAddressInfo(int uid, long orderCode, Integer orderStauts){ | 181 | private AddressInfo getAddressInfo(int uid, long orderCode, Integer orderStauts){ |
174 | if (!ActionStatusHold.buyerCanModifyAddress(orderStauts)){ | 182 | if (!ActionStatusHold.buyerCanModifyAddress(orderStauts)){ |
175 | return null; | 183 | return null; |
@@ -533,5 +533,10 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I | @@ -533,5 +533,10 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I | ||
533 | return logger; | 533 | return logger; |
534 | } | 534 | } |
535 | 535 | ||
536 | + @Override | ||
537 | + protected String buildOrderTypeTag(Integer orderAttr, SkupType skupType) { | ||
538 | + return SellerGoodsHelper.buildGoodsTypeTag(skupType); | ||
539 | + } | ||
540 | + | ||
536 | 541 | ||
537 | } | 542 | } |
@@ -380,4 +380,9 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde | @@ -380,4 +380,9 @@ public class SellerOrderListService extends AbsOrderListService implements IOrde | ||
380 | return log; | 380 | return log; |
381 | } | 381 | } |
382 | 382 | ||
383 | + @Override | ||
384 | + protected String buildOrderTypeTag(Integer orderAttr, SkupType skupType) { | ||
385 | + return SellerGoodsHelper.buildGoodsTypeTag(skupType); | ||
386 | + } | ||
387 | + | ||
383 | } | 388 | } |
@@ -497,6 +497,7 @@ public class ShoppingServiceImpl implements IShoppingService { | @@ -497,6 +497,7 @@ public class ShoppingServiceImpl implements IShoppingService { | ||
497 | .activityBo(buildOrderActivityBo(chargeResult)) | 497 | .activityBo(buildOrderActivityBo(chargeResult)) |
498 | .amountDetailBo(buildOrderAmountDetailBo(chargeResult)) | 498 | .amountDetailBo(buildOrderAmountDetailBo(chargeResult)) |
499 | .tariffFee(chargeResult.getTariffFee()) | 499 | .tariffFee(chargeResult.getTariffFee()) |
500 | + .depositFee(buildDepositFee(chargeGoods)) | ||
500 | .build(); | 501 | .build(); |
501 | 502 | ||
502 | BuyerOrderSubmitResult submitResult = ordeCreationService.doSubmitOrder(orderBuilder); | 503 | BuyerOrderSubmitResult submitResult = ordeCreationService.doSubmitOrder(orderBuilder); |
@@ -545,6 +546,20 @@ public class ShoppingServiceImpl implements IShoppingService { | @@ -545,6 +546,20 @@ public class ShoppingServiceImpl implements IShoppingService { | ||
545 | 546 | ||
546 | } | 547 | } |
547 | 548 | ||
549 | + private SingleFeeDetail buildDepositFee(ChargeGoods chargeGoods){ | ||
550 | + BigDecimal qdsf = chargeGoods.getQuickDeliverServiceFee(); | ||
551 | + BigDecimal smf = chargeGoods.getStorageManagementFee(); | ||
552 | + double amount = 0D; | ||
553 | + if (Objects.nonNull(qdsf)){ | ||
554 | + amount = qdsf.doubleValue(); | ||
555 | + } | ||
556 | + if (Objects.nonNull(smf)){ | ||
557 | + amount = smf.doubleValue(); | ||
558 | + } | ||
559 | + SingleFeeDetail sfd = SingleFeeDetail.builder().amount(amount).build(); | ||
560 | + return sfd; | ||
561 | + } | ||
562 | + | ||
548 | public static final String KEY_AREA_STR = "区"; | 563 | public static final String KEY_AREA_STR = "区"; |
549 | 564 | ||
550 | public static final String[] REPLACE_STR = {"鉴定中心", "UFO"}; | 565 | public static final String[] REPLACE_STR = {"鉴定中心", "UFO"}; |
@@ -143,7 +143,7 @@ public class ProductProxyService extends AbsProxyService{ | @@ -143,7 +143,7 @@ public class ProductProxyService extends AbsProxyService{ | ||
143 | public Map<Integer, BigDecimal> getFlashLeastPrice(Integer productId) { | 143 | public Map<Integer, BigDecimal> getFlashLeastPrice(Integer productId) { |
144 | ProductDetailResp prdResp = null; | 144 | ProductDetailResp prdResp = null; |
145 | try { | 145 | try { |
146 | - Map<Integer, BigDecimal> result = ufoServiceCaller.call(FLASH_LEAST_PRICE, productId, null); | 146 | + Map<Integer, BigDecimal> result = ufoServiceCaller.call(FLASH_LEAST_PRICE, Map.class, productId); |
147 | return result; | 147 | return result; |
148 | } catch (Exception ex) { | 148 | } catch (Exception ex) { |
149 | logger.warn("getFlashLeastPrice err"); | 149 | logger.warn("getFlashLeastPrice err"); |
@@ -24,6 +24,7 @@ import com.yohoufo.order.service.seller.OrderComputeHandler; | @@ -24,6 +24,7 @@ import com.yohoufo.order.service.seller.OrderComputeHandler; | ||
24 | import com.yohoufo.order.service.seller.OrderComputeProvider; | 24 | import com.yohoufo.order.service.seller.OrderComputeProvider; |
25 | import com.yohoufo.order.utils.LoggerUtils; | 25 | import com.yohoufo.order.utils.LoggerUtils; |
26 | import com.yohoufo.order.utils.OrderAssist; | 26 | import com.yohoufo.order.utils.OrderAssist; |
27 | +import com.yohoufo.order.utils.SellerGoodsHelper; | ||
27 | import org.apache.commons.collections.CollectionUtils; | 28 | import org.apache.commons.collections.CollectionUtils; |
28 | import org.slf4j.Logger; | 29 | import org.slf4j.Logger; |
29 | import org.springframework.beans.factory.annotation.Autowired; | 30 | import org.springframework.beans.factory.annotation.Autowired; |
@@ -76,15 +77,17 @@ public abstract class AbsEntryChangePricePrepareProcessor<T extends SellerBaseCh | @@ -76,15 +77,17 @@ public abstract class AbsEntryChangePricePrepareProcessor<T extends SellerBaseCh | ||
76 | logger.warn("ChangePrice checkAndAcquire uid illegal , req {}", req); | 77 | logger.warn("ChangePrice checkAndAcquire uid illegal , req {}", req); |
77 | throw new UfoServiceException(400, "参数[uid]错误"); | 78 | throw new UfoServiceException(400, "参数[uid]错误"); |
78 | } | 79 | } |
79 | - | ||
80 | - if(!sellerOrderPrepareProcessor.checkIsEntry(uid)){ | 80 | + SkupType skupType = SkupType.getSkupType(req.getSkupType()); |
81 | + boolean isQuickDeliver = SellerGoodsHelper.isQuickDeliver(skupType); | ||
82 | + //非闪购商品需要入驻身份 =》 非入驻 时抛异常 | ||
83 | + if(!isQuickDeliver && !sellerOrderPrepareProcessor.checkIsEntry(uid)){ | ||
81 | logger.warn("ChangePrice checkAndAcquire uid is not entry shop , req {}", req); | 84 | logger.warn("ChangePrice checkAndAcquire uid is not entry shop , req {}", req); |
82 | throw new UfoServiceException(400, "您不是入驻商家"); | 85 | throw new UfoServiceException(400, "您不是入驻商家"); |
83 | } | 86 | } |
84 | 87 | ||
85 | //检查是否有买家下单,返回的是可售 待买家付款的skup | 88 | //检查是否有买家下单,返回的是可售 待买家付款的skup |
86 | Map<Integer, SkupDto> skupOfSalingMap = checkExistWaitingBuyerPay(req); | 89 | Map<Integer, SkupDto> skupOfSalingMap = checkExistWaitingBuyerPay(req); |
87 | - SkupType skupType = SkupType.getSkupType(req.getSkupType()); | 90 | + |
88 | BigDecimal salePrice = priceComputePrepareProcessor.checkAndAcquireSalePrice(req.getPrice(), skupType); | 91 | BigDecimal salePrice = priceComputePrepareProcessor.checkAndAcquireSalePrice(req.getPrice(), skupType); |
89 | //若needChangePriceSkupList中有skup出现不存在于skupOfSalingMap keys中,说明该skup走到了其他状态中 | 92 | //若needChangePriceSkupList中有skup出现不存在于skupOfSalingMap keys中,说明该skup走到了其他状态中 |
90 | Map<Integer, SkupDto> skupMap = checkNeedProcessSkups(getExpectedSkups(req), req.getOldPrice(), salePrice, skupOfSalingMap); | 93 | Map<Integer, SkupDto> skupMap = checkNeedProcessSkups(getExpectedSkups(req), req.getOldPrice(), salePrice, skupOfSalingMap); |
1 | package com.yohoufo.order.service.seller.processor; | 1 | package com.yohoufo.order.service.seller.processor; |
2 | 2 | ||
3 | import com.yohobuy.ufo.model.order.common.SkupStatus; | 3 | import com.yohobuy.ufo.model.order.common.SkupStatus; |
4 | +import com.yohobuy.ufo.model.order.constants.OrderDetailDesc; | ||
4 | import com.yohobuy.ufo.model.order.constants.SkupType; | 5 | import com.yohobuy.ufo.model.order.constants.SkupType; |
5 | import com.yohobuy.ufo.model.order.req.SellerBatchChangeReq; | 6 | import com.yohobuy.ufo.model.order.req.SellerBatchChangeReq; |
6 | import com.yohoufo.common.exception.UfoServiceException; | 7 | import com.yohoufo.common.exception.UfoServiceException; |
@@ -56,8 +57,8 @@ public class SellerDownShelfPrepareProcessor { | @@ -56,8 +57,8 @@ public class SellerDownShelfPrepareProcessor { | ||
56 | logger.warn("batch off shelve checkAndAcquire num is illegal, req {}", req); | 57 | logger.warn("batch off shelve checkAndAcquire num is illegal, req {}", req); |
57 | throw new UfoServiceException(400, "数量不合法"); | 58 | throw new UfoServiceException(400, "数量不合法"); |
58 | } | 59 | } |
59 | - | ||
60 | - if (!sellerOrderPrepareProcessor.checkIsEntry(uid)) { | 60 | + boolean isQuickDeliver = SellerGoodsHelper.isQuickDeliver(skupType); |
61 | + if (!isQuickDeliver && !sellerOrderPrepareProcessor.checkIsEntry(uid)) { | ||
61 | logger.warn("batch off shelve checkAndAcquire uid is not entry shop , req {}", req); | 62 | logger.warn("batch off shelve checkAndAcquire uid is not entry shop , req {}", req); |
62 | throw new UfoServiceException(400, "您不是入驻商家"); | 63 | throw new UfoServiceException(400, "您不是入驻商家"); |
63 | } | 64 | } |
-
Please register or login to post a comment