...
|
...
|
@@ -188,6 +188,9 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
}
|
|
|
private String replaceSMSContent(InboxBusinessTypeEnum ibte, Object... params){
|
|
|
return getReplacedContent(ibte.getContent(), params);
|
|
|
}
|
|
|
|
|
|
private String getReplacedContent(String content ,Object... params) {
|
|
|
return MessageFormatter.arrayFormat(content, params).getMessage();
|
...
|
...
|
@@ -1075,6 +1078,45 @@ public class InBoxFacade { |
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 买家在24小时内取消预售
|
|
|
* 站内:您的商品「商品名称」「尺码」,已被买家取消,您出售的商品已下架,保证金将于1个工作日内退回您的账户。
|
|
|
* 短信:买家已取消订单,订单编号{}。您的商品「商品名称」已下架,更多信息请查看Yoho!Buy有货APP [我的-球鞋交易-出售]。
|
|
|
*/
|
|
|
public void noticeSellerWhenBuyerCancelNoResponsibility(SellerOrderGoods sog, long orderCode){
|
|
|
|
|
|
Integer sellerUid = sog.getUid();
|
|
|
String prdName = sog.getProductName();
|
|
|
String sizeName = sog.getSizeName();
|
|
|
try {
|
|
|
executorService.execute(()->{
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_BUYER_CANCEL_NO_RESPONSIBILITY;
|
|
|
String params = buildParams(prdName, sizeName, orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record noticeSellerWhenBuyerCancelNoResponsibility to seller inbox msg, sellerUid {}, orderCode {},prdName {} resp {}",
|
|
|
sellerUid, orderCode,prdName, resp);
|
|
|
|
|
|
//短信
|
|
|
String phone = userProxyService.getMobile(sellerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
logger.warn("in noticeSellerWhenBuyerCancelNoResponsibility sms fail, sellerUid {} orderCode {} prdName {}", sellerUid, orderCode,prdName);
|
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
|
|
|
String content = replaceSMSContent(InboxBusinessTypeEnum.SMS_NOTICE_SELLER_WHEN_BUYER_CANCEL_NO_RESPONSIBILITY, orderCode, prdName);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record noticeSellerWhenBuyerCancelNoResponsibility inbox sms msg, sellerUid {}, orderCode {},prdName {}",
|
|
|
sellerUid, orderCode, prdName);
|
|
|
});
|
|
|
} catch (Exception e) {
|
|
|
logger.warn("InBoxFacade noticeSellerWhenBuyerCancelNoResponsibility error inbox msg, sellerUid {}, orderCode {} ,prdName {}",
|
|
|
sellerUid, orderCode, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void buyerCancelBeforeSellerDeliver(int buyerUid, long orderCode,String compesant, SellerOrderGoods sog) {
|
|
|
Integer sellerUid = sog.getUid();
|
|
|
String prdName = sog.getProductName();
|
...
|
...
|
@@ -1103,8 +1145,6 @@ public class InBoxFacade { |
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
//SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_PLATFORM;
|
|
|
//String content=smsIbt.getReplacedContent(prdName);
|
|
|
|
|
|
String content= getReplacedContent(InboxBusinessTypeEnum.SMS_CANCELED_BY_BUYER_AFTER_PAID.getContent(),orderCode,prdName);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
...
|
...
|
|