Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
yohoufo-fore
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
chenjian
4 years ago
Commit
e8c793bb449f961d2d0c540e2a0a47621dcd324d
1 parent
54fd45ba
fix:对于valid_status=1,photo_status=0的用户的认证
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
dal/src/main/java/com/yohoufo/dal/user/IZhiMaCertDao.java
dal/src/main/resources/META-INF/mybatis/users/IZhiMaCertDao.xml
users/src/main/java/com/yohoufo/user/service/impl/CertificationServiceImpl.java
dal/src/main/java/com/yohoufo/dal/user/IZhiMaCertDao.java
View file @
e8c793b
...
...
@@ -23,6 +23,8 @@ public interface IZhiMaCertDao {
int
updatePhotoResult
(
@Param
(
"id"
)
int
id
,
@Param
(
"imageUrl"
)
String
imageUrl
,
@Param
(
"validPhoto"
)
int
validPhoto
,
@Param
(
"updateTime"
)
long
updateTime
);
int
updateStatusPassFully
(
int
id
);
//获取生效的认证信息
ZhiMaCert
selectByPrimaryKey
(
int
id
);
...
...
dal/src/main/resources/META-INF/mybatis/users/IZhiMaCertDao.xml
View file @
e8c793b
...
...
@@ -118,6 +118,15 @@
where id = #{id}
</update>
<update
id=
"updateStatusPassFully"
parameterType=
"java.lang.Integer"
>
update zhima_cert
set valid_status = 1,
valid_photo = 1,
image_url = 'null,null',
update_time = unix_timestamp()
where id = #{id,jdbcType=INTEGER}
</update>
<!--
<delete id="deleteByUid" parameterType="java.lang.Integer">
update zhima_cert
...
...
users/src/main/java/com/yohoufo/user/service/impl/CertificationServiceImpl.java
View file @
e8c793b
...
...
@@ -197,7 +197,7 @@ public class CertificationServiceImpl implements ICertificationService {
}
JSONObject
result
=
JSONObject
.
parseObject
(
response
.
getBody
()).
getJSONObject
(
"alipay_user_certify_open_query_response"
);
if
(
"Success"
.
equals
(
result
.
get
(
"msg"
))
&&
"T"
.
equals
(
result
.
get
(
"passed"
))){
int
updateCount
=
zhiMaCertDao
.
update
ValidStatusByPrimaryKe
y
(
zhiMaCert
.
getId
());
int
updateCount
=
zhiMaCertDao
.
update
StatusPassFull
y
(
zhiMaCert
.
getId
());
if
(
updateCount
<
1
){
logger
.
warn
(
"queryUserCertify: update certResult fail. reqVO is {}"
,
reqVO
);
throw
new
UfoServiceException
(
400
,
"更新身份认证结果失败!"
);
...
...
@@ -273,14 +273,17 @@ public class CertificationServiceImpl implements ICertificationService {
zhiMaCert
.
setCreateTime
(
System
.
currentTimeMillis
()/
1000
);
zhiMaCert
.
setUpdateTime
(
System
.
currentTimeMillis
()/
1000
);
zhiMaCertDao
.
insertAndGetID
(
zhiMaCert
);
}
else
if
(
null
!=
zhiMaCert
&&
!
CertPhotoEnum
.
isValidStatus
(
zhiMaCert
.
getValidPhoto
())){
}
/*
else if(null != zhiMaCert && !CertPhotoEnum.isValidStatus(zhiMaCert.getValidPhoto())){
zhiMaCertDao.updatePhotoResult(zhiMaCert.getId(), reqVO.getFrontImageUrl()+","+reqVO.getBackImageUrl(),
reqVO.getPhotoValidStatus(), System.currentTimeMillis()/1000);
}
*/
logger
.
info
(
"beginCertificateEx: save db success. reqVO is {}, zhiMaCert is {}"
,
reqVO
,
zhiMaCert
);
//(8)支付宝实名认证(如果已经认证过了,将不会继续认证)
if
(
null
==
zhiMaCert
||
1
!=
zhiMaCert
.
getValidStatus
())
{
if
(
null
==
zhiMaCert
||
1
!=
zhiMaCert
.
getValidStatus
()
||
!
CertPhotoEnum
.
isValidStatus
(
zhiMaCert
.
getValidPhoto
())
)
{
alipayService
.
beginAlipayCertEx
(
reqVO
,
zhiMaCert
,
respBO
);
//开始支付宝刷脸认证
logger
.
info
(
"beginCertificateEx: call alipay certify end. reqVO is {}, zhiMaCert is {}, respBO is {}"
,
reqVO
,
zhiMaCert
,
respBO
);
}
...
...
Please
register
or
login
to post a comment