...
|
...
|
@@ -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,27 +201,6 @@ public class InBoxFacade { |
|
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, prdName {},SellerOrderGoods {} resp {}",
|
|
|
buyerUid, orderCode, prdName, JSON.toJSONString(psog), resp);
|
|
|
|
|
|
//seller notice
|
|
|
String sizeName = psog.getSizeName();
|
|
|
Integer sellerUid = psog.getUid();
|
|
|
InboxBusinessTypeEnum ibtOfSeller = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_PASS;
|
|
|
String paramsOfSeller = buildParams(prdName, sizeName);
|
|
|
InboxReqVO reqOfSeller = buildInboxReqVO(sellerUid, paramsOfSeller, ibtOfSeller);
|
|
|
|
|
|
InBoxResponse respOfSeller = inBoxSDK.addInbox(reqOfSeller);
|
|
|
logger.info("record appraisePassNotice 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);
|
|
|
}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 {}",
|
|
|
sellerUid, orderCode, prdName, sizeName, phoneOfSeller);
|
|
|
}
|
|
|
|
|
|
//短信
|
|
|
String phone = userProxyService.getMobile(buyerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
...
|
...
|
@@ -239,6 +219,45 @@ public class InBoxFacade { |
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
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();
|
|
|
InboxBusinessTypeEnum ibtOfSeller = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_PASS;
|
|
|
String paramsOfSeller = buildParams(prdName, sizeName);
|
|
|
InboxReqVO reqOfSeller = buildInboxReqVO(sellerUid, paramsOfSeller, ibtOfSeller);
|
|
|
|
|
|
InBoxResponse respOfSeller = inBoxSDK.addInbox(reqOfSeller);
|
|
|
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 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 appraisePassNoticeSeller sms msg notice seller, sellerUid {}, orderCode {}, prdName {} sizeName {} phone {}",
|
|
|
sellerUid, orderCode, prdName, sizeName, phoneOfSeller);
|
|
|
}
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
logger.warn("InBoxFacade appraisePassNoticeSeller error inbox msg, buyerUid {}, orderCode {} ,psog {}",
|
|
|
buyerUid, orderCode, psog, e);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
private String replaceSMSContent(InboxBusinessTypeEnum ibte, Object... params){
|
|
|
return getReplacedContent(ibte.getContent(), params);
|
|
|
}
|
...
|
...
|
|