...
|
...
|
@@ -183,7 +183,7 @@ public class InBoxFacade { |
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public void appraisePassNotice(int buyerUid, long orderCode, SellerOrderGoods psog,Product product) {
|
|
|
public void appraisePassNoticeBuyer(int buyerUid, long orderCode, SellerOrderGoods psog,Product product) {
|
|
|
|
|
|
executorService.execute(()->{
|
|
|
|
...
|
...
|
@@ -191,6 +191,7 @@ public class InBoxFacade { |
|
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} product {}",
|
|
|
buyerUid, orderCode, psog, JSON.toJSONString(psog), JSON.toJSONString(product));
|
|
|
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);
|
...
|
...
|
@@ -200,6 +201,35 @@ public class InBoxFacade { |
|
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, prdName {},SellerOrderGoods {} resp {}",
|
|
|
buyerUid, orderCode, prdName, JSON.toJSONString(psog), resp);
|
|
|
|
|
|
//短信
|
|
|
String phone = userProxyService.getMobile(buyerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
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,sizeName,productCode,orderCode);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record appraisePassNotice notice buyer sms msg, buyerUid {}, orderCode {}, prdName {} phone {}",
|
|
|
buyerUid, orderCode,prdName, phone);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
logger.warn("InBoxFacade appraisePassNotice error inbox msg, buyerUid {}, orderCode {} ,psog {}",
|
|
|
buyerUid, orderCode, psog, e);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
public void appraisePassNoticeSeller(int buyerUid, long orderCode, SellerOrderGoods psog,Product product) {
|
|
|
|
|
|
executorService.execute(()->{
|
|
|
|
|
|
try {
|
|
|
logger.info("record appraisePassNoticeSeller inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} product {}",
|
|
|
buyerUid, orderCode, psog, JSON.toJSONString(psog), JSON.toJSONString(product));
|
|
|
String prdName = psog.getProductName();
|
|
|
String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
|
|
|
|
|
//seller notice
|
|
|
String sizeName = psog.getSizeName();
|
|
|
Integer sellerUid = psog.getUid();
|
...
|
...
|
@@ -208,32 +238,21 @@ public class InBoxFacade { |
|
|
InboxReqVO reqOfSeller = buildInboxReqVO(sellerUid, paramsOfSeller, ibtOfSeller);
|
|
|
|
|
|
InBoxResponse respOfSeller = inBoxSDK.addInbox(reqOfSeller);
|
|
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, prdName {} ,sizeName {} ,resp {}",
|
|
|
logger.info("record appraisePassNoticeSeller inbox msg, buyerUid {}, orderCode {}, prdName {} ,sizeName {} ,resp {}",
|
|
|
buyerUid, orderCode, prdName,sizeName, respOfSeller);
|
|
|
String phoneOfSeller = userProxyService.getMobile(sellerUid);
|
|
|
if (StringUtils.isBlank(phoneOfSeller)){
|
|
|
logger.warn("in appraisePassNotice sms fail, buyerUid {} orderCode {} prdName {} ", buyerUid, orderCode,prdName);
|
|
|
logger.warn("in appraisePassNoticeSeller sms fail, buyerUid {} orderCode {} prdName {} ", buyerUid, orderCode,prdName);
|
|
|
}else{
|
|
|
List<String> mobileList = Arrays.asList(phoneOfSeller);
|
|
|
String contentOfSeller = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_SELLER_WHEN_APPRAISE_PASS.getContent(), orderCode);
|
|
|
sendSmsService.smsSendByMobile(contentOfSeller, mobileList);
|
|
|
logger.info("record appraisePassNotice sms msg notice seller, sellerUid {}, orderCode {}, prdName {} sizeName {} phone {}",
|
|
|
logger.info("record appraisePassNoticeSeller sms msg notice seller, sellerUid {}, orderCode {}, prdName {} sizeName {} phone {}",
|
|
|
sellerUid, orderCode, prdName, sizeName, phoneOfSeller);
|
|
|
}
|
|
|
|
|
|
//短信
|
|
|
String phone = userProxyService.getMobile(buyerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
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,sizeName,productCode,orderCode);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record appraisePassNotice notice buyer sms msg, buyerUid {}, orderCode {}, prdName {} phone {}",
|
|
|
buyerUid, orderCode,prdName, phone);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
logger.warn("InBoxFacade appraisePassNotice error inbox msg, buyerUid {}, orderCode {} ,psog {}",
|
|
|
logger.warn("InBoxFacade appraisePassNoticeSeller error inbox msg, buyerUid {}, orderCode {} ,psog {}",
|
|
|
buyerUid, orderCode, psog, e);
|
|
|
}
|
|
|
});
|
...
|
...
|
|