...
|
...
|
@@ -7,6 +7,7 @@ import com.yohoufo.inboxclient.sdk.InBoxSDK; |
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.slf4j.helpers.MessageFormatter;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
...
|
...
|
@@ -104,8 +105,9 @@ public class InBoxFacade { |
|
|
//短信
|
|
|
//InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_SEND;
|
|
|
//String smsparams = buildParams(orderCode);
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_SEND;
|
|
|
String content=smsIbt.getReplacedContent(prdName);
|
|
|
//SmsContentEnum smsIbt=SmsContentEnum.SMS_SEND;
|
|
|
//String content=smsIbt.getReplacedContent(prdName);
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_SEND.getContent(),prdName);
|
|
|
|
|
|
String phone = userProxyService.getMobile(buyerUid);
|
|
|
if (StringUtils.isBlank(phone)){
|
...
|
...
|
@@ -124,6 +126,10 @@ public class InBoxFacade { |
|
|
|
|
|
}
|
|
|
|
|
|
private String getReplacedContent(String content ,Object... params) {
|
|
|
return MessageFormatter.arrayFormat(content, params).getMessage();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 订单生成,卖家取消售卖
|
|
|
*
|
...
|
...
|
@@ -147,8 +153,11 @@ public class InBoxFacade { |
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_SELLER;
|
|
|
String content=smsIbt.getReplacedContent(prdName);
|
|
|
|
|
|
//SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_SELLER;
|
|
|
//String content=smsIbt.getReplacedContent(prdName);
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_CLOSED_SELLER.getContent(),prdName);
|
|
|
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record noticeBuyerWhenSellerCancelAfterPaid inbox sms msg, buyerUid {}, orderCode {},prdName {}",
|
|
|
buyerUid, orderCode,prdName);
|
...
|
...
|
@@ -203,8 +212,10 @@ public class InBoxFacade { |
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_PLATFORM;
|
|
|
String content=smsIbt.getReplacedContent(prdName);
|
|
|
//SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_PLATFORM;
|
|
|
//String content=smsIbt.getReplacedContent(prdName);
|
|
|
|
|
|
String content=getReplacedContent(InboxBusinessTypeEnum.SMS_CLOSED_PLATFORM.getContent(),prdName);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record buyerGetEarnestMoneyWhenAppraiseFail inbox sms msg, buyerUid {}, orderCode {},prdName {}",
|
|
|
buyerUid, orderCode,prdName);
|
...
|
...
|
@@ -339,8 +350,9 @@ public class InBoxFacade { |
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
SmsContentEnum smsIbt = SmsContentEnum.SMS_NOTIFIED_SEND;
|
|
|
String content = smsIbt.getReplacedContent(prdName);
|
|
|
//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 {}",
|
|
|
sellerUid, prdName);
|
...
|
...
|
@@ -465,8 +477,9 @@ public class InBoxFacade { |
|
|
return;
|
|
|
}
|
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
SmsContentEnum smsIbt = SmsContentEnum.SMS_NOTIFIED_UNSHELF;
|
|
|
String content = smsIbt.getReplacedContent(prdName);
|
|
|
//SmsContentEnum smsIbt = SmsContentEnum.SMS_NOTIFIED_UNSHELF;
|
|
|
//String content = smsIbt.getReplacedContent(prdName);
|
|
|
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTIFIED_UNSHELF.getContent(),prdName);
|
|
|
sendSmsService.smsSendByMobile(content, mobileList);
|
|
|
logger.info("record notifyUnshelfCauseBySpecialReason inbox sms msg,sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName);
|
...
|
...
|
@@ -498,8 +511,10 @@ public class InBoxFacade { |
|
|
List<String> mobileList = Arrays.asList(phone);
|
|
|
if (times == 2) {
|
|
|
|
|
|
SmsContentEnum smsIbt = SmsContentEnum.SMS_NOTIFIED_SEND_SECOND;
|
|
|
String content = smsIbt.getReplacedContent(prdName);
|
|
|
//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);
|
|
|
logger.info("record sellerDeliverNotice inbox sms msg,sellerUid {}, prdName {}, times {},resp {}",
|
|
|
sellerUid, prdName, times);
|
...
|
...
|
@@ -508,8 +523,9 @@ public class InBoxFacade { |
|
|
if (times == 3) {
|
|
|
|
|
|
|
|
|
SmsContentEnum smsIbt = SmsContentEnum.SMS_NOTIFIED_SEND_FAILED;
|
|
|
String content = smsIbt.getReplacedContent(prdName);
|
|
|
//SmsContentEnum smsIbt = SmsContentEnum.SMS_NOTIFIED_SEND_FAILED;
|
|
|
//String content = smsIbt.getReplacedContent(prdName);
|
|
|
String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTIFIED_SEND_FAILED.getContent(),prdName);
|
|
|
sendSmsService.smsSendByMobile(content, mobileList);
|
|
|
logger.info("record sellerDeliverNotice inbox sms msg,sellerUid {}, prdName {}, times {},resp {}",
|
|
|
sellerUid, prdName, times);
|
...
|
...
|
|