Authored by qinchao

消息

... ... @@ -526,9 +526,16 @@ public class AppraiseService {
//鉴定不通过 ,其余的情况不发消息,改成寄回的时候再发消息
inBoxFacade.noticeSellerWhenAppraiseFail(sellerOrderGoods, orderCode, wayBillCode);
inBoxFacade.buyerGetEarnestMoneyWhenAppraiseFail(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods.getProductName());
}else if(type==2 ){
//质检不通过
inBoxFacade.noticeBuyerWhenQualityCheckNotPass(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods.getProductName());
}else if(type==3 || type == 4){
//瑕疵不接受(用户不接受和超时不接受),只给买家发消息
inBoxFacade.buyerMiniFaultUnAccept(buyerUid,buyerOrder.getOrderCode(), sellerOrderGoods.getProductName());
boolean outTime=false;
if(type == 4){
outTime=true;
}
inBoxFacade.buyerMiniFaultUnAccept(buyerUid,buyerOrder.getOrderCode(), sellerOrderGoods.getProductName(),outTime);
}
}catch(Exception ex) {
... ...
... ... @@ -308,6 +308,39 @@ public class InBoxFacade {
}
/**
* 平台收货
*/
public void noticeBuyerWhenQualityCheckNotPass(int buyerUid, long orderCode,String prdName) {
try {
executorService.execute(() -> {
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_QUALITY_NOT_PASS;
String params = buildParams(orderCode);
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
InBoxResponse resp = inBoxSDK.addInbox(req);
logger.info("record noticeBuyerWhenQualityCheckNotPass inbox msg, buyerUid {}, orderCode {},prdName {} resp {}",
buyerUid, orderCode,prdName, resp);
//短信
String phone = userProxyService.getMobile(buyerUid);
if (StringUtils.isBlank(phone)){
logger.warn("in noticeBuyerWhenQualityCheckNotPass sms fail, buyerUid {} orderCode {} ,prdName {}", buyerUid, orderCode,prdName);
return;
}
List<String> mobileList = Arrays.asList(phone);
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_QUALITY_NOT_PASS.getContent(),prdName,orderCode);
sendSmsService.smsSendByMobile(content,mobileList);
logger.info("record noticeBuyerWhenQualityCheckNotPass inbox sms msg, buyerUid {}, orderCode {}, prdName {}",
buyerUid, orderCode,prdName);
});
} catch (Exception e) {
logger.warn("InBoxFacade noticeBuyerWhenQualityCheckNotPass error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
buyerUid, orderCode,prdName, e);
}
}
/**
* 瑕疵提醒,给买家消息
*/
public void buyerMiniFaultCreate(int buyerUid, long orderCode) {
... ... @@ -342,11 +375,14 @@ public class InBoxFacade {
/**
* 不接受瑕疵,给买家消息
*/
public void buyerMiniFaultUnAccept(int buyerUid, long orderCode,String prdName) {
public void buyerMiniFaultUnAccept(int buyerUid, long orderCode,String prdName,boolean outTimeFlag) {
try {
executorService.execute(() -> {
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_MINI_FAULT_UN_ACCEPT;
if(outTimeFlag){
ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_MINI_FAULT_UN_ACCEPT_OUT_TIME;
}
String params = buildParams(orderCode);
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
... ... @@ -361,7 +397,8 @@ public class InBoxFacade {
return;
}
List<String> mobileList = Arrays.asList(phone);
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_MINI_FAULT_UN_ACCEPT.getContent(),prdName,orderCode);
InboxBusinessTypeEnum sms = InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_MINI_FAULT_UN_ACCEPT;
String content = getReplacedContent(sms.getContent(),prdName,orderCode);
sendSmsService.smsSendByMobile(content, mobileList);
logger.info("record buyerQualityCheckNotPass inbox sms msg,buyerUid {}, prdName {},orderCode {}",
buyerUid , prdName,orderCode);
... ...