Merge branch 'test6.9.8' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.8
# Conflicts: # order/src/main/java/com/yohoufo/order/service/proxy/SellerNoticeFacade.java
Showing
6 changed files
with
42 additions
and
22 deletions
@@ -172,6 +172,11 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { | @@ -172,6 +172,11 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { | ||
172 | return result; | 172 | return result; |
173 | } | 173 | } |
174 | 174 | ||
175 | + /** | ||
176 | + * 闪购寄存 | ||
177 | + * @param buyerOrder | ||
178 | + * @param sellerOrderGoods | ||
179 | + */ | ||
175 | private void processDepositOrderOfQuickDeliverGoods(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){ | 180 | private void processDepositOrderOfQuickDeliverGoods(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){ |
176 | Integer buyerUid = buyerOrder.getUid(); | 181 | Integer buyerUid = buyerOrder.getUid(); |
177 | Long orderCode = buyerOrder.getOrderCode(); | 182 | Long orderCode = buyerOrder.getOrderCode(); |
@@ -623,7 +623,7 @@ public class AppraiseService { | @@ -623,7 +623,7 @@ public class AppraiseService { | ||
623 | 623 | ||
624 | //记录操作记录 | 624 | //记录操作记录 |
625 | orderOperateRecordService.addRecord(orderCode, "买家操作", OperateTypeEnum.OPERATE_TYPE_QUALITY_MINI_FAULT_PASS); | 625 | orderOperateRecordService.addRecord(orderCode, "买家操作", OperateTypeEnum.OPERATE_TYPE_QUALITY_MINI_FAULT_PASS); |
626 | - sellerNoticeFacade.appraisePass(buyerUid, orderCode, sellerOrderGoods); | 626 | + sellerNoticeFacade.appraisePass(buyerUid, orderCode, sellerOrderGoods, true); |
627 | } else { | 627 | } else { |
628 | throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE); // 更新失败,可能是因为订单状态已经被并发修改 | 628 | throw new ServiceException(ServiceError.ORDER_STATUS_INVALIDATE); // 更新失败,可能是因为订单状态已经被并发修改 |
629 | } | 629 | } |
@@ -1289,7 +1289,7 @@ public class AppraiseService { | @@ -1289,7 +1289,7 @@ public class AppraiseService { | ||
1289 | orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetOrderStatus.getCode()); | 1289 | orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetOrderStatus.getCode()); |
1290 | //TODO 鉴定通过, | 1290 | //TODO 鉴定通过, |
1291 | 1291 | ||
1292 | - sellerNoticeFacade.appraisePass(buyerUid, orderCode, sellerOrderGoods); | 1292 | + sellerNoticeFacade.appraisePass(buyerUid, orderCode, sellerOrderGoods, true); |
1293 | if(isDepositOfInStockGoods){ | 1293 | if(isDepositOfInStockGoods){ |
1294 | Product product = Optional.ofNullable(sellerOrderGoods).map(SellerOrderGoods::getProductId).map(productMapper::selectByPrimaryKey).orElse(null); | 1294 | Product product = Optional.ofNullable(sellerOrderGoods).map(SellerOrderGoods::getProductId).map(productMapper::selectByPrimaryKey).orElse(null); |
1295 | buyerNoticeFacade.noticeBuyerWhenDepositOrderOfInstockPass(buyerUid, orderCode, sellerOrderGoods, product); | 1295 | buyerNoticeFacade.noticeBuyerWhenDepositOrderOfInstockPass(buyerUid, orderCode, sellerOrderGoods, product); |
@@ -1438,7 +1438,7 @@ public class AppraiseService { | @@ -1438,7 +1438,7 @@ public class AppraiseService { | ||
1438 | 1438 | ||
1439 | //平台已发货给买家 | 1439 | //平台已发货给买家 |
1440 | buyerNoticeFacade.appraisePassAndDeliveryGoodsToBuyer(buyerOrder, sellerOrderGoods); | 1440 | buyerNoticeFacade.appraisePassAndDeliveryGoodsToBuyer(buyerOrder, sellerOrderGoods); |
1441 | - sellerNoticeFacade.appraisePass(buyerUid, orderCode, sellerOrderGoods); | 1441 | + sellerNoticeFacade.appraisePass(buyerUid, orderCode, sellerOrderGoods, true); |
1442 | } catch (Exception ex) { | 1442 | } catch (Exception ex) { |
1443 | LOGGER.warn("in appraiseSuccess,refund fail, refundReqOfSeller {}", refundReqOfSeller, ex); | 1443 | LOGGER.warn("in appraiseSuccess,refund fail, refundReqOfSeller {}", refundReqOfSeller, ex); |
1444 | String content = "鉴定通过时,订单" + orderCode + "退还保证金失败"; | 1444 | String content = "鉴定通过时,订单" + orderCode + "退还保证金失败"; |
@@ -909,12 +909,12 @@ public class InBoxFacade extends BaseNoticeFacade{ | @@ -909,12 +909,12 @@ public class InBoxFacade extends BaseNoticeFacade{ | ||
909 | 909 | ||
910 | public void noticeWhenQuickDeliverOrderPaid(int buyerUid, long orderCode, SellerOrderGoods sog) { | 910 | public void noticeWhenQuickDeliverOrderPaid(int buyerUid, long orderCode, SellerOrderGoods sog) { |
911 | buyerNoticeFacade.quickDeliverOrderPaid(buyerUid, orderCode, sog); | 911 | buyerNoticeFacade.quickDeliverOrderPaid(buyerUid, orderCode, sog); |
912 | - sellerNoticeFacade.appraisePass(buyerUid, orderCode, sog); | 912 | + sellerNoticeFacade.appraisePass(buyerUid, orderCode, sog, false); |
913 | } | 913 | } |
914 | 914 | ||
915 | public void noticeWhenDepositOrderOfQuickDeliverGoodsPaid(int buyerUid, long orderCode, SellerOrderGoods sog) { | 915 | public void noticeWhenDepositOrderOfQuickDeliverGoodsPaid(int buyerUid, long orderCode, SellerOrderGoods sog) { |
916 | buyerNoticeFacade.quickDeliverDepositGoodsPaid(buyerUid, orderCode, sog); | 916 | buyerNoticeFacade.quickDeliverDepositGoodsPaid(buyerUid, orderCode, sog); |
917 | - sellerNoticeFacade.appraisePass(buyerUid, orderCode, sog); | 917 | + sellerNoticeFacade.appraisePass(buyerUid, orderCode, sog, false); |
918 | } | 918 | } |
919 | 919 | ||
920 | /** | 920 | /** |
@@ -2,22 +2,20 @@ package com.yohoufo.order.service.proxy; | @@ -2,22 +2,20 @@ package com.yohoufo.order.service.proxy; | ||
2 | 2 | ||
3 | import com.yoho.message.sdk.service.ufo.IUFOSendService; | 3 | import com.yoho.message.sdk.service.ufo.IUFOSendService; |
4 | import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum; | 4 | import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum; |
5 | +import com.yohobuy.ufo.model.order.constants.SkupType; | ||
5 | import com.yohoufo.dal.order.model.BuyerOrder; | 6 | import com.yohoufo.dal.order.model.BuyerOrder; |
6 | import com.yohoufo.dal.order.model.SellerOrderGoods; | 7 | import com.yohoufo.dal.order.model.SellerOrderGoods; |
7 | import com.yohoufo.dal.product.ProductMapper; | 8 | import com.yohoufo.dal.product.ProductMapper; |
8 | import com.yohoufo.dal.product.model.Product; | 9 | import com.yohoufo.dal.product.model.Product; |
9 | -import com.yohoufo.inboxclient.model.InBoxResponse; | ||
10 | import com.yohoufo.inboxclient.model.InboxReqVO; | 10 | import com.yohoufo.inboxclient.model.InboxReqVO; |
11 | import lombok.NonNull; | 11 | import lombok.NonNull; |
12 | import lombok.extern.slf4j.Slf4j; | 12 | import lombok.extern.slf4j.Slf4j; |
13 | -import org.apache.commons.lang3.StringUtils; | ||
14 | import org.slf4j.Logger; | 13 | import org.slf4j.Logger; |
15 | import org.springframework.beans.factory.annotation.Autowired; | 14 | import org.springframework.beans.factory.annotation.Autowired; |
16 | import org.springframework.stereotype.Service; | 15 | import org.springframework.stereotype.Service; |
17 | 16 | ||
18 | -import java.util.Arrays; | ||
19 | -import java.util.List; | ||
20 | import java.util.Optional; | 17 | import java.util.Optional; |
18 | +import java.util.function.Supplier; | ||
21 | 19 | ||
22 | @Service | 20 | @Service |
23 | @Slf4j(topic = "SellerNoticeFacade") | 21 | @Slf4j(topic = "SellerNoticeFacade") |
@@ -64,7 +62,7 @@ public class SellerNoticeFacade extends BaseNoticeFacade { | @@ -64,7 +62,7 @@ public class SellerNoticeFacade extends BaseNoticeFacade { | ||
64 | * | 62 | * |
65 | * @param orderCode | 63 | * @param orderCode |
66 | */ | 64 | */ |
67 | - public void appraisePass(int buyerUid, long orderCode, SellerOrderGoods psog) { | 65 | + public void appraisePass(int buyerUid, long orderCode, SellerOrderGoods psog, boolean withEarnMoney) { |
68 | try { | 66 | try { |
69 | Integer sellerUid = psog.getUid(); | 67 | Integer sellerUid = psog.getUid(); |
70 | newNotice(sellerUid) | 68 | newNotice(sellerUid) |
@@ -75,7 +73,11 @@ public class SellerNoticeFacade extends BaseNoticeFacade { | @@ -75,7 +73,11 @@ public class SellerNoticeFacade extends BaseNoticeFacade { | ||
75 | String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse(""); | 73 | String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse(""); |
76 | String sizeName = psog.getSizeName(); | 74 | String sizeName = psog.getSizeName(); |
77 | String goodsTypeType = buildGoodsTypeTagForSeller(psog); | 75 | String goodsTypeType = buildGoodsTypeTagForSeller(psog); |
78 | - return buildInboxContent(InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_PASS, goodsTypeType, prdName, sizeName, productCode); | 76 | + String earnMoneyPlacehold = ""; |
77 | + if (withEarnMoney){ | ||
78 | + earnMoneyPlacehold = "保证金已退还,"; | ||
79 | + } | ||
80 | + return buildInboxContent(InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_PASS, goodsTypeType, prdName, sizeName, productCode,earnMoneyPlacehold); | ||
79 | }) | 81 | }) |
80 | .withSms(() -> { | 82 | .withSms(() -> { |
81 | String goodsTypeType = buildGoodsTypeTagForSeller(psog); | 83 | String goodsTypeType = buildGoodsTypeTagForSeller(psog); |
@@ -237,8 +239,26 @@ public class SellerNoticeFacade extends BaseNoticeFacade { | @@ -237,8 +239,26 @@ public class SellerNoticeFacade extends BaseNoticeFacade { | ||
237 | } | 239 | } |
238 | } | 240 | } |
239 | 241 | ||
240 | - public void noticeSellerWhenPlatformOffShelve(SellerOrderGoods psog) { | ||
241 | - | 242 | + public void noticeSellerWhenPlatformOffShelve(SellerOrderGoods psog){ |
243 | + //SALE_NOTIFIED_UNSHELF_4_QUICK_DELIVER | ||
244 | + // SMS_SMS_NOTIFIED_UNSHELF | ||
245 | + Integer sellerUid = psog.getUid(); | ||
246 | + String prdName = psog.getProductName(); | ||
247 | + String sizeName = psog.getSizeName(); | ||
248 | + try { | ||
249 | + Product product = productMapper.selectByPrimaryKey(psog.getProductId()); | ||
250 | + String skupTypeText=SkupType.getSkupType(psog.getAttributes()).attrName(); | ||
251 | + String productCode = product.getProductCode(); | ||
252 | + Supplier<InboxReqVO> inboxSupplier = ()->buildInboxContent(InboxBusinessTypeEnum.SALE_NOTIFIED_UNSHELF_4_QUICK_DELIVER, skupTypeText, prdName, sizeName, productCode); | ||
253 | + Supplier<String> smsSupplier = ()->buildSmsContent(InboxBusinessTypeEnum.SMS_SMS_NOTIFIED_UNSHELF, skupTypeText,prdName,sizeName,productCode); | ||
254 | + newNotice(psog.getUid()) | ||
255 | + .withLogPrefix("notice Seller When Platform Off-Shelve") | ||
256 | + .withInBox(inboxSupplier) | ||
257 | + .withSms(smsSupplier) | ||
258 | + .send(); | ||
259 | + } catch (Exception e) { | ||
260 | + log.warn("noticeSellerWhenPlatformOffShelve fail, sellerUid {}, prdName {} ,sizeName {} ", sellerUid, prdName, sizeName, e); | ||
261 | + } | ||
242 | } | 262 | } |
243 | 263 | ||
244 | /** | 264 | /** |
@@ -750,7 +750,7 @@ public class SellerOrderCancelService { | @@ -750,7 +750,7 @@ public class SellerOrderCancelService { | ||
750 | SellerOrderGoods psog = cpn.psog; | 750 | SellerOrderGoods psog = cpn.psog; |
751 | Integer sellerUid = psog.getUid(); | 751 | Integer sellerUid = psog.getUid(); |
752 | if (cpn.isQuickDeliver){ | 752 | if (cpn.isQuickDeliver){ |
753 | - //TODO notice seller | 753 | + // notice seller |
754 | sellerNoticeFacade.noticeSellerWhenPlatformOffShelve(psog); | 754 | sellerNoticeFacade.noticeSellerWhenPlatformOffShelve(psog); |
755 | }else { | 755 | }else { |
756 | inBoxFacade.notifyUnshelfCauseBySpecialReason(sellerUid, psog); | 756 | inBoxFacade.notifyUnshelfCauseBySpecialReason(sellerUid, psog); |
@@ -6,8 +6,8 @@ import com.yohobuy.ufo.model.order.bo.GoodsInfo; | @@ -6,8 +6,8 @@ import com.yohobuy.ufo.model.order.bo.GoodsInfo; | ||
6 | import com.yohobuy.ufo.model.order.bo.ProductInfo; | 6 | import com.yohobuy.ufo.model.order.bo.ProductInfo; |
7 | import com.yohobuy.ufo.model.order.common.OrderCodeType; | 7 | import com.yohobuy.ufo.model.order.common.OrderCodeType; |
8 | import com.yohobuy.ufo.model.order.common.SellerOrderListType; | 8 | import com.yohobuy.ufo.model.order.common.SellerOrderListType; |
9 | +import com.yohobuy.ufo.model.order.common.SkupListType; | ||
9 | import com.yohobuy.ufo.model.order.common.SkupStatus; | 10 | import com.yohobuy.ufo.model.order.common.SkupStatus; |
10 | -import com.yohobuy.ufo.model.order.constants.SkupType; | ||
11 | import com.yohobuy.ufo.model.order.req.QuickDeliverOrderSubmitReq; | 11 | import com.yohobuy.ufo.model.order.req.QuickDeliverOrderSubmitReq; |
12 | import com.yohobuy.ufo.model.order.resp.OrderListInfo; | 12 | import com.yohobuy.ufo.model.order.resp.OrderListInfo; |
13 | import com.yohobuy.ufo.model.order.resp.PageResp; | 13 | import com.yohobuy.ufo.model.order.resp.PageResp; |
@@ -34,7 +34,6 @@ import org.springframework.beans.factory.annotation.Autowired; | @@ -34,7 +34,6 @@ import org.springframework.beans.factory.annotation.Autowired; | ||
34 | import org.springframework.stereotype.Service; | 34 | import org.springframework.stereotype.Service; |
35 | 35 | ||
36 | import java.math.BigDecimal; | 36 | import java.math.BigDecimal; |
37 | -import java.util.ArrayList; | ||
38 | import java.util.Arrays; | 37 | import java.util.Arrays; |
39 | import java.util.List; | 38 | import java.util.List; |
40 | 39 | ||
@@ -198,15 +197,11 @@ public class QuickDeliverGoodsService { | @@ -198,15 +197,11 @@ public class QuickDeliverGoodsService { | ||
198 | return respBuilder.build(); | 197 | return respBuilder.build(); |
199 | } | 198 | } |
200 | 199 | ||
201 | - private static final List<Integer> SKUP_TYPE_CODES; | ||
202 | - static { | ||
203 | - SKUP_TYPE_CODES = new ArrayList<>(1); | ||
204 | - SKUP_TYPE_CODES.add(SkupType.QUICK_DELIVER.getCode()); | ||
205 | - } | 200 | + |
206 | 201 | ||
207 | public List<Integer> getSkupTypeCodes(){ | 202 | public List<Integer> getSkupTypeCodes(){ |
208 | 203 | ||
209 | - return SKUP_TYPE_CODES; | 204 | + return SkupListType.QUICK_DELIVER.getSkupTypeCodes(false); |
210 | } | 205 | } |
211 | 206 | ||
212 | /** | 207 | /** |
-
Please register or login to post a comment