测试及开发环境短信发送手机号白名单
This commit is contained in:
@@ -59,8 +59,8 @@ public class EventCenterHttpRequest {
|
||||
@Value("${hsay.event.systemsource:null}")
|
||||
private String source;
|
||||
|
||||
@Value("${spring.profiles.active}")
|
||||
private String env;
|
||||
@Value("#{'${sms.whiteList:null}'.split(',')}")
|
||||
private List<String> whiteList;
|
||||
|
||||
/**
|
||||
* 创建单个事件
|
||||
@@ -134,12 +134,9 @@ public class EventCenterHttpRequest {
|
||||
@Async
|
||||
public void sendSmsVariable(String phone, SMSMsgEnum smsMsgEnum, String... objects) throws ApiException {
|
||||
|
||||
//为避免对真实线索造成困扰和便于测试,测试环境暂不给线索发送会销相关短信
|
||||
if (env.equals("pre")
|
||||
&& (SMSMsgEnum.EXHIBITION_INFO_UPDATE.equals(smsMsgEnum)
|
||||
|| SMSMsgEnum.EXHIBITION_CLOSE.equals(smsMsgEnum))) {
|
||||
log.info("测试环境暂不给线索发送会销相关短信,phone:{},params:{}", phone, objects);
|
||||
return;
|
||||
//为避免对真实线索造成困扰和便于测试,测试环境只给白名单手机号发短信
|
||||
if (whiteList == null || !whiteList.contains(phone)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//1. 组织消息参数,短信的消息参数为 手机号: 参数1, 参数2, 参数3, 参数4, 参数5,,需要填入的参数为模板中 ${} 中的参数
|
||||
|
||||
Reference in New Issue
Block a user