diff --git a/coolstore-partner-service/src/main/java/com/cool/store/http/EventCenterHttpRequest.java b/coolstore-partner-service/src/main/java/com/cool/store/http/EventCenterHttpRequest.java index c8a4a2b16..fa08ba725 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/http/EventCenterHttpRequest.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/http/EventCenterHttpRequest.java @@ -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 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; }