...
|
...
|
@@ -117,6 +117,8 @@ public class InBoxFacade { |
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 卖家发货后
|
|
|
* @param buyerUid
|
...
|
...
|
@@ -218,17 +220,18 @@ public class InBoxFacade { |
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public void appraisePassNoticeBuyer(int buyerUid, long orderCode, SellerOrderGoods psog,Product product) {
|
|
|
public void appraisePassNoticeBuyer(int buyerUid, long orderCode, SellerOrderGoods psog) {
|
|
|
|
|
|
executorService.execute(()->{
|
|
|
|
|
|
try {
|
|
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} product {}",
|
|
|
buyerUid, orderCode, psog, JSON.toJSONString(psog), JSON.toJSONString(product));
|
|
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} ",
|
|
|
buyerUid, orderCode, psog, JSON.toJSONString(psog));
|
|
|
Product product = productMapper.selectByPrimaryKey(psog.getProductId());
|
|
|
String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
|
|
String skupTypeText=SkupType.getSkupType(psog.getAttributes()).attrName();
|
|
|
String prdName = psog.getProductName();
|
|
|
String sizeName = psog.getSizeName();
|
|
|
String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_SENDED;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
...
|
...
|
@@ -256,14 +259,15 @@ public class InBoxFacade { |
|
|
|
|
|
}
|
|
|
|
|
|
public void appraisePassNoticeSeller(int buyerUid, long orderCode, SellerOrderGoods psog,Product product) {
|
|
|
public void appraisePassNoticeSeller(int buyerUid, long orderCode, SellerOrderGoods psog) {
|
|
|
|
|
|
executorService.execute(()->{
|
|
|
|
|
|
try {
|
|
|
logger.info("record appraisePassNoticeSeller inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} product {}",
|
|
|
buyerUid, orderCode, psog, JSON.toJSONString(psog), JSON.toJSONString(product));
|
|
|
buyerUid, orderCode, psog, JSON.toJSONString(psog));
|
|
|
String prdName = psog.getProductName();
|
|
|
Product product = productMapper.selectByPrimaryKey(psog.getProductId());
|
|
|
String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
|
|
|
|
|
//seller notice
|
...
|
...
|
@@ -1755,11 +1759,20 @@ public class InBoxFacade { |
|
|
}
|
|
|
}
|
|
|
|
|
|
private void execute(Runnable task, String logModule, Object[] logParms){
|
|
|
try{
|
|
|
executorService.execute(task);
|
|
|
}catch (Exception ex){
|
|
|
|
|
|
logger.warn(logModule, logParms, ex);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void noticeWhenBuyerBlownCustomsClearance(int buyerUid, long orderCode, SellerOrderGoods sog){
|
|
|
String prdName = sog.getProductName();
|
|
|
String sizeName = sog.getSizeName();
|
|
|
try {
|
|
|
executorService.execute(()->{
|
|
|
|
|
|
Runnable task = ()->{
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.BUYER_BLOWN_CUSTOMS_CLEARANCE;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
...
|
...
|
@@ -1782,11 +1795,81 @@ public class InBoxFacade { |
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record noticeWhenBuyerBlownCustomsClearance inbox sms msg, buyer Uid {}, orderCode {},prdName {} ,sizeName {} ",
|
|
|
buyerUid, orderCode, prdName,sizeName);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.warn("InBoxFacade noticeWhenBuyerBlownCustomsClearance error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
|
|
buyerUid, orderCode, prdName, e);
|
|
|
};
|
|
|
String logModule = "InBoxFacade noticeWhenBuyerBlownCustomsClearance error inbox msg, buyerUid {}, orderCode {} ,prdName {}";
|
|
|
Object[] logparams = new Object[]{buyerUid, orderCode, prdName};
|
|
|
|
|
|
execute(task, logModule, logparams);
|
|
|
}
|
|
|
|
|
|
public void noticeWhenQuickDeliverOrderPaid(int buyerUid, long orderCode, SellerOrderGoods sog){
|
|
|
String prdName = sog.getProductName();
|
|
|
String sizeName = sog.getSizeName();
|
|
|
|
|
|
Runnable task = ()->{
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_QUICK_DELIVER_ORDER_PAID;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record noticeWhenQuickDeliverOrderPaid to buyer inbox msg, buyerUid {}, orderCode {},prdName {} resp {}",
|
|
|
buyerUid, orderCode,prdName, resp);
|
|
|
|
|
|
//短信
|
|
|
String phone = userProxyService.getMobile(buyerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
logger.warn("in noticeWhenQuickDeliverOrderPaid sms fail, buyerUid {} orderCode {} prdName {}", buyerUid, orderCode,prdName);
|
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
|
|
|
InboxBusinessTypeEnum sms=InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_QUICK_DELIVER_ORDER_PAID;
|
|
|
|
|
|
String content= getReplacedContent(sms.getContent(),prdName,sizeName,orderCode);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record noticeWhenQuickDeliverOrderPaid inbox sms msg, buyer Uid {}, orderCode {},prdName {} ,sizeName {} ",
|
|
|
buyerUid, orderCode, prdName,sizeName);
|
|
|
};
|
|
|
String logModule = "InBoxFacade noticeWhenQuickDeliverOrderPaid error inbox msg, buyerUid {}, orderCode {} ,prdName {}";
|
|
|
Object[] logparams = new Object[]{buyerUid, orderCode, prdName};
|
|
|
|
|
|
execute(task, logModule, logparams);
|
|
|
appraisePassNoticeSeller(buyerUid,orderCode, sog);
|
|
|
}
|
|
|
|
|
|
public void noticeWhenDepositOrderOfQuickDeliverGoodsPaid(int buyerUid, long orderCode, SellerOrderGoods sog){
|
|
|
String prdName = sog.getProductName();
|
|
|
String sizeName = sog.getSizeName();
|
|
|
|
|
|
Runnable task = ()->{
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_DEPOSIT_ORDER_OF_QUICK_DELIVER_PAID;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record noticeWhenDepositOrderOfPaid to buyer inbox msg, buyerUid {}, orderCode {},prdName {} resp {}",
|
|
|
buyerUid, orderCode,prdName, resp);
|
|
|
|
|
|
//短信
|
|
|
String phone = userProxyService.getMobile(buyerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
logger.warn("in noticeWhenDepositOrderOfPaid sms fail, buyerUid {} orderCode {} prdName {}", buyerUid, orderCode,prdName);
|
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
|
|
|
InboxBusinessTypeEnum sms=InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_DEPOSIT_ORDER_OF_QUICK_DELIVER_PAID;
|
|
|
|
|
|
String content= getReplacedContent(sms.getContent(),prdName,sizeName,orderCode);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record noticeWhenDepositOrderOfPaid inbox sms msg, buyer Uid {}, orderCode {},prdName {} ,sizeName {} ",
|
|
|
buyerUid, orderCode, prdName,sizeName);
|
|
|
};
|
|
|
String logModule = "InBoxFacade noticeWhenDepositOrderOfPaid error inbox msg, buyerUid {}, orderCode {} ,prdName {}";
|
|
|
Object[] logparams = new Object[]{buyerUid, orderCode, prdName};
|
|
|
execute(task, logModule, logparams);
|
|
|
//
|
|
|
appraisePassNoticeSeller(buyerUid,orderCode, sog);
|
|
|
}
|
|
|
|
|
|
// 召回的
|
...
|
...
|
|