Commit 6cfc081b authored by shiyu's avatar shiyu

自测账户不发送短信

parent 0d826820
......@@ -163,5 +163,5 @@ public interface CommConsts {
* 自测账号,不发送短信
*/
public static final List<Long> NOT_SEND_MSG_USERID = Arrays.asList(9357942L, 42273900L, 290775L ,61091901L, 299497L, 61097938L,
61113888L, 60652774L, 60684039L, 42192256L, 60652774L, 291997L, 61098908L);
61113888L, 60652774L, 60684039L, 42192256L, 60652774L, 291997L, 61098908L, 61074146L);
}
package com.wwdz.ch.core.notify;
import com.aliyun.dysmsapi20170525.models.SendSmsResponse;
import com.wwdz.ch.core.consts.CommConsts;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.CacheUtil;
import com.wwdz.ch.db.domain.User;
......@@ -93,6 +94,10 @@ public class AliSmsSender implements SmsSender {
public Result sendSms(long userId, String msg) {
try {
//不发短信的名单
if (CommConsts.NOT_SEND_MSG_USERID.contains(userId)) {
return Result.success("自测账户不发送短信");
}
User user = cacheUtil.getAppletUsers(userId);
if (user == null) {
logger.error("======== userId:{},用户信息为空不能发送短信 ========", userId);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment