白名单判断优化
This commit is contained in:
@@ -59,7 +59,7 @@ public class EventCenterHttpRequest {
|
||||
@Value("${hsay.event.systemsource:null}")
|
||||
private String source;
|
||||
|
||||
@Value("#{'${sms.whiteList:null}'.split(',')}")
|
||||
@Value("#{'${sms.whiteList:,}'.split(',')}")
|
||||
private List<String> whiteList;
|
||||
|
||||
/**
|
||||
@@ -135,7 +135,8 @@ public class EventCenterHttpRequest {
|
||||
public void sendSmsVariable(String phone, SMSMsgEnum smsMsgEnum, String... objects) throws ApiException {
|
||||
|
||||
//为避免对真实线索造成困扰和便于测试,测试环境只给白名单手机号发短信
|
||||
if (whiteList == null || !whiteList.contains(phone)) {
|
||||
//由于做了解析,whiteList 一定不是 bull,生产环境不配置该配置,会为一个空 List
|
||||
if (!whiteList.isEmpty() && !whiteList.contains(phone)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user