Authored by LUOXC

fixbug

@@ -267,7 +267,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -267,7 +267,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
267 int ts = DateUtil.getCurrentTimeSecond(); 267 int ts = DateUtil.getCurrentTimeSecond();
268 int deliveryHours = deliveryMinutesService.getDeliverMinutesThird_hours(ts);//把分钟转小时 268 int deliveryHours = deliveryMinutesService.getDeliverMinutesThird_hours(ts);//把分钟转小时
269 String unit = DateUtil.UNIT_HOURS; 269 String unit = DateUtil.UNIT_HOURS;
270 - inBoxFacade.sellerSkupPaidByBuyer(sellerOrderGoods,orderCode,deliveryHours, unit); 270 + sellerNoticeFacade.sellerSkupPaidByBuyer(sellerOrderGoods,orderCode,deliveryHours, unit);
271 271
272 //离发货截止12小时提醒 272 //离发货截止12小时提醒
273 DeliverNoticeEvent deliverNoticeEvent = DeliverNoticeEvent.builder().skup(sellerOrderGoods.getId()) 273 DeliverNoticeEvent deliverNoticeEvent = DeliverNoticeEvent.builder().skup(sellerOrderGoods.getId())
@@ -299,7 +299,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -299,7 +299,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
299 int ts = DateUtil.getCurrentTimeSecond(); 299 int ts = DateUtil.getCurrentTimeSecond();
300 int deliveryTime = deliveryMinutesService.getDeliverOverSeasDay(); 300 int deliveryTime = deliveryMinutesService.getDeliverOverSeasDay();
301 String unit = DateUtil.UNIT_DAYS; 301 String unit = DateUtil.UNIT_DAYS;
302 - inBoxFacade.sellerOverSeasSkupPaidByBuyer(sellerOrderGoods,orderCode,deliveryTime, unit); 302 + sellerNoticeFacade.sellerOverSeasSkupPaidByBuyer(sellerOrderGoods,orderCode,deliveryTime, unit);
303 303
304 //离发货截止12小时提醒 304 //离发货截止12小时提醒
305 DeliverNoticeEvent deliverNoticeEvent = DeliverNoticeEvent.builder().skup(sellerOrderGoods.getId()) 305 DeliverNoticeEvent deliverNoticeEvent = DeliverNoticeEvent.builder().skup(sellerOrderGoods.getId())
@@ -332,7 +332,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -332,7 +332,7 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
332 TimeUnit tu = acr.getTimeUnit(); 332 TimeUnit tu = acr.getTimeUnit();
333 int dtl = acr.getMin(); 333 int dtl = acr.getMin();
334 String unit = TimeUnit.HOURS.equals(tu) ? DateUtil.UNIT_HOURS : DateUtil.UNIT_DAYS; 334 String unit = TimeUnit.HOURS.equals(tu) ? DateUtil.UNIT_HOURS : DateUtil.UNIT_DAYS;
335 - inBoxFacade.sellerSkupPaidByBuyer(sellerOrderGoods, orderCode, dtl, unit); 335 + sellerNoticeFacade.sellerSkupPaidByBuyer(sellerOrderGoods, orderCode, dtl, unit);
336 buyerNoticeFacade.buyerFinishPaid(orderInfo, dtl, unit); 336 buyerNoticeFacade.buyerFinishPaid(orderInfo, dtl, unit);
337 337
338 // 记录此订单的发货超时时间期限点 338 // 记录此订单的发货超时时间期限点
@@ -527,7 +527,7 @@ public class AppraiseService { @@ -527,7 +527,7 @@ public class AppraiseService {
527 SellerOrderGoods sellerOrderGoods = cleanCacheAfterUpdateStatus(buyerOrder.getOrderCode(), buyerOrder.getUid(), buyerOrder.getSellerUid()); 527 SellerOrderGoods sellerOrderGoods = cleanCacheAfterUpdateStatus(buyerOrder.getOrderCode(), buyerOrder.getUid(), buyerOrder.getSellerUid());
528 528
529 //发送消息 529 //发送消息
530 - inBoxFacade.sendCancelledProductToSellerByCenter(sellerUid,orderCode, sellerOrderGoods,wayBillCode); 530 + sellerNoticeFacade.sendCancelledProductToSellerByCenter(sellerUid,orderCode, sellerOrderGoods,wayBillCode);
531 531
532 532
533 return apiResponse; 533 return apiResponse;
@@ -692,7 +692,7 @@ public class AppraiseService { @@ -692,7 +692,7 @@ public class AppraiseService {
692 SellerOrderGoods sellerOrderGoods = cleanCacheAfterUpdateStatus(buyerOrder.getOrderCode(), buyerOrder.getUid(), buyerOrder.getSellerUid()); 692 SellerOrderGoods sellerOrderGoods = cleanCacheAfterUpdateStatus(buyerOrder.getOrderCode(), buyerOrder.getUid(), buyerOrder.getSellerUid());
693 if (oldBuyerOrderStatus == OrderStatus.PLATFORM_APPRAISE_UNSURE.getCode()) { 693 if (oldBuyerOrderStatus == OrderStatus.PLATFORM_APPRAISE_UNSURE.getCode()) {
694 //无法鉴定 694 //无法鉴定
695 - inBoxFacade.sellerAppraiseUnsure_send_back(sellerOrderGoods, orderCode, wayBillCode); 695 + sellerNoticeFacade.sellerAppraiseUnsureSendBack(sellerOrderGoods, orderCode, wayBillCode);
696 } else if (oldBuyerOrderStatus == OrderStatus.PLATFORM_DETECTION_NOT_PASS.getCode()) { 696 } else if (oldBuyerOrderStatus == OrderStatus.PLATFORM_DETECTION_NOT_PASS.getCode()) {
697 //检测不通过 697 //检测不通过
698 sellerNoticeFacade.sellerDetectionNotPassSendBack(sellerOrderGoods, orderCode, wayBillCode); 698 sellerNoticeFacade.sellerDetectionNotPassSendBack(sellerOrderGoods, orderCode, wayBillCode);
@@ -1053,7 +1053,7 @@ public class AppraiseService { @@ -1053,7 +1053,7 @@ public class AppraiseService {
1053 1053
1054 //TODO 消息 1054 //TODO 消息
1055 //鉴定不通过 ,其余的情况不发消息,改成寄回的时候再发消息 1055 //鉴定不通过 ,其余的情况不发消息,改成寄回的时候再发消息
1056 - inBoxFacade.noticeSellerWhenAppraiseFail(sellerOrderGoods, orderCode, wayBillCode); 1056 + sellerNoticeFacade.noticeSellerWhenAppraiseFail(sellerOrderGoods, orderCode, wayBillCode);
1057 buyerNoticeFacade.appraiseFail(buyerOrder, sellerOrderGoods); 1057 buyerNoticeFacade.appraiseFail(buyerOrder, sellerOrderGoods);
1058 1058
1059 } catch (Exception ex) { 1059 } catch (Exception ex) {
@@ -90,66 +90,6 @@ public class InBoxFacade extends BaseNoticeFacade{ @@ -90,66 +90,6 @@ public class InBoxFacade extends BaseNoticeFacade{
90 return log; 90 return log;
91 } 91 }
92 92
93 -  
94 -  
95 -  
96 -  
97 -  
98 -  
99 -  
100 -  
101 -  
102 -  
103 -  
104 -  
105 - /**  
106 - * 卖家发货提醒,买家支付购买后  
107 - *  
108 - * @param sog  
109 - */  
110 - public void sellerSkupPaidByBuyer(SellerOrderGoods sog, long orderCode, int deliveryTimeLimit, String unit) {  
111 - String logPrefix = "seller skup paid by buyer";  
112 - Integer sellerUid = sog.getUid();  
113 - String prdName = sog.getProductName();  
114 - String sizeName = sog.getSizeName();  
115 - try {  
116 - String goodsTypeTag = buildGoodsTypeTagForSeller(sog);  
117 - Product product = productMapper.selectByPrimaryKey(sog.getProductId());  
118 - String productCode = product.getProductCode();  
119 - String timelimitDesc = new StringBuilder().append(deliveryTimeLimit).append(unit).toString();  
120 - newSellerNotice(sog)  
121 - .withLogPrefix(logPrefix)  
122 - .withInBox(InboxBusinessTypeEnum.SALE_SEND, goodsTypeTag,prdName, sizeName,productCode, timelimitDesc)  
123 - .withPush(()->ufoSendService.sellerGoodsSend(String.valueOf(sellerUid),String.valueOf(orderCode),prdName,sizeName,productCode,timelimitDesc))  
124 - .withSms(InboxBusinessTypeEnum.SMS_NOTIFIED_SEND,goodsTypeTag,prdName,sizeName,productCode,orderCode,timelimitDesc)  
125 - .send();  
126 - } catch (Exception e) {  
127 - log.warn("{} fail, sellerUid {}, prdName {} ", logPrefix,sellerUid, prdName, e);  
128 - }  
129 - }  
130 -  
131 -  
132 - public void sellerOverSeasSkupPaidByBuyer(SellerOrderGoods sog, long orderCode, int deliveryTimeLimit, String unit) {  
133 - String logPrefix = "seller overseas skup paid by buyer";  
134 - Integer sellerUid = sog.getUid();  
135 - String prdName = sog.getProductName();  
136 - String sizeName = sog.getSizeName();  
137 - try {  
138 - String goodsTypeTag = buildGoodsTypeTagForSeller(sog);  
139 - Product product = productMapper.selectByPrimaryKey(sog.getProductId());  
140 - String productCode = product.getProductCode();  
141 - String timelimitDesc = new StringBuilder().append(deliveryTimeLimit).append(unit).toString();  
142 - newSellerNotice(sog)  
143 - .withLogPrefix(logPrefix)  
144 - .withInBox(InboxBusinessTypeEnum.SALE_SEND, goodsTypeTag,prdName, sizeName,productCode, timelimitDesc)  
145 - .withPush(()->ufoSendService.sellerGoodsSend(String.valueOf(sellerUid),String.valueOf(orderCode),prdName,sizeName,productCode,timelimitDesc))  
146 - .withSms(InboxBusinessTypeEnum.SMS_NOTIFIED_SEND,goodsTypeTag,prdName,sizeName,productCode,orderCode,timelimitDesc)  
147 - .send();  
148 - } catch (Exception e) {  
149 - log.warn("{} fail, sellerUid {}, prdName {} ", logPrefix,sellerUid, prdName, e);  
150 - }  
151 - }  
152 -  
153 /** 93 /**
154 * 鉴定结束发货,发送站内信和短信 94 * 鉴定结束发货,发送站内信和短信
155 * @param uid 95 * @param uid
@@ -159,7 +99,6 @@ public class InBoxFacade extends BaseNoticeFacade{ @@ -159,7 +99,6 @@ public class InBoxFacade extends BaseNoticeFacade{
159 */ 99 */
160 public void sendInboxSmsWhenAppraiseFinished(InboxBusinessTypeEnum inbox, InboxBusinessTypeEnum sms, 100 public void sendInboxSmsWhenAppraiseFinished(InboxBusinessTypeEnum inbox, InboxBusinessTypeEnum sms,
161 int uid, String prdName, String productCode,String wayBillCode){ 101 int uid, String prdName, String productCode,String wayBillCode){
162 -  
163 try { 102 try {
164 executorService.execute(() -> { 103 executorService.execute(() -> {
165 String params = buildParams(prdName, productCode); 104 String params = buildParams(prdName, productCode);
@@ -217,51 +156,6 @@ public class InBoxFacade extends BaseNoticeFacade{ @@ -217,51 +156,6 @@ public class InBoxFacade extends BaseNoticeFacade{
217 } 156 }
218 157
219 /** 158 /**
220 - * 交易关闭:订单生成,平台鉴定不通过  
221 - *  
222 - * @param sog  
223 - */  
224 - public void noticeSellerWhenAppraiseFail(SellerOrderGoods sog,long orderCode ,String wayBillCode) {  
225 - Integer sellerUid = sog.getUid();  
226 - String prdName = sog.getProductName();  
227 - String sizeName = sog.getSizeName();  
228 - String goodsTypeTag = buildGoodsTypeTagForSeller(sog);  
229 - try {  
230 - executorService.execute(() -> {  
231 - Product product = productMapper.selectByPrimaryKey(sog.getProductId());  
232 - String productCode = product.getProductCode();  
233 - InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_CLOSED_PLATFORM;  
234 - String params = buildParams(goodsTypeTag,prdName, sizeName,productCode);  
235 - InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);  
236 -  
237 - InBoxResponse resp = inBoxSDK.addInbox(req);  
238 - log.info("record noticeSellerWhenAppraiseFail inbox msg, SellerOrderGoods {} sellerUid {}, prdName {} orderCode {},wayBillCode {} resp {}",  
239 - JSON.toJSONString(sog), sellerUid, prdName,orderCode ,wayBillCode, resp);  
240 -  
241 -  
242 - //短信  
243 - String phone = userProxyService.getMobile(sellerUid);  
244 - if (StringUtils.isBlank(phone)){  
245 - log.warn("record noticeSellerWhenAppraiseFail sms send fail cause of empty phone number,sellerUid {}, prdName {} ,wayBillCode {}", sellerUid, prdName,wayBillCode);  
246 - return;  
247 - }  
248 - List<String> mobileList = Arrays.asList(phone);  
249 - String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_SELLER_WHEN_CLOSED_PLATFORM.getContent(),goodsTypeTag,prdName,sizeName,productCode,orderCode,wayBillCode);  
250 - sendSmsService.smsSendByMobile(content, mobileList);  
251 - log.info("record noticeSellerWhenAppraiseFail sms send,sellerUid {}, prdName {},orderCode {},wayBillCode {} ",  
252 - sellerUid, prdName,orderCode,wayBillCode);  
253 - });  
254 -  
255 - } catch (Exception e) {  
256 - log.warn("InBoxFacade noticeSellerWhenAppraiseFail error inbox msg, sellerUid {}, prdName {} ",  
257 - sellerUid, prdName, e);  
258 - }  
259 - }  
260 -  
261 -  
262 -  
263 -  
264 - /**  
265 * 更低的出价提醒 159 * 更低的出价提醒
266 * @param sog 160 * @param sog
267 */ 161 */
@@ -307,101 +201,6 @@ public class InBoxFacade extends BaseNoticeFacade{ @@ -307,101 +201,6 @@ public class InBoxFacade extends BaseNoticeFacade{
307 } 201 }
308 } 202 }
309 203
310 -  
311 -  
312 -  
313 -  
314 -  
315 - /**  
316 - * 鉴定中心把 买家取消(卖家已发货给中心)的物品,顺丰到付寄给卖家  
317 - */  
318 - public void sendCancelledProductToSellerByCenter(int sellerUid,Long orderCode,SellerOrderGoods sog,String wayBillCode){  
319 - try {  
320 - executorService.execute(() -> {  
321 - log.info("record sendCancelledProductToSeller inbox sms msg,sellerUid {},orderCode {},sellerOrderGoods {}, wayBillCode {}",  
322 - sellerUid, orderCode,sog,wayBillCode);  
323 - String goodsTypeTag = buildGoodsTypeTagForSeller(sog);  
324 - String prdName = sog.getProductName();  
325 - String sizeName = sog.getSizeName();  
326 - Product product = productMapper.selectByPrimaryKey(sog.getProductId());  
327 - String productCode = product.getProductCode();  
328 - //消息  
329 - InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_EXPRESS_CANCELLED_BY_BUYER_AFTER_DELIVERY;  
330 - String params = buildParams(goodsTypeTag,prdName,sizeName,productCode,wayBillCode);  
331 - InboxReqVO inBoxReq = buildInboxReqVO(sellerUid, params, ibt);  
332 -  
333 - InBoxResponse resp = inBoxSDK.addInbox(inBoxReq);  
334 - log.info("InBoxFacade sendCancelledProductToSeller inbox msg, sellerUid {},orderCode {},sellerOrderGoods {}, wayBillCode {},resp {}",  
335 - sellerUid, orderCode,sog,wayBillCode,resp);  
336 -  
337 - //短信  
338 - String phone = userProxyService.getMobile(sellerUid);  
339 - log.info("sendCancelledProductToSeller wayBillCode sms send get phone {},sellerUid {}, wayBillCode {}",  
340 - phone,sellerUid,wayBillCode);  
341 - if (StringUtils.isBlank(phone)){  
342 - log.warn("sendCancelledProductToSeller wayBillCode sms send fail cause of phone blank,sellerUid {}, wayBillCode {}",  
343 - sellerUid,wayBillCode);  
344 - return;  
345 - }  
346 -  
347 - List<String> mobileList = Arrays.asList(phone);  
348 - String content = getReplacedContent(InboxBusinessTypeEnum.SMS_CANCELED_BY_BUYER_AFTER_RECEIVED.getContent(),goodsTypeTag,prdName,sizeName,productCode,orderCode,wayBillCode);  
349 -  
350 - sendSmsService.smsSendByMobile(content, mobileList);  
351 - log.info("record sendCancelledProductToSeller inbox sms msg end,sellerUid {}, wayBillCode {}, phone {},",  
352 - sellerUid, wayBillCode, phone);  
353 - });  
354 - } catch (Exception e) {  
355 - log.warn("InBoxFacade sendCancelledProductToSeller error inbox msg, sellerUid {}, wayBillCode {} ",  
356 - sellerUid, wayBillCode, e);  
357 - }  
358 - }  
359 -  
360 -  
361 - /**  
362 - * 无法鉴定寄回,给卖家消息  
363 - */  
364 - public void sellerAppraiseUnsure_send_back(SellerOrderGoods sog,long orderCode,String wayBillCode) {  
365 - Integer sellerUid = sog.getUid();  
366 - String prdName = sog.getProductName();  
367 - String sizeName = sog.getSizeName();  
368 - String goodsTypeTag = buildGoodsTypeTagForSeller(sog);  
369 - try {  
370 - executorService.execute(() -> {  
371 - Product product = productMapper.selectByPrimaryKey(sog.getProductId());  
372 - String productCode = product.getProductCode();  
373 - InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_UNSURE_SEND_BACK;  
374 - String params = buildParams(goodsTypeTag,prdName, sizeName,productCode);  
375 - InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);  
376 -  
377 - InBoxResponse resp = inBoxSDK.addInbox(req);  
378 - log.info("record sellerAppraiseUnsure_send_back inbox msg, SellerOrderGoods {} ,sellerUid {}, prdName {}, sizeName {}, resp {}",  
379 - JSON.toJSONString(sog),sellerUid, prdName, sizeName , resp);  
380 -  
381 - //短信  
382 - String phone = userProxyService.getMobile(sellerUid);  
383 - if (StringUtils.isBlank(phone)){  
384 - log.warn("sellerAppraiseUnsure_send_back sms send fail,sellerUid {}, prdName {}", sellerUid, prdName);  
385 - return;  
386 - }  
387 - List<String> mobileList = Arrays.asList(phone);  
388 - InboxBusinessTypeEnum sms = InboxBusinessTypeEnum.SMS_NOTICE_SELLER_WHEN_APPRAISE_UNSURE_SEND_BACK;  
389 -  
390 - String content = getReplacedContent(sms.getContent(),goodsTypeTag,prdName,sizeName,productCode,orderCode,wayBillCode);  
391 - sendSmsService.smsSendByMobile(content, mobileList);  
392 - log.info("record sellerAppraiseUnsure_send_back inbox sms msg,sellerUid {}, prdName {},orderCode {}",  
393 - sellerUid, prdName,orderCode);  
394 - });  
395 -  
396 - } catch (Exception e) {  
397 - log.warn("InBoxFacade sellerAppraiseUnsure_send_back error inbox msg, sellerUid {}, prdName {} ",  
398 - sellerUid, prdName, e);  
399 - }  
400 - }  
401 -  
402 -  
403 -  
404 -  
405 public void buyerCancelBeforeDepotReceive(@NonNull BuyerOrder buyerOrder, String compesant, SellerOrderGoods sog, boolean useDepositGoods) { 204 public void buyerCancelBeforeDepotReceive(@NonNull BuyerOrder buyerOrder, String compesant, SellerOrderGoods sog, boolean useDepositGoods) {
406 buyerNoticeFacade.buyerCancelBeforeDepotReceive(buyerOrder, compesant, sog); 205 buyerNoticeFacade.buyerCancelBeforeDepotReceive(buyerOrder, compesant, sog);
407 sellerNoticeFacade.buyerCancelBeforeDepotReceive(buyerOrder, sog, useDepositGoods); 206 sellerNoticeFacade.buyerCancelBeforeDepotReceive(buyerOrder, sog, useDepositGoods);
@@ -686,7 +485,6 @@ public class InBoxFacade extends BaseNoticeFacade{ @@ -686,7 +485,6 @@ public class InBoxFacade extends BaseNoticeFacade{
686 485
687 } 486 }
688 487
689 -  
690 public void sendMessageWhenChangeOwner(Integer ownerUid,Long orderCode, 488 public void sendMessageWhenChangeOwner(Integer ownerUid,Long orderCode,
691 SellerOrderGoods sellerOrderGoods){ 489 SellerOrderGoods sellerOrderGoods){
692 InboxBusinessTypeEnum inboxType = InboxBusinessTypeEnum.NOTICE_BUYER_DEPOSIT_IN_STORAGE; 490 InboxBusinessTypeEnum inboxType = InboxBusinessTypeEnum.NOTICE_BUYER_DEPOSIT_IN_STORAGE;
@@ -709,9 +507,6 @@ public class InBoxFacade extends BaseNoticeFacade{ @@ -709,9 +507,6 @@ public class InBoxFacade extends BaseNoticeFacade{
709 507
710 } 508 }
711 509
712 -  
713 -  
714 -  
715 public void paidAppraiseOrderDeliverBackNotice(int uid,long orderCode, String expressNumber, AppraiseOrderStatus targetStatus){ 510 public void paidAppraiseOrderDeliverBackNotice(int uid,long orderCode, String expressNumber, AppraiseOrderStatus targetStatus){
716 log.info("enter paidAppraiseOrderDeliverBackNotice uid {} orderCode {} targetStatus {}", uid, orderCode, targetStatus); 511 log.info("enter paidAppraiseOrderDeliverBackNotice uid {} orderCode {} targetStatus {}", uid, orderCode, targetStatus);
717 try { 512 try {
@@ -791,4 +791,116 @@ public class SellerNoticeFacade extends BaseNoticeFacade { @@ -791,4 +791,116 @@ public class SellerNoticeFacade extends BaseNoticeFacade {
791 } 791 }
792 } 792 }
793 793
  794 + /**
  795 + * 卖家发货提醒,买家支付购买后
  796 + *
  797 + * @param sog
  798 + */
  799 + public void sellerSkupPaidByBuyer(SellerOrderGoods sog, long orderCode, int deliveryTimeLimit, String unit) {
  800 + String logPrefix = "seller skup paid by buyer";
  801 + Integer sellerUid = sog.getUid();
  802 + String prdName = sog.getProductName();
  803 + String sizeName = sog.getSizeName();
  804 + try {
  805 + String goodsTypeTag = buildGoodsTypeTagForSeller(sog);
  806 + Product product = productMapper.selectByPrimaryKey(sog.getProductId());
  807 + String productCode = product.getProductCode();
  808 + String timelimitDesc = new StringBuilder().append(deliveryTimeLimit).append(unit).toString();
  809 + newSellerNotice(sog)
  810 + .withLogPrefix(logPrefix)
  811 + .withInBox(InboxBusinessTypeEnum.SALE_SEND, goodsTypeTag, prdName, sizeName, productCode, timelimitDesc)
  812 + .withPush(() -> ufoSendService.sellerGoodsSend(String.valueOf(sellerUid), String.valueOf(orderCode), prdName, sizeName, productCode, timelimitDesc))
  813 + .withSms(InboxBusinessTypeEnum.SMS_NOTIFIED_SEND, goodsTypeTag, prdName, sizeName, productCode, orderCode, timelimitDesc)
  814 + .send();
  815 + } catch (Exception e) {
  816 + log.warn("{} fail, sellerUid {}, prdName {} ", logPrefix, sellerUid, prdName, e);
  817 + }
  818 + }
  819 +
  820 + public void sellerOverSeasSkupPaidByBuyer(SellerOrderGoods sog, long orderCode, int deliveryTimeLimit, String unit) {
  821 + String logPrefix = "seller overseas skup paid by buyer";
  822 + Integer sellerUid = sog.getUid();
  823 + String prdName = sog.getProductName();
  824 + String sizeName = sog.getSizeName();
  825 + try {
  826 + String goodsTypeTag = buildGoodsTypeTagForSeller(sog);
  827 + Product product = productMapper.selectByPrimaryKey(sog.getProductId());
  828 + String productCode = product.getProductCode();
  829 + String timelimitDesc = new StringBuilder().append(deliveryTimeLimit).append(unit).toString();
  830 + newSellerNotice(sog)
  831 + .withLogPrefix(logPrefix)
  832 + .withInBox(InboxBusinessTypeEnum.SALE_SEND, goodsTypeTag, prdName, sizeName, productCode, timelimitDesc)
  833 + .withPush(() -> ufoSendService.sellerGoodsSend(String.valueOf(sellerUid), String.valueOf(orderCode), prdName, sizeName, productCode, timelimitDesc))
  834 + .withSms(InboxBusinessTypeEnum.SMS_NOTIFIED_SEND, goodsTypeTag, prdName, sizeName, productCode, orderCode, timelimitDesc)
  835 + .send();
  836 + } catch (Exception e) {
  837 + log.warn("{} fail, sellerUid {}, prdName {} ", logPrefix, sellerUid, prdName, e);
  838 + }
  839 + }
  840 +
  841 + /**
  842 + * 交易关闭:订单生成,平台鉴定不通过
  843 + *
  844 + * @param sog
  845 + */
  846 + public void noticeSellerWhenAppraiseFail(SellerOrderGoods sog, long orderCode, String wayBillCode) {
  847 + Integer sellerUid = sog.getUid();
  848 + String prdName = sog.getProductName();
  849 + String sizeName = sog.getSizeName();
  850 + String goodsTypeTag = buildGoodsTypeTagForSeller(sog);
  851 + try {
  852 + Product product = productMapper.selectByPrimaryKey(sog.getProductId());
  853 + String productCode = product.getProductCode();
  854 + newSellerNotice(sog)
  855 + .withLogPrefix("notice seller when appraise fail")
  856 + .withInBox(InboxBusinessTypeEnum.SALE_CLOSED_PLATFORM, goodsTypeTag, prdName, sizeName, productCode)
  857 + .withSms(InboxBusinessTypeEnum.SMS_NOTICE_SELLER_WHEN_CLOSED_PLATFORM, goodsTypeTag, prdName, sizeName, productCode, orderCode, wayBillCode)
  858 + .send();
  859 + } catch (Exception e) {
  860 + log.warn("notice seller when appraise fail fail, sellerUid {}, prdName {} ", sellerUid, prdName, e);
  861 + }
  862 + }
  863 +
  864 + /**
  865 + * 鉴定中心把 买家取消(卖家已发货给中心)的物品,顺丰到付寄给卖家
  866 + */
  867 + public void sendCancelledProductToSellerByCenter(int sellerUid, Long orderCode, SellerOrderGoods sog, String wayBillCode) {
  868 + try {
  869 + String goodsTypeTag = buildGoodsTypeTagForSeller(sog);
  870 + String prdName = sog.getProductName();
  871 + String sizeName = sog.getSizeName();
  872 + Product product = productMapper.selectByPrimaryKey(sog.getProductId());
  873 + String productCode = product.getProductCode();
  874 + newSellerNotice(sog)
  875 + .withLogPrefix("notice send cancelled product to seller by center")
  876 + .withInBox(InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_EXPRESS_CANCELLED_BY_BUYER_AFTER_DELIVERY, goodsTypeTag, prdName, sizeName, productCode, wayBillCode)
  877 + .withSms(InboxBusinessTypeEnum.SMS_CANCELED_BY_BUYER_AFTER_RECEIVED, goodsTypeTag, prdName, sizeName, productCode, orderCode, wayBillCode)
  878 + .send();
  879 + } catch (Exception e) {
  880 + log.warn("notice send cancelled product to seller by center fail, sellerUid {}, wayBillCode {} ", sellerUid, wayBillCode, e);
  881 + }
  882 + }
  883 +
  884 + /**
  885 + * 无法鉴定寄回,给卖家消息
  886 + */
  887 + public void sellerAppraiseUnsureSendBack(SellerOrderGoods sog, long orderCode, String wayBillCode) {
  888 + Integer sellerUid = sog.getUid();
  889 + String prdName = sog.getProductName();
  890 + String sizeName = sog.getSizeName();
  891 + String goodsTypeTag = buildGoodsTypeTagForSeller(sog);
  892 + try {
  893 + Product product = productMapper.selectByPrimaryKey(sog.getProductId());
  894 + String productCode = product.getProductCode();
  895 + InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_UNSURE_SEND_BACK;
  896 + newSellerNotice(sog)
  897 + .withLogPrefix("notice seller appraise unsure send back")
  898 + .withInBox(InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_UNSURE_SEND_BACK, goodsTypeTag, prdName, sizeName, productCode)
  899 + .withSms(InboxBusinessTypeEnum.SMS_NOTICE_SELLER_WHEN_APPRAISE_UNSURE_SEND_BACK, goodsTypeTag, prdName, sizeName, productCode, orderCode, wayBillCode)
  900 + .send();
  901 + } catch (Exception e) {
  902 + log.warn("notice seller appraise unsure send back fail, sellerUid {}, prdName {} ", sellerUid, prdName, e);
  903 + }
  904 + }
  905 +
794 } 906 }