Authored by qinchao

加货号

... ... @@ -583,7 +583,7 @@ public class AppraiseService {
orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetStatus.getCode());
//瑕疵不接受(用户不接受和超时不接受),只给买家发消息
inBoxFacade.buyerMiniFaultUnAccept(buyerUid,buyerOrder.getOrderCode(), sellerOrderGoods.getProductName(),outTimeFlag);
inBoxFacade.buyerMiniFaultUnAccept(buyerUid,buyerOrder.getOrderCode(), sellerOrderGoods,outTimeFlag);
inBoxFacade.sellerMiniFaultUnAccept(sellerOrderGoods,orderCode,outTimeFlag);
}catch(Exception ex) {
... ... @@ -1003,7 +1003,7 @@ public class AppraiseService {
orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetStatus.getCode());
//鉴定不通过
inBoxFacade.noticeBuyerWhenQualityCheckNotPass(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods.getProductName());
inBoxFacade.noticeBuyerWhenQualityCheckNotPass(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods);
inBoxFacade.sellerQualityCheckNotPass(sellerOrderGoods,orderCode);
}catch(Exception ex) {
... ... @@ -1090,7 +1090,7 @@ public class AppraiseService {
orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetStatus.getCode());
//质检不通过
inBoxFacade.noticeBuyerWhenQualityCheckNotPass(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods.getProductName());
inBoxFacade.noticeBuyerWhenQualityCheckNotPass(buyerUid, buyerOrder.getOrderCode(), sellerOrderGoods);
inBoxFacade.sellerQualityCheckNotPass(sellerOrderGoods,orderCode);
}catch(Exception ex) {
... ...
... ... @@ -399,9 +399,11 @@ public class InBoxFacade {
/**
* 质检未通过,买家
*/
public void noticeBuyerWhenQualityCheckNotPass(int buyerUid, long orderCode,String prdName) {
public void noticeBuyerWhenQualityCheckNotPass(int buyerUid, long orderCode,SellerOrderGoods sellerOrderGoods) {
try {
executorService.execute(() -> {
String prdName = sellerOrderGoods.getProductName();
String sizeName = sellerOrderGoods.getSizeName();
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_QUALITY_NOT_PASS;
String params = buildParams(orderCode);
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
... ... @@ -416,8 +418,11 @@ public class InBoxFacade {
logger.warn("in noticeBuyerWhenQualityCheckNotPass sms fail, buyerUid {} orderCode {} ,prdName {}", buyerUid, orderCode,prdName);
return;
}
Product product = productMapper.selectByPrimaryKey(sellerOrderGoods.getProductId());
String productCode = product.getProductCode();
List<String> mobileList = Arrays.asList(phone);
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_QUALITY_NOT_PASS.getContent(),prdName,orderCode);
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_QUALITY_NOT_PASS.getContent(),prdName,sizeName,productCode,orderCode);
sendSmsService.smsSendByMobile(content,mobileList);
logger.info("record noticeBuyerWhenQualityCheckNotPass inbox sms msg, buyerUid {}, orderCode {}, prdName {}",
... ... @@ -425,7 +430,7 @@ public class InBoxFacade {
});
} catch (Exception e) {
logger.warn("InBoxFacade noticeBuyerWhenQualityCheckNotPass error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
buyerUid, orderCode,prdName, e);
buyerUid, orderCode,sellerOrderGoods, e);
}
}
... ... @@ -470,10 +475,12 @@ public class InBoxFacade {
/**
* 不接受瑕疵,给买家消息
*/
public void buyerMiniFaultUnAccept(int buyerUid, long orderCode,String prdName,boolean outTimeFlag) {
public void buyerMiniFaultUnAccept(int buyerUid, long orderCode,SellerOrderGoods sellerOrderGoods,boolean outTimeFlag) {
try {
executorService.execute(() -> {
String prdName = sellerOrderGoods.getProductName();
String sizeName =sellerOrderGoods.getSizeName();
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_MINI_FAULT_UN_ACCEPT;
if(outTimeFlag){
ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_MINI_FAULT_UN_ACCEPT_OUT_TIME;
... ... @@ -491,12 +498,15 @@ public class InBoxFacade {
logger.warn("buyerQualityCheckNotPass sms send fail,buyerUid {} ,orderCode {}", buyerUid, orderCode);
return;
}
Product product = productMapper.selectByPrimaryKey(sellerOrderGoods.getProductId());
String productCode = product.getProductCode();
List<String> mobileList = Arrays.asList(phone);
InboxBusinessTypeEnum sms = InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_MINI_FAULT_UN_ACCEPT;
if(outTimeFlag){
sms = InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_MINI_FAULT_UN_ACCEPT_OUT_TIME;
}
String content = getReplacedContent(sms.getContent(),prdName,orderCode);
String content = getReplacedContent(sms.getContent(),prdName,sizeName,productCode,orderCode);
sendSmsService.smsSendByMobile(content, mobileList);
logger.info("record buyerQualityCheckNotPass inbox sms msg,buyerUid {}, prdName {},orderCode {}",
buyerUid , prdName,orderCode);
... ... @@ -504,7 +514,7 @@ public class InBoxFacade {
} catch (Exception e) {
logger.warn("InBoxFacade sellerSkupPaidByBuyer error inbox msg, buyerUid {},orderCode {}, prdName {} ",
buyerUid, orderCode ,prdName, e);
buyerUid, orderCode ,sellerOrderGoods, e);
}
}
... ...