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
13a91331
Commit
13a91331
authored
May 15, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推客短信发送调试
parent
f3fa0df4
Pipeline
#75553
passed with stages
in 1 minute 11 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
ISmsService.java
...ease/yanxuan/wx/store/sharer/biz/service/ISmsService.java
+5
-0
SmsServiceImpl.java
...xuan/wx/store/sharer/biz/service/impl/SmsServiceImpl.java
+6
-1
UserServiceImpl.java
...uan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
+5
-3
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/ISmsService.java
View file @
13a91331
...
@@ -18,4 +18,9 @@ public interface ISmsService {
...
@@ -18,4 +18,9 @@ public interface ISmsService {
* 验证短信验证码
* 验证短信验证码
*/
*/
void
verifySmsCode
(
String
scenes
,
String
phone
,
String
code
);
void
verifySmsCode
(
String
scenes
,
String
phone
,
String
code
);
/**
* 失效短信验证码
*/
void
invalidSmsCode
(
String
scenes
,
String
phone
);
}
}
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/SmsServiceImpl.java
View file @
13a91331
...
@@ -62,7 +62,12 @@ public class SmsServiceImpl implements ISmsService {
...
@@ -62,7 +62,12 @@ public class SmsServiceImpl implements ISmsService {
if
(
StringUtils
.
isBlank
(
originCode
)
||
!
originCode
.
equals
(
code
))
{
if
(
StringUtils
.
isBlank
(
originCode
)
||
!
originCode
.
equals
(
code
))
{
throw
new
BizException
(
"验证码有误"
);
throw
new
BizException
(
"验证码有误"
);
}
}
// 验证成功后清除验证码
}
@Override
public
void
invalidSmsCode
(
String
scenes
,
String
phone
)
{
// 对比验证码
String
codeKey
=
String
.
format
(
SmsConstant
.
SMS_CODE_KEY
,
scenes
,
phone
);
redisClient
.
delete
(
codeKey
);
redisClient
.
delete
(
codeKey
);
}
}
...
...
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
View file @
13a91331
...
@@ -201,14 +201,14 @@ public class UserServiceImpl implements IUserService {
...
@@ -201,14 +201,14 @@ public class UserServiceImpl implements IUserService {
@Override
@Override
public
void
realNameAuthenticated
(
RealNameAuthenticatedBO
bo
)
{
public
void
realNameAuthenticated
(
RealNameAuthenticatedBO
bo
)
{
// 验证码校验
iSmsService
.
verifySmsCode
(
SmsScenesEnum
.
REAL_NAME_AUTHENTICATED
.
name
(),
bo
.
getMobilePhone
(),
bo
.
getSmsCode
());
// 验证身份信息
// 验证身份信息
Boolean
isVerifySuccess
=
iUserInfoClient
.
verifyByIdentityNo
(
bo
.
getUsername
(),
bo
.
getIdCardNumber
());
Boolean
isVerifySuccess
=
iUserInfoClient
.
verifyByIdentityNo
(
bo
.
getUsername
(),
bo
.
getIdCardNumber
());
if
(
null
==
isVerifySuccess
||
!
isVerifySuccess
){
if
(
null
==
isVerifySuccess
||
!
isVerifySuccess
){
throw
new
BizException
(
"实名认证不通过"
);
throw
new
BizException
(
"实名认证不通过"
);
}
}
// 验证码校验
iSmsService
.
verifySmsCode
(
SmsScenesEnum
.
REAL_NAME_AUTHENTICATED
.
name
(),
bo
.
getMobilePhone
(),
bo
.
getSmsCode
());
// 验证通过后更新实名认证信息
// 验证通过后更新实名认证信息
LoginUserInfo
loginUserInfo
=
LoginUserContextHolder
.
get
();
LoginUserInfo
loginUserInfo
=
LoginUserContextHolder
.
get
();
LambdaUpdateWrapper
<
SharerInfo
>
sharerInfoLuw
=
Wrappers
.
lambdaUpdate
();
LambdaUpdateWrapper
<
SharerInfo
>
sharerInfoLuw
=
Wrappers
.
lambdaUpdate
();
...
@@ -218,6 +218,8 @@ public class UserServiceImpl implements IUserService {
...
@@ -218,6 +218,8 @@ public class UserServiceImpl implements IUserService {
sharerInfoLuw
.
set
(
SharerInfo:
:
getUpdateTime
,
new
Date
());
sharerInfoLuw
.
set
(
SharerInfo:
:
getUpdateTime
,
new
Date
());
sharerInfoLuw
.
eq
(
SharerInfo:
:
getOpenId
,
loginUserInfo
.
getOpenId
());
sharerInfoLuw
.
eq
(
SharerInfo:
:
getOpenId
,
loginUserInfo
.
getOpenId
());
sharerInfoMapper
.
update
(
null
,
sharerInfoLuw
);
sharerInfoMapper
.
update
(
null
,
sharerInfoLuw
);
// 验证成功后清除验证码
iSmsService
.
invalidSmsCode
(
SmsScenesEnum
.
REAL_NAME_AUTHENTICATED
.
name
(),
bo
.
getMobilePhone
());
}
}
private
SharerInfoVO
getSharerRegisterBindInfo
(
String
openId
)
{
private
SharerInfoVO
getSharerRegisterBindInfo
(
String
openId
)
{
...
...
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