Authored by chenchao

change inbox content

@@ -24,6 +24,7 @@ import com.yohoufo.dal.order.model.StorageDepositCount; @@ -24,6 +24,7 @@ import com.yohoufo.dal.order.model.StorageDepositCount;
24 import com.yohoufo.order.controller.DepositController; 24 import com.yohoufo.order.controller.DepositController;
25 import com.yohoufo.order.model.response.AppraiseAddressResp; 25 import com.yohoufo.order.model.response.AppraiseAddressResp;
26 import com.yohoufo.order.service.DepositService; 26 import com.yohoufo.order.service.DepositService;
  27 +import com.yohoufo.order.service.proxy.InBoxFacade;
27 import com.yohoufo.order.service.proxy.ProductProxyService; 28 import com.yohoufo.order.service.proxy.ProductProxyService;
28 import com.yohoufo.order.service.proxy.SellerNoticeFacade; 29 import com.yohoufo.order.service.proxy.SellerNoticeFacade;
29 import com.yohoufo.order.service.seller.SkupService; 30 import com.yohoufo.order.service.seller.SkupService;
@@ -73,6 +74,9 @@ public class DepositServiceImpl implements DepositService { @@ -73,6 +74,9 @@ public class DepositServiceImpl implements DepositService {
73 @Autowired 74 @Autowired
74 private SellerNoticeFacade sellerNoticeFacade; 75 private SellerNoticeFacade sellerNoticeFacade;
75 76
  77 + @Autowired
  78 + private InBoxFacade inBoxFacade;
  79 +
76 private static final int DEPOSIT_MAX_TIME = 45 * 24 * 60 * 60; 80 private static final int DEPOSIT_MAX_TIME = 45 * 24 * 60 * 60;
77 81
78 82
@@ -318,7 +322,7 @@ public class DepositServiceImpl implements DepositService { @@ -318,7 +322,7 @@ public class DepositServiceImpl implements DepositService {
318 322
319 clearCache(uid, sd.getProductId(), sd.getStorageId()); 323 clearCache(uid, sd.getProductId(), sd.getStorageId());
320 SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(sd.getNewSkup()); 324 SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(sd.getNewSkup());
321 - sellerNoticeFacade.depositGoodsSaleUnShelf(uid, psog.getProductName(), psog.getSizeName(), psog.getProductId()); 325 + inBoxFacade.sellerPlaySelf(uid, psog);
322 } 326 }
323 327
324 /** 328 /**
@@ -126,26 +126,7 @@ public class SellerNoticeFacade extends BaseNoticeFacade { @@ -126,26 +126,7 @@ public class SellerNoticeFacade extends BaseNoticeFacade {
126 } 126 }
127 } 127 }
128 128
129 - /**  
130 - * 寄存商品上架出售  
131 - *  
132 - * @param sellerUid  
133 - * @param prdName  
134 - */  
135 - public void depositGoodsSaleShelf(int sellerUid, String prdName, String sizeName, Integer productId) {  
136 - try {  
137 - newNotice(sellerUid)  
138 - .withLogPrefix("notice seller deposit goods sale shelf")  
139 - .withInBox(() -> {  
140 - Product product = productMapper.selectByPrimaryKey(productId);  
141 - String productCode = product.getProductCode();  
142 - return buildInboxContent(InboxBusinessTypeEnum.DEPOSIT_GOODS_SALE_SHELF, prdName, sizeName, productCode);  
143 - })  
144 - .send();  
145 - } catch (Exception e) {  
146 - log.warn("notice seller deposit goods sale shelf fail, sellerUid {}, prdName {} ,sizeName {} ", sellerUid, prdName, sizeName, e);  
147 - }  
148 - } 129 +
149 130
150 /** 131 /**
151 * 寄存商品下架 132 * 寄存商品下架
@@ -8,6 +8,7 @@ import com.yohobuy.ufo.model.order.common.OrderCodeType; @@ -8,6 +8,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.SkupListType;
10 import com.yohobuy.ufo.model.order.common.SkupStatus; 10 import com.yohobuy.ufo.model.order.common.SkupStatus;
  11 +import com.yohobuy.ufo.model.order.constants.SkupType;
11 import com.yohobuy.ufo.model.order.req.QuickDeliverOrderSubmitReq; 12 import com.yohobuy.ufo.model.order.req.QuickDeliverOrderSubmitReq;
12 import com.yohobuy.ufo.model.order.resp.OrderListInfo; 13 import com.yohobuy.ufo.model.order.resp.OrderListInfo;
13 import com.yohobuy.ufo.model.order.resp.PageResp; 14 import com.yohobuy.ufo.model.order.resp.PageResp;
@@ -127,7 +128,8 @@ public class QuickDeliverGoodsService { @@ -127,7 +128,8 @@ public class QuickDeliverGoodsService {
127 } 128 }
128 //在for循环中被用作值传递,部分数据会有变化,使用时需要注意动态变化的属性 129 //在for循环中被用作值传递,部分数据会有变化,使用时需要注意动态变化的属性
129 GoodsInfo goodsInfo = context.getSoldProduct(); 130 GoodsInfo goodsInfo = context.getSoldProduct();
130 - sellerNoticeFacade.depositGoodsSaleShelf(uid, goodsInfo.getProductName(), goodsInfo.getSizeName(), goodsInfo.getProductId()); 131 + SkupType skupType = goodsInfo.getSkupType();
  132 + sellerNoticeFacade.saleShelf(uid, goodsInfo.getProductName(), goodsInfo.getSizeName(), goodsInfo.getProductId(), skupType.getCode());
131 DepositPublishResp resp = DepositPublishResp.builder().successNum(successNum) 133 DepositPublishResp resp = DepositPublishResp.builder().successNum(successNum)
132 .build(); 134 .build();
133 return resp; 135 return resp;