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
6cd08ea2
Commit
6cd08ea2
authored
Nov 07, 2019
by
杨锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code review done。
parent
8087113c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
29 deletions
+17
-29
ModifyPhoneNoApplyStatusEnum.java
...n/quantgroup/user/enums/ModifyPhoneNoApplyStatusEnum.java
+4
-10
ModifyPhoneNoProcessingStatusEnum.java
...ntgroup/user/enums/ModifyPhoneNoProcessingStatusEnum.java
+4
-10
ModifyPhoneNoServiceImpl.java
...roup/xyqb/service/user/impl/ModifyPhoneNoServiceImpl.java
+9
-9
No files found.
src/main/java/cn/quantgroup/user/enums/ModifyPhoneNoApplyStatusEnum.java
View file @
6cd08ea2
...
...
@@ -15,28 +15,22 @@ public enum ModifyPhoneNoApplyStatusEnum {
/**
* 处理中
*/
INIT
(
0
,
"处理中"
),
INIT
(
"处理中"
),
/**
* 修改完成
*/
DONE
(
1
,
"修改完成"
),
DONE
(
"修改完成"
),
/**
* 不允许修改
*/
NO_ALLOW
(
2
,
"不允许修改"
);
/**
* 类型
*/
private
int
ordinal
;
NO_ALLOW
(
"不允许修改"
);
/**
* 描述
*/
private
String
desc
;
ModifyPhoneNoApplyStatusEnum
(
int
ordinal
,
String
desc
)
{
this
.
ordinal
=
ordinal
;
ModifyPhoneNoApplyStatusEnum
(
String
desc
)
{
this
.
desc
=
desc
;
}
}
src/main/java/cn/quantgroup/user/enums/ModifyPhoneNoProcessingStatusEnum.java
View file @
6cd08ea2
...
...
@@ -15,28 +15,22 @@ public enum ModifyPhoneNoProcessingStatusEnum {
/**
* 待人工处理
*/
INIT
(
0
,
"待人工处理"
),
INIT
(
"待人工处理"
),
/**
* 待用户反馈
*/
WAIT_4_USER_FEEDBACK
(
1
,
"待用户反馈"
),
WAIT_4_USER_FEEDBACK
(
"待用户反馈"
),
/**
* 已反馈
*/
DONE
(
2
,
"已反馈"
);
/**
* 类型
*/
private
int
ordinal
;
DONE
(
"已反馈"
);
/**
* 描述
*/
private
String
desc
;
ModifyPhoneNoProcessingStatusEnum
(
int
ordinal
,
String
desc
)
{
this
.
ordinal
=
ordinal
;
ModifyPhoneNoProcessingStatusEnum
(
String
desc
)
{
this
.
desc
=
desc
;
}
}
src/main/java/cn/quantgroup/xyqb/service/user/impl/ModifyPhoneNoServiceImpl.java
View file @
6cd08ea2
...
...
@@ -94,8 +94,8 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
modifyPhoneNo
.
setIdCardFaceUrl
(
step2Req
.
getIdCardFaceUrl
());
modifyPhoneNo
.
setIdCardRearUrl
(
step2Req
.
getIdCardRearUrl
());
modifyPhoneNo
.
setIdCardHoldUrl
(
step2Req
.
getIdCardHoldUrl
());
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
INIT
.
getO
rdinal
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
INIT
.
getO
rdinal
());
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
INIT
.
o
rdinal
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
INIT
.
o
rdinal
());
}
/**
...
...
@@ -108,7 +108,7 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
*/
@Override
public
Integer
progress
(
Long
userId
)
{
ModifyPhoneNo
modifyPhoneNo
=
modifyPhoneNoRepository
.
findFirstByUserIdAndApplyStatus
(
userId
,
ModifyPhoneNoApplyStatusEnum
.
INIT
.
getO
rdinal
());
ModifyPhoneNo
modifyPhoneNo
=
modifyPhoneNoRepository
.
findFirstByUserIdAndApplyStatus
(
userId
,
ModifyPhoneNoApplyStatusEnum
.
INIT
.
o
rdinal
());
if
(
modifyPhoneNo
==
null
)
{
return
0
;
}
...
...
@@ -141,10 +141,10 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
list
.
add
(
criteriaBuilder
.
lessThanOrEqualTo
(
root
.
get
(
"createdAt"
),
DateUtils
.
strToDate
(
modifyPhoneNoQueryReq
.
getEndAt
(),
DateUtils
.
YMD_FORMAT
)));
}
if
(
modifyPhoneNoQueryReq
.
getApplyStatus
()
!=
null
)
{
list
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"applyStatus"
),
modifyPhoneNoQueryReq
.
getApplyStatus
().
getO
rdinal
()));
list
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"applyStatus"
),
modifyPhoneNoQueryReq
.
getApplyStatus
().
o
rdinal
()));
}
if
(
modifyPhoneNoQueryReq
.
getProcessingStatus
()
!=
null
)
{
list
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"processingStatus"
),
modifyPhoneNoQueryReq
.
getProcessingStatus
().
getO
rdinal
()));
list
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"processingStatus"
),
modifyPhoneNoQueryReq
.
getProcessingStatus
().
o
rdinal
()));
}
Predicate
[]
arr
=
new
Predicate
[
list
.
size
()];
return
criteriaBuilder
.
and
(
list
.
toArray
(
arr
));
...
...
@@ -180,7 +180,7 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
if
(
modifyPhoneNo
==
null
)
{
throw
new
DataException
(
"数据不存在。"
);
}
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
DONE
.
getO
rdinal
());
modifyPhoneNo
.
setProcessingStatus
(
ModifyPhoneNoProcessingStatusEnum
.
DONE
.
o
rdinal
());
}
@Override
...
...
@@ -191,14 +191,14 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
throw
new
DataException
(
"数据不存在。"
);
}
if
(
ModifyPhoneNoApplyStatusEnum
.
NO_ALLOW
==
auditReq
.
getApplyStatus
())
{
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
NO_ALLOW
.
getO
rdinal
());
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
NO_ALLOW
.
o
rdinal
());
modifyPhoneNo
.
setApplyStatusReason
(
auditReq
.
getApplyStatusReason
());
}
if
(
ModifyPhoneNoApplyStatusEnum
.
DONE
==
auditReq
.
getApplyStatus
())
{
allowModify4Audit
(
modifyPhoneNo
.
getUserId
(),
modifyPhoneNo
.
getName
(),
modifyPhoneNo
.
getIdCard
(),
modifyPhoneNo
.
getPrevPhoneNo
(),
modifyPhoneNo
.
getCurPhoneNo
());
userService
.
modifyPhoneNo
(
modifyPhoneNo
.
getPrevPhoneNo
(),
modifyPhoneNo
.
getCurPhoneNo
());
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
DONE
.
getO
rdinal
());
modifyPhoneNo
.
setApplyStatus
(
ModifyPhoneNoApplyStatusEnum
.
DONE
.
o
rdinal
());
}
}
...
...
@@ -220,7 +220,7 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
* @return
*/
public
void
allowModify4Step1
(
Long
userId
,
String
name
,
String
idCard
,
String
prevPhoneNo
,
String
curPhoneNo
,
String
smsCode
)
{
if
(
modifyPhoneNoRepository
.
findFirstByUserIdAndApplyStatus
(
userId
,
ModifyPhoneNoProcessingStatusEnum
.
INIT
.
getO
rdinal
())
!=
null
)
{
if
(
modifyPhoneNoRepository
.
findFirstByUserIdAndApplyStatus
(
userId
,
ModifyPhoneNoProcessingStatusEnum
.
INIT
.
o
rdinal
())
!=
null
)
{
throw
new
DataException
(
"已存在处理中的申请单,不支持再次更换。"
);
}
if
(!
smsService
.
verifyPhoneAndCode
(
curPhoneNo
,
smsCode
))
{
...
...
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