Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
6cfc081b
Commit
6cfc081b
authored
Oct 14, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
自测账户不发送短信
parent
0d826820
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
...ore/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
+1
-1
ch-core/src/main/java/com/wwdz/ch/core/notify/AliSmsSender.java
...e/src/main/java/com/wwdz/ch/core/notify/AliSmsSender.java
+5
-0
No files found.
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
View file @
6cfc081b
...
...
@@ -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
);
}
ch-core/src/main/java/com/wwdz/ch/core/notify/AliSmsSender.java
View file @
6cfc081b
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment