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
4eec9b4a
Commit
4eec9b4a
authored
May 15, 2025
by
fanjiaxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新加入实名认证开关
parent
13a91331
Pipeline
#75566
passed with stages
in 1 minute 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
AppConfig.java
...netease/yanxuan/wx/store/sharer/biz/config/AppConfig.java
+24
-0
UserServiceImpl.java
...uan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
+9
-3
No files found.
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/config/AppConfig.java
0 → 100644
View file @
4eec9b4a
package
com
.
netease
.
yanxuan
.
wx
.
store
.
sharer
.
biz
.
config
;
import
com.ctrip.framework.apollo.spring.annotation.EnableAutoUpdateApolloConfig
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
/**
* @Description 应用配置
* @Author fanjiaxin
* @Date 2025/3/10 17:26
*/
@Data
@Component
@EnableAutoUpdateApolloConfig
public
class
AppConfig
{
/**
* 实名认证
*/
@Value
(
"${sys.realName.authenticated.enabled:true}"
)
private
Boolean
realNameAuthenticatedEnabled
;
}
\ No newline at end of file
yanxuan-wx-store-sharer-biz/src/main/java/com/netease/yanxuan/wx/store/sharer/biz/service/impl/UserServiceImpl.java
View file @
4eec9b4a
...
...
@@ -3,6 +3,7 @@ package com.netease.yanxuan.wx.store.sharer.biz.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.netease.yanxuan.wx.store.sharer.biz.config.AppConfig
;
import
com.netease.yanxuan.wx.store.sharer.biz.config.DrmSharerConfig
;
import
com.netease.yanxuan.wx.store.sharer.biz.core.LoginUserContextHolder
;
import
com.netease.yanxuan.wx.store.sharer.biz.core.LoginUserHelper
;
...
...
@@ -51,6 +52,7 @@ import java.util.Date;
@Service
public
class
UserServiceImpl
implements
IUserService
{
private
final
AppConfig
appConfig
;
private
final
SharerInfoMapper
sharerInfoMapper
;
private
final
LoginUserHelper
loginUserHelper
;
private
final
WeChatUserInfoRequest
weChatUserRequest
;
...
...
@@ -205,9 +207,13 @@ public class UserServiceImpl implements IUserService {
iSmsService
.
verifySmsCode
(
SmsScenesEnum
.
REAL_NAME_AUTHENTICATED
.
name
(),
bo
.
getMobilePhone
(),
bo
.
getSmsCode
());
// 验证身份信息
Boolean
isVerifySuccess
=
iUserInfoClient
.
verifyByIdentityNo
(
bo
.
getUsername
(),
bo
.
getIdCardNumber
());
if
(
null
==
isVerifySuccess
||
!
isVerifySuccess
){
throw
new
BizException
(
"实名认证不通过"
);
Boolean
realNameAuthenticatedEnabled
=
appConfig
.
getRealNameAuthenticatedEnabled
();
if
(
null
==
realNameAuthenticatedEnabled
||
realNameAuthenticatedEnabled
){
log
.
info
(
"op:realNameAuthenticated:realNameAuthenticatedEnabled is enabled"
);
Boolean
isVerifySuccess
=
iUserInfoClient
.
verifyByIdentityNo
(
bo
.
getUsername
(),
bo
.
getIdCardNumber
());
if
(
null
==
isVerifySuccess
||
!
isVerifySuccess
){
throw
new
BizException
(
"实名认证不通过"
);
}
}
// 验证通过后更新实名认证信息
LoginUserInfo
loginUserInfo
=
LoginUserContextHolder
.
get
();
...
...
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