Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-api
Project
Project
Details
Activity
Releases
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
李伟
cust-api
Commits
7896e132
Commit
7896e132
authored
Apr 24, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了实名认证接口逻辑
parent
2eb2165c
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
175 additions
and
295 deletions
+175
-295
FaceVerifyServiceImpl.java
...libaba/faceVerify/service/impl/FaceVerifyServiceImpl.java
+174
-218
AppOpmArticleController.java
...ft/app/appArticle/controller/AppOpmArticleController.java
+1
-1
AppMemInfoController.java
...isoft/app/appMemInfo/controller/AppMemInfoController.java
+0
-15
MemInfoService.java
.../org/rcisoft/business/memInfo/service/MemInfoService.java
+0
-2
MemInfoServiceImpl.java
...oft/business/memInfo/service/impl/MemInfoServiceImpl.java
+0
-59
No files found.
src/main/java/org/rcisoft/alibaba/faceVerify/service/impl/FaceVerifyServiceImpl.java
View file @
7896e132
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/app/appArticle/controller/AppOpmArticleController.java
View file @
7896e132
...
...
@@ -149,7 +149,7 @@ public class AppOpmArticleController extends CyPaginationController<OpmArticle>
* 逻辑删除评论
*/
@PreAuthorize
(
"@cyPerm.hasPerm('app:opmArticle:delete')"
)
@DeleteMapping
(
"/deleteComment/{businessId:\\w+}"
)
@DeleteMapping
(
"/
opmArticle/
deleteComment/{businessId:\\w+}"
)
public
CyResult
deleteComment
(
@PathVariable
String
businessId
,
@RequestBody
ArticleCommentDTO
dto
)
{
dto
.
setBusinessId
(
Integer
.
valueOf
(
businessId
));
CyPersistModel
data
=
opmArticleServiceImpl
.
removeComment
(
dto
,
"app"
);
...
...
src/main/java/org/rcisoft/app/appMemInfo/controller/AppMemInfoController.java
View file @
7896e132
...
...
@@ -248,21 +248,6 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> {
}
}
@PreAuthorize
(
"@cyPerm.hasPerm('app:mem:query')"
)
@CyOpeLogAnno
(
title
=
"system-会员表管理-校验实名认证信息"
,
businessType
=
CyLogTypeEnum
.
UPDATE
)
@Operation
(
summary
=
"校验实名认证信息"
,
description
=
"校验实名认证信息"
)
@Parameters
({
@Parameter
(
name
=
"businessId"
,
description
=
"businessId"
,
required
=
false
,
schema
=
@Schema
(
type
=
"string"
))})
@PutMapping
(
"/memInfo/checkIdCard/{userId:\\w+}"
)
@CyEncryptSm4Anno
public
CyResult
checkIdCard
(
@PathVariable
int
userId
,
@RequestBody
MemInfo
memInfo
,
BindingResult
bindingResult
)
{
memInfo
.
setUserId
(
userId
);
CyPersistModel
data
=
memInfoServiceImpl
.
checkIdCard
(
memInfo
);
return
CyResultGenUtil
.
builder
(
data
,
CyMessCons
.
MESSAGE_ALERT_SUCCESS
,
CyMessCons
.
MESSAGE_ALERT_ERROR
,
memInfo
);
}
/**
* 会员基础信息页面-修改个人资料
*/
...
...
src/main/java/org/rcisoft/business/memInfo/service/MemInfoService.java
View file @
7896e132
...
...
@@ -95,8 +95,6 @@ public interface MemInfoService {
ArticleExamStatus
getArticle
(
ArticleExamStatus
articleExamStatus
);
CyPersistModel
checkIdCard
(
MemInfo
memInfo
);
CyPersistModel
update
(
MemInfo
memInfo
);
CyPersistModel
addFollow
(
MemFollowDTO
followDTO
);
...
...
src/main/java/org/rcisoft/business/memInfo/service/impl/MemInfoServiceImpl.java
View file @
7896e132
...
...
@@ -88,8 +88,6 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
@Autowired
private
DictionaryService
dictionaryService
;
@Autowired
private
CyRedisService
cyRedisService
;
@Autowired
private
StringRedisTemplate
redisTemplate
;
@Autowired
private
MemInfoRepository
memInfoRepository
;
...
...
@@ -536,63 +534,6 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
}
/**
* 修改 会员表
* @param memInfo
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
CyPersistModel
checkIdCard
(
MemInfo
memInfo
){
MemInfo
info
=
baseMapper
.
getInfoByUserId
(
String
.
valueOf
(
memInfo
.
getUserId
()));
if
(
"1"
.
equals
(
info
.
getMemRealAuthen
()))
throw
new
CyServiceException
(
"用户已实名,无需再次实名认证"
);
//手机号、身份证存储加密
// if (StringUtils.isNotBlank(memInfo.getMemIdcard()))
// info.setMemIdcard(CyAESUtils.encrypt(memInfo.getMemIdcard()));
// if (StringUtils.isNotBlank(memInfo.getMemRealName()))
// info.setMemRealName(CyAESUtils.encrypt(memInfo.getMemRealName()));
//身份证验重
SysUserRbacDTO
sysUserRbacDTO
=
baseMapper
.
checkIdcardRepeat
(
memInfo
.
getUserId
(),
CyAESUtils
.
encrypt
(
memInfo
.
getMemIdcard
()));
if
(
sysUserRbacDTO
!=
null
)
{
throw
new
CyServiceException
(
UserInfoExceptionEnums
.
ID_NUMBER_EXISTS
);
}
//验证失败次数
//获取ip
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
String
ip
=
CyAddressUtils
.
IpUtils
.
getIpAddr
(
request
);
//1. 同一IP,每分钟失败次数
Object
captcha
=
cyRedisServiceImpl
.
get
(
FaceVerifyRedisBean
.
FACEVERIFY_IP_MINUTES
+
ip
);
if
(
captcha
!=
null
)
{
int
count
=
(
int
)
captcha
;
if
(
count
>=
faceVerifyAliComp
.
getIpMinCount
())
throw
new
CyServiceException
(
"当前IP实名认证发起频繁,请稍后重试"
);
}
//2. 同一IP,每天失败次数
captcha
=
cyRedisServiceImpl
.
get
(
FaceVerifyRedisBean
.
FACEVERIFY_IP_DAY
+
ip
);
if
(
captcha
!=
null
)
{
int
count
=
(
int
)
captcha
;
if
(
count
>=
faceVerifyAliComp
.
getIpDayCount
())
throw
new
CyServiceException
(
"当前IP实名认证次数已达上限,请明日再试!"
);
}
//3. 同一身份证,每分钟失败次数
captcha
=
cyRedisServiceImpl
.
get
(
FaceVerifyRedisBean
.
FACEVERIFY_IDCARD_MINUTES
+
memInfo
.
getMemIdcard
());
if
(
captcha
!=
null
)
{
int
count
=
(
int
)
captcha
;
if
(
count
>=
faceVerifyAliComp
.
getIdCardMinCount
())
throw
new
CyServiceException
(
"实名认证发起频繁,请稍后重试"
);
}
//4. 同一身份证,每天失败次数
captcha
=
cyRedisServiceImpl
.
get
(
FaceVerifyRedisBean
.
FACEVERIFY_IDCARD_DAY
+
memInfo
.
getMemIdcard
());
if
(
captcha
!=
null
)
{
int
count
=
(
int
)
captcha
;
if
(
count
>=
faceVerifyAliComp
.
getIdCardDayCount
())
throw
new
CyServiceException
(
"实名认证次数已达上限,请明日再试!"
);
}
cyRedisServiceImpl
.
set
(
FaceVerifyRedisBean
.
FACEVERIFY_USER
+
memInfo
.
getUserId
(),
memInfo
,
3600L
);
return
new
CyPersistModel
(
1
);
}
/**
* 修改 会员表
* @param memInfo
...
...
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