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
49a234a7
Commit
49a234a7
authored
Nov 11, 2019
by
杨锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app - 申请修改手机号Step_2 协议修改。
parent
45f80845
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
10 deletions
+43
-10
ModifyPhoneNoController.java
...yqb/controller/modifyphoneno/ModifyPhoneNoController.java
+2
-1
ProgressResp.java
...roup/xyqb/controller/modifyphoneno/resp/ProgressResp.java
+26
-0
IModifyPhoneNoService.java
...n/quantgroup/xyqb/service/user/IModifyPhoneNoService.java
+2
-1
ModifyPhoneNoServiceImpl.java
...roup/xyqb/service/user/impl/ModifyPhoneNoServiceImpl.java
+13
-8
No files found.
src/main/java/cn/quantgroup/xyqb/controller/modifyphoneno/ModifyPhoneNoController.java
View file @
49a234a7
...
...
@@ -5,6 +5,7 @@ import cn.quantgroup.xyqb.controller.modifyphoneno.req.AuditReq;
import
cn.quantgroup.xyqb.controller.modifyphoneno.req.ModifyPhoneNoQueryReq
;
import
cn.quantgroup.xyqb.controller.modifyphoneno.req.Step1Req
;
import
cn.quantgroup.xyqb.controller.modifyphoneno.req.Step2Req
;
import
cn.quantgroup.xyqb.controller.modifyphoneno.resp.ProgressResp
;
import
cn.quantgroup.xyqb.entity.ModifyPhoneNo
;
import
cn.quantgroup.xyqb.entity.User
;
import
cn.quantgroup.xyqb.model.JsonResult
;
...
...
@@ -35,7 +36,7 @@ public class ModifyPhoneNoController implements IBaseController {
@ApiOperation
(
"app - 查询用户手机号修改进度"
)
@GetMapping
(
"/progress"
)
public
JsonResult
progress
()
{
public
JsonResult
<
ProgressResp
>
progress
()
{
User
user
=
getCurrentUserFromRedis
();
if
(
user
==
null
)
{
return
JsonResult
.
buildErrorStateResult
(
"系统错误"
,
null
);
...
...
src/main/java/cn/quantgroup/xyqb/controller/modifyphoneno/resp/ProgressResp.java
0 → 100644
View file @
49a234a7
package
cn
.
quantgroup
.
xyqb
.
controller
.
modifyphoneno
.
resp
;
import
lombok.Data
;
/**
* 用户手机号修改进度
* <p>
* Date: 2019/11/11
* Time: 下午4:34
*
* @author: yangrui
*/
@Data
public
class
ProgressResp
{
/**
* 进度
* 0初始化(用户未填写过申请单或提交过的申请单均已处理完成且反馈);
* 1已填写基本信息,未上传身份证图片;
* 2已填写基本信息,且已上传身份证图片
*/
private
Integer
progress
;
/**
* 当progress = 1时,该值不为空,为api step2需要的id。
*/
private
Long
id
;
}
src/main/java/cn/quantgroup/xyqb/service/user/IModifyPhoneNoService.java
View file @
49a234a7
...
...
@@ -4,6 +4,7 @@ import cn.quantgroup.xyqb.controller.modifyphoneno.req.AuditReq;
import
cn.quantgroup.xyqb.controller.modifyphoneno.req.ModifyPhoneNoQueryReq
;
import
cn.quantgroup.xyqb.controller.modifyphoneno.req.Step1Req
;
import
cn.quantgroup.xyqb.controller.modifyphoneno.req.Step2Req
;
import
cn.quantgroup.xyqb.controller.modifyphoneno.resp.ProgressResp
;
import
cn.quantgroup.xyqb.entity.ModifyPhoneNo
;
import
org.springframework.data.domain.Page
;
...
...
@@ -25,7 +26,7 @@ public interface IModifyPhoneNoService {
*/
void
saveStep2
(
Step2Req
step2Req
);
Integer
progress
(
Long
id
);
ProgressResp
progress
(
Long
id
);
Page
<
ModifyPhoneNo
>
list
(
ModifyPhoneNoQueryReq
modifyPhoneNoQueryReq
);
...
...
src/main/java/cn/quantgroup/xyqb/service/user/impl/ModifyPhoneNoServiceImpl.java
View file @
49a234a7
...
...
@@ -7,6 +7,7 @@ import cn.quantgroup.xyqb.controller.modifyphoneno.req.AuditReq;
import
cn.quantgroup.xyqb.controller.modifyphoneno.req.ModifyPhoneNoQueryReq
;
import
cn.quantgroup.xyqb.controller.modifyphoneno.req.Step1Req
;
import
cn.quantgroup.xyqb.controller.modifyphoneno.req.Step2Req
;
import
cn.quantgroup.xyqb.controller.modifyphoneno.resp.ProgressResp
;
import
cn.quantgroup.xyqb.controller.modifyphoneno.resp.UserLoanStatusResp
;
import
cn.quantgroup.xyqb.entity.ModifyPhoneNo
;
import
cn.quantgroup.xyqb.exception.DataException
;
...
...
@@ -105,23 +106,27 @@ public class ModifyPhoneNoServiceImpl implements IModifyPhoneNoService {
* 查询用户手机号修改进度
*
* @param userId user.id
* @return 进度 0初始化(用户未填写过申请单或提交过的申请单均已处理完成且反馈);
* 1已填写基本信息,未上传身份证图片;
* 2已填写基本信息,且已上传身份证图片
* @return
*/
@Override
public
Integer
progress
(
Long
userId
)
{
public
ProgressResp
progress
(
Long
userId
)
{
ProgressResp
progressResp
=
new
ProgressResp
();
ModifyPhoneNo
modifyPhoneNo
=
modifyPhoneNoRepository
.
findFirstByUserIdAndApplyStatus
(
userId
,
ModifyPhoneNoApplyStatusEnum
.
INIT
.
ordinal
());
if
(
modifyPhoneNo
==
null
)
{
return
0
;
progressResp
.
setProgress
(
0
);
return
progressResp
;
}
if
(
StringUtils
.
isBlank
(
modifyPhoneNo
.
getIdCardFaceUrl
())
&&
StringUtils
.
isBlank
(
modifyPhoneNo
.
getIdCardRearUrl
())
&&
StringUtils
.
isBlank
(
modifyPhoneNo
.
getIdCardHoldUrl
()))
{
return
1
;
progressResp
.
setProgress
(
1
);
progressResp
.
setId
(
modifyPhoneNo
.
getId
());
return
progressResp
;
}
if
(
StringUtils
.
isNotBlank
(
modifyPhoneNo
.
getIdCardFaceUrl
())
&&
StringUtils
.
isNotBlank
(
modifyPhoneNo
.
getIdCardRearUrl
())
&&
StringUtils
.
isNotBlank
(
modifyPhoneNo
.
getIdCardHoldUrl
()))
{
return
2
;
progressResp
.
setProgress
(
2
);
return
progressResp
;
}
return
-
1
;
progressResp
.
setProgress
(-
1
);
return
progressResp
;
}
@Override
...
...
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