Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
head_group
xyqb-user2
Commits
af38e4be
Commit
af38e4be
authored
Dec 23, 2019
by
杨锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户修改手机号 - 谛听系统提示文案修改。
parent
7443c1d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
+18
-9
ModifyPhoneNoServiceImpl.java
...roup/xyqb/service/user/impl/ModifyPhoneNoServiceImpl.java
+18
-9
No files found.
src/main/java/cn/quantgroup/xyqb/service/user/impl/ModifyPhoneNoServiceImpl.java
View file @
af38e4be
...
...
@@ -208,8 +208,15 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
modifyPhoneNo
.
setUpdatedAt
(
new
Date
());
}
if
(
ModifyPhoneNoApplyStatusEnum
.
DONE
==
auditReq
.
getApplyStatus
())
{
allowModify4Audit
(
modifyPhoneNo
.
getUserId
(),
modifyPhoneNo
.
getName
(),
modifyPhoneNo
.
getIdCard
(),
modifyPhoneNo
.
getPrevPhoneNo
(),
modifyPhoneNo
.
getCurPhoneNo
());
log
.
info
(
"audit userId = 【{}】, name = 【{}】, idCard = 【{}】, prevPhoneNo = 【{}】, "
+
"curPhoneNo = 【{}】"
,
modifyPhoneNo
.
getUserId
(),
modifyPhoneNo
.
getName
(),
modifyPhoneNo
.
getIdCard
(),
modifyPhoneNo
.
getPrevPhoneNo
(),
modifyPhoneNo
.
getCurPhoneNo
());
if
(
userDetailRepository
.
findByUserIdAndPhoneNoAndNameAndIdNo
(
modifyPhoneNo
.
getUserId
(),
modifyPhoneNo
.
getPrevPhoneNo
(),
modifyPhoneNo
.
getName
(),
modifyPhoneNo
.
getIdCard
())
==
null
)
{
throw
new
DataException
(
"姓名、身份证、电话号不符。"
);
}
if
(
userRepository
.
findByPhoneNo
(
modifyPhoneNo
.
getCurPhoneNo
())
!=
null
)
{
throw
new
DataException
(
"新手机号已存在,不支持更换。"
);
}
checkLoanStatus
(
modifyPhoneNo
.
getUserId
());
userService
.
modifyPhoneNo
(
modifyPhoneNo
.
getPrevPhoneNo
(),
modifyPhoneNo
.
getCurPhoneNo
());
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
DONE
.
ordinal
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
WAIT_4_USER_FEEDBACK
.
ordinal
());
...
...
@@ -235,25 +242,27 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
* @return
*/
public
void
allowModify4Step1
(
Long
userId
,
String
name
,
String
idCard
,
String
prevPhoneNo
,
String
curPhoneNo
,
String
smsCode
)
{
log
.
info
(
"allowModify4Step1 userId = 【{}】, name = 【{}】, idCard = 【{}】, prevPhoneNo = 【{}】, "
+
"curPhoneNo = 【{}】, smsCode = 【{}】"
,
userId
,
name
,
idCard
,
prevPhoneNo
,
curPhoneNo
,
smsCode
);
if
(
modifyPhoneNoRepository
.
findFirstByUserIdAndApplyStatus
(
userId
,
ModifyPhoneNoProcessingStatusEnum
.
INIT
.
ordinal
())
!=
null
)
{
throw
new
DataException
(
"已存在处理中的申请单,不支持再次更换。"
);
}
if
(!
smsService
.
verifyPhoneAndCode
(
curPhoneNo
,
smsCode
))
{
throw
new
DataException
(
"验证码不正确。"
);
}
allowModify4Audit
(
userId
,
name
,
idCard
,
prevPhoneNo
,
curPhoneNo
);
}
/**
* @param userId user.id
*/
public
void
allowModify4Audit
(
Long
userId
,
String
name
,
String
idCard
,
String
prevPhoneNo
,
String
curPhoneNo
)
{
if
(
userDetailRepository
.
findByUserIdAndPhoneNoAndNameAndIdNo
(
userId
,
prevPhoneNo
,
name
,
idCard
)
==
null
)
{
throw
new
DataException
(
"信息填写有误,请重新填写。"
);
}
if
(
userRepository
.
findByPhoneNo
(
curPhoneNo
)
!=
null
)
{
throw
new
DataException
(
"信息填写有误,请重新填写。"
);
}
checkLoanStatus
(
userId
);
}
/**
* @param userId user.id
*/
public
void
checkLoanStatus
(
Long
userId
)
{
log
.
info
(
"allowModify userId = 【{}】"
,
userId
);
String
res
=
httpService
.
get
(
apiHttps
+
"/ex/loan/user/loan_status.json?userId="
+
userId
);
log
.
info
(
"allowModify res = 【{}】"
,
res
);
...
...
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