|
|
package com.yohoufo.order.service.proxy;
|
|
|
|
|
|
import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum;
|
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.inboxclient.model.InBoxResponse;
|
|
|
import com.yohoufo.inboxclient.model.InboxReqVO;
|
|
|
import com.yohoufo.inboxclient.sdk.InBoxSDK;
|
...
|
...
|
@@ -56,7 +57,7 @@ public class InBoxFacade { |
|
|
buyerUid, orderCode, resp);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade buyerOrderNotPayed error inbox msg, buyerUid {}, orderCode {} ,error {}",
|
|
|
logger.warn("InBoxFacade buyerOrderNotPayed error inbox msg, buyerUid {}, orderCode {} ",
|
|
|
buyerUid, orderCode, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -79,48 +80,102 @@ public class InBoxFacade { |
|
|
buyerUid, orderCode, resp);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade buyerFinishPaid error inbox msg, buyerUid {}, orderCode {} ,error {}",
|
|
|
logger.warn("InBoxFacade buyerFinishPaid error inbox msg, buyerUid {}, orderCode {} ",
|
|
|
buyerUid, orderCode, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 卖家发货后
|
|
|
* @param buyerUid
|
|
|
* @param orderCode
|
|
|
* @param prdName
|
|
|
*/
|
|
|
public void sellerDeliver2Depot(int buyerUid, long orderCode, String prdName){
|
|
|
executorService.execute(()-> {
|
|
|
try {
|
|
|
|
|
|
InboxBusinessTypeEnum ibtOfBuyer = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_SELLER_DELIVER;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibtOfBuyer);
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerDeliver2Depot inbox msg, buyerUid {}, orderCode {}, prdName {} resp {}",
|
|
|
buyerUid, orderCode, prdName, resp);
|
|
|
|
|
|
//sms
|
|
|
String phone = userProxyService.getMobile(buyerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
logger.warn("in sellerDeliver2Depot sms fail, buyerUid {} orderCode {} prdName {} ", buyerUid, orderCode,prdName);
|
|
|
return;
|
|
|
}
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_SELLER_DELIVER.getContent(),prdName);
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record sellerDeliver2Depot inbox sms msg, buyerUid {}, orderCode {}, prdName {} phone {}",
|
|
|
buyerUid, orderCode, prdName, phone);
|
|
|
|
|
|
} catch (Exception ex) {
|
|
|
logger.warn("InBoxFacade depotDeliver2Buyer error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
|
|
buyerUid, orderCode,prdName, ex);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 平台已发货给买家
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public void depotDeliver2Buyer(int buyerUid, long orderCode, String prdName) {
|
|
|
public void appraisePassNotice(int buyerUid, long orderCode, SellerOrderGoods psog) {
|
|
|
|
|
|
executorService.execute(()->{
|
|
|
|
|
|
try {
|
|
|
String prdName = psog.getProductName();
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_SENDED;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record depotDeliver2Buyer inbox msg, buyerUid {}, orderCode {}, prdName {} resp {}",
|
|
|
buyerUid, orderCode,prdName, resp);
|
|
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, prdName {} resp {}",
|
|
|
buyerUid, orderCode, prdName, resp);
|
|
|
|
|
|
//seller notice
|
|
|
String sizeName = psog.getSizeName();
|
|
|
Integer sellerUid = psog.getUid();
|
|
|
InboxBusinessTypeEnum ibtOfSeller = InboxBusinessTypeEnum.PURCHASE_SENDED;
|
|
|
String paramsOfSeller = buildParams(prdName, sizeName);
|
|
|
InboxReqVO reqOfSeller = buildInboxReqVO(buyerUid, paramsOfSeller, ibtOfSeller);
|
|
|
|
|
|
InBoxResponse respOfSeller = inBoxSDK.addInbox(reqOfSeller);
|
|
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, prdName {} resp {}",
|
|
|
buyerUid, orderCode, prdName, respOfSeller);
|
|
|
String phoneOfSeller = userProxyService.getMobile(sellerUid);
|
|
|
if (StringUtils.isBlank(phoneOfSeller)){
|
|
|
logger.warn("in appraisePassNotice sms fail, buyerUid {} orderCode {} prdName {} ", buyerUid, orderCode,prdName);
|
|
|
}else{
|
|
|
List<String> mobileList = Arrays.asList(phoneOfSeller);
|
|
|
String contentOfSeller = getReplacedContent(InboxBusinessTypeEnum.SMS_SEND.getContent(),prdName, sizeName);
|
|
|
sendSmsService.smsSendByMobile(contentOfSeller, mobileList);
|
|
|
logger.info("record appraisePassNotice sms msg notice seller, sellerUid {}, orderCode {}, prdName {} sizeName {} phone {}",
|
|
|
sellerUid, orderCode, prdName, sizeName, phoneOfSeller);
|
|
|
}
|
|
|
|
|
|
//短信
|
|
|
//InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_SEND;
|
|
|
//String smsparams = buildParams(orderCode);
|
|
|
//SmsContentEnum smsIbt=SmsContentEnum.SMS_SEND;
|
|
|
//String content=smsIbt.getReplacedContent(prdName);
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_SEND.getContent(),prdName);
|
|
|
|
|
|
String phone = userProxyService.getMobile(buyerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
logger.warn("in depotDeliver2Buyer sms fail, buyerUid {} orderCode {} prdName {} ", buyerUid, orderCode,prdName);
|
|
|
return;
|
|
|
logger.warn("in appraisePassNotice notice buyer sms fail, buyerUid {} orderCode {} prdName {} ", buyerUid, orderCode,prdName);
|
|
|
}else{
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_SEND.getContent(),prdName);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record appraisePassNotice notice buyer sms msg, buyerUid {}, orderCode {}, prdName {} phone {}",
|
|
|
buyerUid, orderCode,prdName, phone);
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record depotDeliver2Buyer inbox sms msg, buyerUid {}, orderCode {}, prdName {} phone {}",
|
|
|
buyerUid, orderCode,prdName, phone);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade depotDeliver2Buyer error inbox msg, buyerUid {}, orderCode {} ,prdName {} ,error {}",
|
|
|
buyerUid, orderCode,prdName, e);
|
|
|
logger.warn("InBoxFacade appraisePassNotice error inbox msg, buyerUid {}, orderCode {} ,psog {}",
|
|
|
buyerUid, orderCode, psog, e);
|
|
|
}
|
|
|
});
|
|
|
|
...
|
...
|
@@ -163,7 +218,7 @@ public class InBoxFacade { |
|
|
buyerUid, orderCode,prdName);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade noticeBuyerWhenSellerCancelAfterPaid error inbox msg, buyerUid {}, orderCode {} prdName {},error {}",
|
|
|
logger.warn("InBoxFacade noticeBuyerWhenSellerCancelAfterPaid error inbox msg, buyerUid {}, orderCode {} prdName {}",
|
|
|
buyerUid, orderCode,prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -183,7 +238,7 @@ public class InBoxFacade { |
|
|
buyerUid, orderCode, resp);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade buyerCancelOrder error inbox msg, buyerUid {}, orderCode {} ,error {}",
|
|
|
logger.warn("InBoxFacade buyerCancelOrder error inbox msg, buyerUid {}, orderCode {} ",
|
|
|
buyerUid, orderCode, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -221,7 +276,7 @@ public class InBoxFacade { |
|
|
buyerUid, orderCode,prdName);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade buyerGetEarnestMoneyWhenAppraiseFail error inbox msg, buyerUid {}, orderCode {} ,prdName {},error {}",
|
|
|
logger.warn("InBoxFacade buyerGetEarnestMoneyWhenAppraiseFail error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
|
|
buyerUid, orderCode,prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -243,7 +298,7 @@ public class InBoxFacade { |
|
|
sellerUid, prdName);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerOrderNotPaid error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade sellerOrderNotPaid error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -267,7 +322,7 @@ public class InBoxFacade { |
|
|
sellerUid, prdName, resp);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerPaidEarnestMoney error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade sellerPaidEarnestMoney error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -291,7 +346,7 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerPlaySelf error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade sellerPlaySelf error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
|
...
|
...
|
@@ -317,7 +372,7 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerSkupCreateOrderByBuyer error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade sellerSkupCreateOrderByBuyer error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -359,7 +414,7 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerSkupPaidByBuyer error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade sellerSkupPaidByBuyer error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -383,7 +438,7 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerCancelAfterBuyerPaid error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade sellerCancelAfterBuyerPaid error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -422,7 +477,7 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade noticSellerWhenBuyerCancel error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade noticSellerWhenBuyerCancel error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -446,7 +501,7 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade noticeSellerWhenAppraiseFail error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade noticeSellerWhenAppraiseFail error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -486,7 +541,7 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade notifyUnshelfCauseBySpecialReason error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade notifyUnshelfCauseBySpecialReason error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -510,7 +565,7 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sendMsg4EntySeller error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade sendMsg4EntySeller error inbox msg, sellerUid {}, prdName {} ",
|
|
|
uid, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -544,7 +599,7 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sendMsg4QuitEntrySeller error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade sendMsg4QuitEntrySeller error inbox msg, sellerUid {}, prdName {} ",
|
|
|
uid, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -576,7 +631,7 @@ public class InBoxFacade { |
|
|
sellerUid, wayBillCode, phone);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sendCancelledProductToSeller error inbox msg, sellerUid {}, wayBillCode {} ,error {}",
|
|
|
logger.warn("InBoxFacade sendCancelledProductToSeller error inbox msg, sellerUid {}, wayBillCode {} ",
|
|
|
sellerUid, wayBillCode, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -615,7 +670,7 @@ public class InBoxFacade { |
|
|
}
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerDeliverNotice error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
logger.warn("InBoxFacade sellerDeliverNotice error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -654,7 +709,7 @@ public class InBoxFacade { |
|
|
sellerUid, orderCode, prdName);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade buyerCancelBeforeDepotReceive error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
|
|
logger.warn("InBoxFacade buyerCancelBeforeDepotReceive error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
|
|
buyerUid, orderCode, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -693,7 +748,7 @@ public class InBoxFacade { |
|
|
sellerUid, orderCode, prdName);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade buyerCancelBeforeSellerDeliver error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
|
|
logger.warn("InBoxFacade buyerCancelBeforeSellerDeliver error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
|
|
buyerUid, orderCode, prdName, e);
|
|
|
}
|
|
|
}
|
...
|
...
|
|