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
0a42a077a9825d7f90680900ace2a13b9613b54d
1 parent
002ee902
Revert "fix:老认证用户(没有照片认证信息)再次认证时,空指针异常"
This reverts commit
8c0586d6
.
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
19 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 @
0a42a07
...
...
@@ -23,8 +23,6 @@ public interface IZhiMaCertDao {
int
updatePhotoResult
(
@Param
(
"id"
)
int
id
,
@Param
(
"imageUrl"
)
String
imageUrl
,
@Param
(
"validPhoto"
)
int
validPhoto
,
@Param
(
"updateTime"
)
long
updateTime
);
int
updateValidAndPhotoStatusByPrimaryKey
(
int
id
);
//获取生效的认证信息
ZhiMaCert
selectByPrimaryKey
(
int
id
);
...
...
dal/src/main/resources/META-INF/mybatis/users/IZhiMaCertDao.xml
View file @
0a42a07
...
...
@@ -118,15 +118,6 @@
where id = #{id}
</update>
<update
id=
"updateValidAndPhotoStatusByPrimaryKey"
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 @
0a42a07
...
...
@@ -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
.
updateValid
AndPhoto
StatusByPrimaryKey
(
zhiMaCert
.
getId
());
int
updateCount
=
zhiMaCertDao
.
updateValidStatusByPrimaryKey
(
zhiMaCert
.
getId
());
if
(
updateCount
<
1
){
logger
.
warn
(
"queryUserCertify: update certResult fail. reqVO is {}"
,
reqVO
);
throw
new
UfoServiceException
(
400
,
"更新身份认证结果失败!"
);
...
...
@@ -273,14 +273,10 @@ 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
())){
zhiMaCertDao
.
updatePhotoResult
(
zhiMaCert
.
getId
(),
reqVO
.
getFrontImageUrl
()+
","
+
reqVO
.
getBackImageUrl
(),
reqVO
.
getPhotoValidStatus
(),
System
.
currentTimeMillis
()/
1000
);
}
//modify on 2020/12/17,对于老用户没有身份证图片的,再次认证这里抛空指针(reqVO.getPhotoValidStatus())
//这段逻辑去掉,改为新版支付宝结果确认时,身份证信息默认成功
// 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)支付宝实名认证(如果已经认证过了,将不会继续认证)
...
...
Please
register
or
login
to post a comment