Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yanxuan-wx-store-sharer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wx
yanxuan-wx-store-sharer
Commits
e231f17b
Commit
e231f17b
authored
May 14, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新加入实名认证相关代码
parent
f6eae4e2
Pipeline
#75484
passed with stages
in 1 minute 20 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
SmsServiceImpl.java
...xuan/wx/store/sharer/biz/service/impl/SmsServiceImpl.java
+2
-2
UasClientImpl.java
...x/store/sharer/integration/client/impl/UasClientImpl.java
+1
-1
SmsConfig.java
...yanxuan/wx/store/sharer/integration/config/SmsConfig.java
+3
-3
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/SmsServiceImpl.java
View file @
e231f17b
...
@@ -78,13 +78,13 @@ public class SmsServiceImpl implements ISmsService {
...
@@ -78,13 +78,13 @@ public class SmsServiceImpl implements ISmsService {
return
false
;
return
false
;
}
}
int
sendIntervalSeconds
=
smsConfig
.
getSendIntervalSeconds
();
int
sendIntervalSeconds
=
smsConfig
.
getSendIntervalSeconds
();
int
codeValid
Seconds
=
smsConfig
.
getCodeValidSecond
s
();
int
codeValid
Minutes
=
smsConfig
.
getCodeValidMinute
s
();
// 标记验证码已发送
// 标记验证码已发送
String
sendCodeKey
=
String
.
format
(
SmsConstant
.
SMS_SEND_INTERVAL_KEY
,
scenes
,
mobilePhone
);
String
sendCodeKey
=
String
.
format
(
SmsConstant
.
SMS_SEND_INTERVAL_KEY
,
scenes
,
mobilePhone
);
redisClient
.
setStr
(
sendCodeKey
,
String
.
valueOf
(
System
.
currentTimeMillis
()),
sendIntervalSeconds
);
redisClient
.
setStr
(
sendCodeKey
,
String
.
valueOf
(
System
.
currentTimeMillis
()),
sendIntervalSeconds
);
// 验证码放进缓存
// 验证码放进缓存
String
codeKey
=
String
.
format
(
SmsConstant
.
SMS_CODE_KEY
,
scenes
,
mobilePhone
);
String
codeKey
=
String
.
format
(
SmsConstant
.
SMS_CODE_KEY
,
scenes
,
mobilePhone
);
redisClient
.
setStr
(
codeKey
,
code
,
codeValid
Seconds
);
redisClient
.
setStr
(
codeKey
,
code
,
codeValid
Minutes
*
60
);
return
true
;
return
true
;
}
}
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/client/impl/UasClientImpl.java
View file @
e231f17b
...
@@ -59,7 +59,7 @@ public class UasClientImpl implements IUasClient {
...
@@ -59,7 +59,7 @@ public class UasClientImpl implements IUasClient {
private
Map
<
String
,
Object
>
assembleSmsArg
(
String
uid
,
String
phone
,
String
code
,
String
scenes
)
{
private
Map
<
String
,
Object
>
assembleSmsArg
(
String
uid
,
String
phone
,
String
code
,
String
scenes
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"phone"
,
phone
);
params
.
put
(
"phone"
,
phone
);
params
.
put
(
"message"
,
String
.
format
(
smsConfig
.
getMessageFormat
(),
code
,
smsConfig
.
getCodeValid
Second
s
()));
params
.
put
(
"message"
,
String
.
format
(
smsConfig
.
getMessageFormat
(),
code
,
smsConfig
.
getCodeValid
Minute
s
()));
params
.
put
(
"level"
,
1
);
params
.
put
(
"level"
,
1
);
params
.
put
(
"uid"
,
uid
);
params
.
put
(
"uid"
,
uid
);
params
.
put
(
"topic"
,
String
.
format
(
TOPIC_FORMAT
,
scenes
));
params
.
put
(
"topic"
,
String
.
format
(
TOPIC_FORMAT
,
scenes
));
...
...
yanxuan-wx-store-sharer-integration/src/main/java/com/netease/yanxuan/wx/store/sharer/integration/config/SmsConfig.java
View file @
e231f17b
...
@@ -27,10 +27,10 @@ public class SmsConfig {
...
@@ -27,10 +27,10 @@ public class SmsConfig {
private
Integer
sendIntervalSeconds
;
private
Integer
sendIntervalSeconds
;
/**
/**
* 验证码有效时间,
单位秒
* 验证码有效时间,
分钟
*/
*/
@Value
(
"${sms.code.valid.
seconds:300
}"
)
@Value
(
"${sms.code.valid.
minutes:5
}"
)
private
Integer
codeValid
Second
s
;
private
Integer
codeValid
Minute
s
;
/**
/**
* 验证码短信格式
* 验证码短信格式
...
...
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