...
|
...
|
@@ -307,6 +307,72 @@ public class InBoxFacade { |
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 瑕疵提醒,给买家消息
|
|
|
*/
|
|
|
public void buyerMiniFaultCreate(int buyerUid, long orderCode) {
|
|
|
try {
|
|
|
executorService.execute(() -> {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_PROBLEM_ORDER;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record buyerMiniFaultCreate inbox msg, buyerUid {} ,orderCode {} ,resp {}",
|
|
|
buyerUid, orderCode ,resp);
|
|
|
|
|
|
//短信
|
|
|
String phone = userProxyService.getMobile(buyerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
logger.warn("buyerMiniFaultCreate sms send fail,buyerUid {} ,orderCode {}", buyerUid, orderCode);
|
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_CHECK_ORDER_PROBLEM.getContent(),orderCode);
|
|
|
sendSmsService.smsSendByMobile(content, mobileList);
|
|
|
logger.info("record buyerMiniFaultCreate inbox sms msg,buyerUid {}, porderCode {}",
|
|
|
buyerUid ,orderCode);
|
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.warn("InBoxFacade buyerMiniFaultCreate error inbox msg, buyerUid {},orderCode {} ",
|
|
|
buyerUid, orderCode , e);
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
* 不接受瑕疵,给买家消息
|
|
|
*/
|
|
|
public void buyerMiniFaultUnAccept(int buyerUid, long orderCode,String prdName) {
|
|
|
|
|
|
try {
|
|
|
executorService.execute(() -> {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_MINI_FAULT_UN_ACCEPT;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record buyerQualityCheckNotPass inbox msg, buyerUid {} ,orderCode {},prdName {} ,resp {}",
|
|
|
buyerUid, orderCode, prdName ,resp);
|
|
|
|
|
|
//短信
|
|
|
String phone = userProxyService.getMobile(buyerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
logger.warn("buyerQualityCheckNotPass sms send fail,buyerUid {} ,orderCode {}", buyerUid, orderCode);
|
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_MINI_FAULT_UN_ACCEPT.getContent(),prdName,orderCode);
|
|
|
sendSmsService.smsSendByMobile(content, mobileList);
|
|
|
logger.info("record buyerQualityCheckNotPass inbox sms msg,buyerUid {}, prdName {},orderCode {}",
|
|
|
buyerUid , prdName,orderCode);
|
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.warn("InBoxFacade sellerSkupPaidByBuyer error inbox msg, buyerUid {},orderCode {}, prdName {} ",
|
|
|
buyerUid, orderCode ,prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/*********************************************************************
|
|
|
* 卖家消息
|
|
|
********************************************************************/
|
...
|
...
|
@@ -403,6 +469,43 @@ public class InBoxFacade { |
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 质检不通过,给卖家消息
|
|
|
*/
|
|
|
public void sellerQualityCheckNotPass(SellerOrderGoods sog,long orderCode,String wayBillCode) {
|
|
|
Integer sellerUid = sog.getUid();
|
|
|
String prdName = sog.getProductName();
|
|
|
String sizeName = sog.getSizeName();
|
|
|
try {
|
|
|
executorService.execute(() -> {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_QUALITY_CHECK_REJECT;
|
|
|
String params = buildParams(prdName, sizeName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerQualityCheckNotPass inbox msg, SellerOrderGoods {} ,sellerUid {}, prdName {}, sizeName {},resp {}",
|
|
|
JSON.toJSONString(sog),sellerUid, prdName, sizeName, resp);
|
|
|
|
|
|
//短信
|
|
|
String phone = userProxyService.getMobile(sellerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
logger.warn("sellerQualityCheckNotPass sms send fail,sellerUid {}, prdName {}", sellerUid, prdName);
|
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_SELLER_WHEN_QUALITY_CHECK_REJECT.getContent(),prdName,orderCode,wayBillCode);
|
|
|
sendSmsService.smsSendByMobile(content, mobileList);
|
|
|
logger.info("record sellerQualityCheckNotPass inbox sms msg,sellerUid {}, prdName {},orderCode {}",
|
|
|
sellerUid, prdName,orderCode);
|
|
|
});
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.warn("InBoxFacade sellerSkupPaidByBuyer error inbox msg, sellerUid {}, prdName {} ",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 卖家发货提醒,买家支付购买后
|
|
|
*
|
|
|
* @param sog SellerOrderGoods
|
...
|
...
|
|