From 6c3821d53e1bcce7b40b93ad29da0ff3702a8a3a Mon Sep 17 00:00:00 2001 From: "feng.li" Date: Tue, 23 Jan 2024 16:47:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BD=E5=90=8D=E5=8D=95=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/cool/store/http/EventCenterHttpRequest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; }