Authored by qinchao

修复消息

... ... @@ -853,14 +853,16 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
logger.info("in miniFaultCreate, push event uid {} ,order code {} ", miniFaultOuterTimeEvent.getUid(),miniFaultOuterTimeEvent.getOrderCode());
EventBusPublisher.publishEvent(miniFaultOuterTimeEvent);
SellerOrderGoods sellerOrderGoods = cleanCacheAfterUpdateStatus(orderCode,uid,sellerUid);
//消息
inBoxFacade.buyerMiniFaultCreate(uid,orderCode);
inBoxFacade.buyerMiniFaultCreate(uid,orderCode,sellerOrderGoods.getProductName());
cleanCacheAfterUpdateStatus(orderCode,uid,sellerUid);
}
//清理缓存
private void cleanCacheAfterUpdateStatus(long orderCode,int uid,int sellerUid){
private SellerOrderGoods cleanCacheAfterUpdateStatus(long orderCode,int uid,int sellerUid){
BuyerOrderGoods bog = buyerOrderGoodsMapper.selectByOrderCode(uid, orderCode);
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(bog.getSkup());
logger.info("in cleanCacheAfterUpdateStatus begin clean cache orderCode {},uid {} ,sellerUid {}", orderCode,uid,sellerUid);
... ... @@ -873,6 +875,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
ErpBuyerOrderEvent event = new ErpBuyerOrderEvent(uid);
EventBusPublisher.publishEvent(event);
return sellerOrderGoods;
}
@Override
... ...
... ... @@ -343,7 +343,7 @@ public class InBoxFacade {
/**
* 瑕疵提醒,给买家消息
*/
public void buyerMiniFaultCreate(int buyerUid, long orderCode) {
public void buyerMiniFaultCreate(int buyerUid, long orderCode,String prdName) {
try {
executorService.execute(() -> {
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_PROBLEM_ORDER;
... ... @@ -351,25 +351,25 @@ public class InBoxFacade {
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
InBoxResponse resp = inBoxSDK.addInbox(req);
logger.info("record buyerMiniFaultCreate inbox msg, buyerUid {} ,orderCode {} ,resp {}",
buyerUid, orderCode ,resp);
logger.info("record buyerMiniFaultCreate inbox msg, buyerUid {} ,orderCode {} ,prdName {},resp {}",
buyerUid, orderCode ,prdName,resp);
//短信
String phone = userProxyService.getMobile(buyerUid);
if (StringUtils.isBlank(phone)){
logger.warn("buyerMiniFaultCreate sms send fail,buyerUid {} ,orderCode {}", buyerUid, orderCode);
logger.warn("buyerMiniFaultCreate sms send fail,buyerUid {} ,orderCode {},prdName {}", buyerUid, orderCode,prdName);
return;
}
List<String> mobileList = Arrays.asList(phone);
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_CHECK_ORDER_PROBLEM.getContent(),orderCode);
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_CHECK_ORDER_PROBLEM.getContent(),prdName,orderCode);
sendSmsService.smsSendByMobile(content, mobileList);
logger.info("record buyerMiniFaultCreate inbox sms msg,buyerUid {}, porderCode {}",
buyerUid ,orderCode);
logger.info("record buyerMiniFaultCreate inbox sms msg,buyerUid {}, orderCode {},prdName {}",
buyerUid ,orderCode,prdName);
});
} catch (Exception e) {
logger.warn("InBoxFacade buyerMiniFaultCreate error inbox msg, buyerUid {},orderCode {} ",
buyerUid, orderCode , e);
logger.warn("InBoxFacade buyerMiniFaultCreate error inbox msg, buyerUid {},orderCode {},prdName {} ",
buyerUid, orderCode,prdName , e);
}
}
/**
... ...