...
|
...
|
@@ -380,33 +380,29 @@ public class InBoxFacade { |
|
|
/**
|
|
|
* 卖家发货提醒,买家支付购买后
|
|
|
*
|
|
|
* @param sellerUid
|
|
|
* @param prdName
|
|
|
* @param sog SellerOrderGoods
|
|
|
*/
|
|
|
public void sellerSkupPaidByBuyer(int sellerUid, String prdName) {
|
|
|
public void sellerSkupPaidByBuyer(SellerOrderGoods sog) {
|
|
|
int sellerUid = sog.getUid();
|
|
|
String prdName = sog.getProductName();
|
|
|
String sizeName = sog.getSizeName();
|
|
|
try {
|
|
|
executorService.execute(() -> {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SEND;
|
|
|
String params = buildParams(prdName);
|
|
|
String params = buildParams(prdName, sizeName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerSkupPaidByBuyer inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
logger.info("record sellerSkupPaidByBuyer inbox msg, sellerUid {}, prdName {}, sizeName {},resp {}",
|
|
|
sellerUid, prdName, sizeName, resp);
|
|
|
|
|
|
//短信
|
|
|
/*InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND;
|
|
|
String smsparams = buildParams(prdName);
|
|
|
InboxReqVO smsIbtReq = buildInboxReqVO(sellerUid, smsparams, smsIbt);
|
|
|
InBoxResponse smsresp = inBoxSDK.addInbox(smsIbtReq);*/
|
|
|
String phone = userProxyService.getMobile(sellerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
|
|
logger.warn("sellerSkupPaidByBuyer sms send fail,sellerUid {}, prdName {}", sellerUid, prdName);
|
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
//SmsContentEnum smsIbt = SmsContentEnum.SMS_NOTIFIED_SEND;
|
|
|
//String content = smsIbt.getReplacedContent(prdName);
|
|
|
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTIFIED_SEND.getContent(),prdName);
|
|
|
sendSmsService.smsSendByMobile(content, mobileList);
|
|
|
logger.info("record sellerSkupPaidByBuyer inbox sms msg,sellerUid {}, prdName {}",
|
...
|
...
|
@@ -422,14 +418,17 @@ public class InBoxFacade { |
|
|
/**
|
|
|
* 交易关闭:买家支付完成,卖家取消
|
|
|
*
|
|
|
* @param sellerUid
|
|
|
* @param prdName
|
|
|
* @param sog
|
|
|
*/
|
|
|
public void sellerCancelAfterBuyerPaid(int sellerUid, String prdName) {
|
|
|
public void sellerCancelAfterBuyerPaid(SellerOrderGoods sog) {
|
|
|
int sellerUid = sog.getUid();
|
|
|
String prdName = sog.getProductName();
|
|
|
String sizeName = sog.getSizeName();
|
|
|
try {
|
|
|
|
|
|
executorService.execute(() -> {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_CLOSED_SELLER;
|
|
|
String params = buildParams(prdName);
|
|
|
String params = buildParams(prdName, sizeName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
...
|
...
|
@@ -636,11 +635,22 @@ public class InBoxFacade { |
|
|
}
|
|
|
}
|
|
|
|
|
|
public void sellerDeliverNotice(int sellerUid, String prdName, int times) {
|
|
|
public void sellerDeliverNotice(SellerOrderGoods sog, int times) {
|
|
|
int sellerUid = sog.getUid();
|
|
|
String prdName = sog.getProductName();
|
|
|
String sizeName = sog.getSizeName();
|
|
|
try {
|
|
|
executorService.execute(() -> {
|
|
|
logger.info("record sellerDeliverNotice inbox sms msg,sellerUid {}, prdName {}, times {}",
|
|
|
sellerUid, prdName, times);
|
|
|
if (times == 2) {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_SELLER_DELIVER_GOODS;
|
|
|
String params = buildParams(sizeName, sizeName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerDeliverNotice inbox msg,sellerUid {}, prdName {},sizeName {} times {},resp {}",
|
|
|
sellerUid, prdName, sizeName, times, resp);
|
|
|
}
|
|
|
|
|
|
String phone = userProxyService.getMobile(sellerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
...
|
...
|
@@ -651,8 +661,7 @@ public class InBoxFacade { |
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
if (times == 2) {
|
|
|
|
|
|
//SmsContentEnum smsIbt = SmsContentEnum.SMS_NOTIFIED_SEND_SECOND;
|
|
|
//String content = smsIbt.getReplacedContent(prdName);
|
|
|
|
|
|
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTIFIED_SEND_SECOND.getContent(),prdName);
|
|
|
|
|
|
sendSmsService.smsSendByMobile(content, mobileList);
|
...
|
...
|
|