Showing
1 changed file
with
21 additions
and
6 deletions
@@ -29,7 +29,9 @@ import com.yohoufo.order.service.handler.SellerDecrPriceTaskHandler; | @@ -29,7 +29,9 @@ import com.yohoufo.order.service.handler.SellerDecrPriceTaskHandler; | ||
29 | import com.yohoufo.order.service.handler.SellerDownShelfTaskHandler; | 29 | import com.yohoufo.order.service.handler.SellerDownShelfTaskHandler; |
30 | import com.yohoufo.order.service.handler.SellerIncrPriceTaskHandler; | 30 | import com.yohoufo.order.service.handler.SellerIncrPriceTaskHandler; |
31 | import com.yohoufo.order.service.handler.SellerOrderSubmitHandler; | 31 | import com.yohoufo.order.service.handler.SellerOrderSubmitHandler; |
32 | +import com.yohoufo.order.service.proxy.FastDeliveryProxyService; | ||
32 | import com.yohoufo.order.service.proxy.ProductProxyService; | 33 | import com.yohoufo.order.service.proxy.ProductProxyService; |
34 | +import com.yohoufo.order.service.proxy.UserProxyService; | ||
33 | import com.yohoufo.order.service.seller.ImportPublishExcutor; | 35 | import com.yohoufo.order.service.seller.ImportPublishExcutor; |
34 | import com.yohoufo.order.service.seller.SellerAuthCheckService; | 36 | import com.yohoufo.order.service.seller.SellerAuthCheckService; |
35 | import com.yohoufo.order.service.seller.processor.AdjustPricePrepareProcessor; | 37 | import com.yohoufo.order.service.seller.processor.AdjustPricePrepareProcessor; |
@@ -39,6 +41,7 @@ import com.yohoufo.order.service.seller.processor.SellerTaskProcessor; | @@ -39,6 +41,7 @@ import com.yohoufo.order.service.seller.processor.SellerTaskProcessor; | ||
39 | import com.yohoufo.order.service.seller.setting.SellerFuncService; | 41 | import com.yohoufo.order.service.seller.setting.SellerFuncService; |
40 | import com.yohoufo.order.service.seller.setting.SellerService; | 42 | import com.yohoufo.order.service.seller.setting.SellerService; |
41 | import com.yohoufo.order.service.seller.setting.SellerWrapper; | 43 | import com.yohoufo.order.service.seller.setting.SellerWrapper; |
44 | +import com.yohoufo.order.utils.AddressHelper; | ||
42 | import org.apache.commons.collections.CollectionUtils; | 45 | import org.apache.commons.collections.CollectionUtils; |
43 | import org.apache.commons.lang.StringUtils; | 46 | import org.apache.commons.lang.StringUtils; |
44 | import org.slf4j.Logger; | 47 | import org.slf4j.Logger; |
@@ -100,8 +103,6 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { | @@ -100,8 +103,6 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { | ||
100 | @Autowired | 103 | @Autowired |
101 | private BuyerOrderGoodsMapper buyerOrderGoodsMapper; | 104 | private BuyerOrderGoodsMapper buyerOrderGoodsMapper; |
102 | 105 | ||
103 | - @Autowired | ||
104 | - private OrdersPayTransferMapper ordersPayTransferMapper; | ||
105 | 106 | ||
106 | @Autowired | 107 | @Autowired |
107 | SellerOrderGoodsMapper sellerOrderGoodsMapper; | 108 | SellerOrderGoodsMapper sellerOrderGoodsMapper; |
@@ -112,9 +113,9 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { | @@ -112,9 +113,9 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { | ||
112 | @Autowired | 113 | @Autowired |
113 | private TradeBillsMapper tradeBillsMapper; | 114 | private TradeBillsMapper tradeBillsMapper; |
114 | 115 | ||
115 | - private static final String ADDRESS_STR = "{\"address\":\"松金公路2758号sneakerburger仓储中心\",\"address_id\":17560803,\"area\":\"上海 金山区 张堰镇\",\"areaCode\":\"310116103\",\"consignee\":\"阿津\",\"isUpdate\":\"N\",\"mobile\":\"18121153590\",\"phone\":\"\",\"zipCode\":\"\"}"; | 116 | +// private static final String ADDRESS_STR = "{\"address\":\"松金公路2758号sneakerburger仓储中心\",\"address_id\":17560803,\"area\":\"上海 金山区 张堰镇\",\"areaCode\":\"310116103\",\"consignee\":\"阿津\",\"isUpdate\":\"N\",\"mobile\":\"18121153590\",\"phone\":\"\",\"zipCode\":\"\"}"; |
116 | 117 | ||
117 | - private static final String HIDDEN_ADDRESS_STR = "{\"address\":\"松金公路2758号sneakerbur****储中心\",\"address_id\":17560803,\"area\":\"上海 金山区 张堰镇\",\"areaCode\":\"310116103\",\"consignee\":\"*津\",\"isUpdate\":\"N\",\"mobile\":\"181****3590\",\"phone\":\"\",\"zipCode\":\"\"}"; | 118 | +// private static final String HIDDEN_ADDRESS_STR = "{\"address\":\"松金公路2758号sneakerbur****储中心\",\"address_id\":17560803,\"area\":\"上海 金山区 张堰镇\",\"areaCode\":\"310116103\",\"consignee\":\"*津\",\"isUpdate\":\"N\",\"mobile\":\"181****3590\",\"phone\":\"\",\"zipCode\":\"\"}"; |
118 | 119 | ||
119 | /** | 120 | /** |
120 | * 货款收入 | 121 | * 货款收入 |
@@ -498,6 +499,12 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { | @@ -498,6 +499,12 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { | ||
498 | } | 499 | } |
499 | 500 | ||
500 | 501 | ||
502 | + @Autowired | ||
503 | + FastDeliveryProxyService fastDeliveryProxyService; | ||
504 | + | ||
505 | + | ||
506 | + @Autowired | ||
507 | + private UserProxyService userProxyService; | ||
501 | 508 | ||
502 | @Override | 509 | @Override |
503 | public List<FastDeliveryBatchOnShelfResp> batchOnShelf(FastDeliveryBatchOnShelfReq req) { | 510 | public List<FastDeliveryBatchOnShelfResp> batchOnShelf(FastDeliveryBatchOnShelfReq req) { |
@@ -518,9 +525,17 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { | @@ -518,9 +525,17 @@ public class ErpFastDeliveryServiceImpl implements IErpFastDeliveryService { | ||
518 | // 上架 | 525 | // 上架 |
519 | List<ProductImportTranItemBo> responseList = Lists.newArrayList(); | 526 | List<ProductImportTranItemBo> responseList = Lists.newArrayList(); |
520 | 527 | ||
528 | + FastDeliverySellerAccessInfo sellerAccessInfo = fastDeliveryProxyService.getConfigBySellerUid(req.getUid()); | ||
529 | + if (sellerAccessInfo == null || sellerAccessInfo.getSendBackAddressId() == null){ | ||
530 | + throw new UfoServiceException(400,"请检查寄回地址配置!"); | ||
531 | + } | ||
521 | 532 | ||
522 | - AddressInfo noHiddenBackAddress = JSONObject.parseObject(ADDRESS_STR, AddressInfo.class); | ||
523 | - AddressInfo hiddenBackAddress = JSONObject.parseObject(HIDDEN_ADDRESS_STR, AddressInfo.class); | 533 | + // 获取其寄回地址 |
534 | + AddressInfo noHiddenBackAddress = userProxyService.getAddressInfoNotHidden(req.getUid(), sellerAccessInfo.getSendBackAddressId()); | ||
535 | + if(AddressHelper.isNeedUpdate(noHiddenBackAddress)){ | ||
536 | + throw new UfoServiceException(400,"您的收货地址缺少所在地的街道信息,请更新收货地址"); | ||
537 | + } | ||
538 | + AddressInfo hiddenBackAddress = UserProxyService.getHiddenAddressFromNotHidden(noHiddenBackAddress); | ||
524 | 539 | ||
525 | // 上架的代码(和之前同) | 540 | // 上架的代码(和之前同) |
526 | List<FastDeliveryBatchOnShelfResp> shelfResps = Lists.newArrayList(); | 541 | List<FastDeliveryBatchOnShelfResp> shelfResps = Lists.newArrayList(); |
-
Please register or login to post a comment