...
|
...
|
@@ -69,7 +69,10 @@ public class MessageFacade { |
|
|
List<String> uidList = Lists.newArrayList(ownerUid, applicantUid);
|
|
|
Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
|
|
String ownerMobile = profileMap.get(Integer.parseInt(ownerUid)).getMobile();
|
|
|
String applicantMobileMask = MobileHelper.coverMobile2(profileMap.get(Integer.parseInt(applicantUid)).getMobile());
|
|
|
String applicantName = profileMap.get(Integer.parseInt(applicantUid)).getNickname();
|
|
|
if(StringUtils.isEmpty(applicantName) || applicantName.startsWith("YOHO-")) {
|
|
|
applicantName = MobileHelper.coverMobile2(profileMap.get(Integer.parseInt(applicantUid)).getMobile());
|
|
|
}
|
|
|
|
|
|
//商品信息
|
|
|
BuyerOrderGoods buyerOrderGoods = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
|
...
|
...
|
@@ -77,12 +80,13 @@ public class MessageFacade { |
|
|
//skup获取 productInfo
|
|
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
String prdName = sellerOrderGoods.getProductName();
|
|
|
String sizeName = sellerOrderGoods.getSizeName();
|
|
|
|
|
|
String params = buildParams(applicantMobileMask, prdName);
|
|
|
String params = buildParams(applicantName, prdName, sizeName);
|
|
|
InboxReqVO req = buildInboxReqVO(Integer.parseInt(ownerUid), params, ibtOfBuyer);
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record applyToBeOwner inbox msg, ownerUid {}, applicantMobileMask {}, prdName {} resp {}",
|
|
|
ownerUid, applicantMobileMask, prdName, resp);
|
|
|
logger.info("record applyToBeOwner inbox msg, ownerUid {}, applicantUid {}, prdName {} resp {}",
|
|
|
ownerUid, applicantUid, prdName, resp);
|
|
|
|
|
|
//增加倒计时属性
|
|
|
if(null != resp.getData()) {
|
...
|
...
|
@@ -103,13 +107,13 @@ public class MessageFacade { |
|
|
|
|
|
//sms
|
|
|
if (StringUtils.isBlank(ownerMobile)){
|
|
|
logger.warn("in applyToBeOwner sms fail, ownerUid {} applicantMobileMask {} prdName {} ", ownerUid, applicantMobileMask,prdName);
|
|
|
logger.warn("in applyToBeOwner sms fail, ownerUid {} applicantUid {} prdName {} ", ownerUid, applicantUid,prdName);
|
|
|
return;
|
|
|
}
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM.getContent(), applicantMobileMask, prdName);
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM.getContent(), applicantName, prdName, sizeName);
|
|
|
List<String> mobileList = Arrays.asList(ownerMobile);
|
|
|
sendMessageService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record applyToBeOwner inbox sms msg, ownerUid {} applicantMobileMask {} prdName {}", ownerUid, applicantMobileMask,prdName);
|
|
|
logger.info("record applyToBeOwner inbox sms msg, ownerUid {} applicantUid {} prdName {}", ownerUid, applicantUid, prdName);
|
|
|
|
|
|
} catch (Exception ex) {
|
|
|
logger.warn("InBoxFacade applyToBeOwner error inbox msg, ownerUid {} applicantUid {} tagId {} nfcUid {}",
|
...
|
...
|
@@ -127,6 +131,7 @@ public class MessageFacade { |
|
|
public void ownerConfirmTimeOut(String applicantUid, Long orderCode){
|
|
|
executorService.execute(()-> {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibtOfBuyer = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_OWNER_CONFIRM_TIMEOUT;
|
|
|
List<String> uidList = Lists.newArrayList(applicantUid);
|
|
|
Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
|
|
String applicantMobile = profileMap.get(Integer.parseInt(applicantUid)).getMobile();
|
...
|
...
|
@@ -137,13 +142,20 @@ public class MessageFacade { |
|
|
//skup获取 productInfo
|
|
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
String prdName = sellerOrderGoods.getProductName();
|
|
|
String sizeName = sellerOrderGoods.getSizeName();
|
|
|
|
|
|
String params = buildParams(prdName, sizeName);
|
|
|
InboxReqVO req = buildInboxReqVO(Integer.parseInt(applicantUid), params, ibtOfBuyer);
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record applyToBeOwner inbox msg, applicantUid {}, prdName {} resp {}",
|
|
|
applicantUid, prdName, resp);
|
|
|
|
|
|
//sms
|
|
|
if (StringUtils.isBlank(applicantMobile)){
|
|
|
logger.warn("in ownerConfirmTimeOut sms fail, applicantUid {} prdName {} ", applicantUid, prdName);
|
|
|
return;
|
|
|
}
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM_TIMEOUT.getContent(), prdName);
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM_TIMEOUT.getContent(), prdName, sizeName);
|
|
|
List<String> mobileList = Arrays.asList(applicantMobile);
|
|
|
sendMessageService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record ownerConfirmTimeOut inbox sms msg, applicantUid {},prdName {}", applicantUid, prdName);
|
...
|
...
|
@@ -161,6 +173,7 @@ public class MessageFacade { |
|
|
public void ownerReject(String applicantUid, Long orderCode){
|
|
|
executorService.execute(()-> {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibtOfBuyer = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_OWNER_REJECT;
|
|
|
List<String> uidList = Lists.newArrayList(applicantUid);
|
|
|
Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
|
|
String applicantMobile = profileMap.get(Integer.parseInt(applicantUid)).getMobile();
|
...
|
...
|
@@ -171,13 +184,62 @@ public class MessageFacade { |
|
|
//skup获取 productInfo
|
|
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
String prdName = sellerOrderGoods.getProductName();
|
|
|
String sizeName = sellerOrderGoods.getSizeName();
|
|
|
|
|
|
String params = buildParams(prdName, sizeName);
|
|
|
InboxReqVO req = buildInboxReqVO(Integer.parseInt(applicantUid), params, ibtOfBuyer);
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record applyToBeOwner inbox msg, applicantUid {}, prdName {} resp {}",
|
|
|
applicantUid, prdName, resp);
|
|
|
|
|
|
//sms
|
|
|
if (StringUtils.isBlank(applicantMobile)){
|
|
|
logger.warn("in ownerConfirmTimeOut sms fail, applicantUid {} prdName {} ", applicantUid, prdName);
|
|
|
return;
|
|
|
}
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM_REJECT.getContent(), prdName, sizeName);
|
|
|
List<String> mobileList = Arrays.asList(applicantMobile);
|
|
|
sendMessageService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record ownerConfirmTimeOut inbox sms msg, applicantUid {},prdName {}", applicantUid, prdName);
|
|
|
|
|
|
} catch (Exception ex) {
|
|
|
logger.warn("MessageFacade ownerConfirmTimeOut error inbox msg, applicantUid {} orderCode {} ",
|
|
|
applicantUid, orderCode, ex);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 当前主人同意物权转移
|
|
|
*/
|
|
|
public void ownerPass(String applicantUid, Long orderCode){
|
|
|
executorService.execute(()-> {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibtOfBuyer = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_OWNER_PASS;
|
|
|
List<String> uidList = Lists.newArrayList(applicantUid);
|
|
|
Map<Integer, ProfileInfoRsp> profileMap = userInfoProxyService.queryIcoAndMobile(uidList);
|
|
|
String applicantMobile = profileMap.get(Integer.parseInt(applicantUid)).getMobile();
|
|
|
|
|
|
//商品信息
|
|
|
BuyerOrderGoods buyerOrderGoods = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
|
|
|
Integer skup = buyerOrderGoods.getSkup();
|
|
|
//skup获取 productInfo
|
|
|
SellerOrderGoods sellerOrderGoods = sellerOrderGoodsMapper.selectByPrimaryKey(skup);
|
|
|
String prdName = sellerOrderGoods.getProductName();
|
|
|
String sizeName = sellerOrderGoods.getSizeName();
|
|
|
|
|
|
String params = buildParams(prdName, sizeName);
|
|
|
InboxReqVO req = buildInboxReqVO(Integer.parseInt(applicantUid), params, ibtOfBuyer);
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record applyToBeOwner inbox msg, applicantUid {}, prdName {} resp {}",
|
|
|
applicantUid, prdName, resp);
|
|
|
|
|
|
//sms
|
|
|
if (StringUtils.isBlank(applicantMobile)){
|
|
|
logger.warn("in ownerConfirmTimeOut sms fail, applicantUid {} prdName {} ", applicantUid, prdName);
|
|
|
return;
|
|
|
}
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM_REJECT.getContent(), prdName);
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_OWNER_CONFIRM_PASS.getContent(), prdName, sizeName);
|
|
|
List<String> mobileList = Arrays.asList(applicantMobile);
|
|
|
sendMessageService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record ownerConfirmTimeOut inbox sms msg, applicantUid {},prdName {}", applicantUid, prdName);
|
...
|
...
|
|