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
61681f90
Commit
61681f90
authored
Nov 19, 2018
by
xiaoguang.xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉 /user/save 没用的参数
parent
f6eeedbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
33 deletions
+17
-33
InnerController.java
...tgroup/xyqb/controller/external/user/InnerController.java
+17
-33
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/user/InnerController.java
View file @
61681f90
...
...
@@ -101,6 +101,7 @@ public class InnerController implements IBaseController {
'x'
,
'y'
,
'z'
,
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
};
/**
* 根据手机号或身份证号查询用户UUID
*
...
...
@@ -224,10 +225,8 @@ public class InnerController implements IBaseController {
@RequestMapping
(
"/user/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"注册用户"
)
public
JsonResult
saveUser
(
String
phoneNo
,
Long
registeredFrom
,
Long
createdAt
,
Long
updatedAt
,
String
password
,
String
uuid
)
{
log
.
info
(
"保存用户,phoneNo:{},registeredFrom;{},uuid:{},createdAt:{},updatedAt:{}"
,
phoneNo
,
registeredFrom
,
uuid
,
createdAt
,
updatedAt
);
public
JsonResult
saveUser
(
String
phoneNo
,
Long
registeredFrom
)
{
log
.
info
(
"保存用户,phoneNo:{},registeredFrom:{}"
,
phoneNo
,
registeredFrom
);
//参数验证
if
(
StringUtils
.
isBlank
(
phoneNo
))
{
return
JsonResult
.
buildErrorStateResult
(
"用户手机号不能为空."
,
null
);
...
...
@@ -235,34 +234,19 @@ public class InnerController implements IBaseController {
if
(
registeredFrom
==
null
)
{
registeredFrom
=
0L
;
}
if
(
StringUtils
.
isBlank
(
password
))
{
password
=
genRandomPwd
();
}
if
(
StringUtils
.
isBlank
(
uuid
))
{
return
JsonResult
.
buildErrorStateResult
(
"用户uuid为空."
,
null
);
}
if
(
createdAt
==
0L
||
updatedAt
==
0L
)
{
createdAt
=
System
.
currentTimeMillis
();
updatedAt
=
System
.
currentTimeMillis
();
}
User
user
=
userService
.
findByPhoneWithCache
(
phoneNo
);
if
(
user
==
null
)
{
user
=
new
User
();
user
.
setCreatedAt
(
new
Timestamp
(
createdAt
));
}
else
if
(!
user
.
getEnable
())
{
log
.
info
(
"用户已经注销,phoneNo:{}"
,
phoneNo
);
return
JsonResult
.
buildErrorStateResult
(
"用户已经注销"
,
null
);
}
if
(
org
.
apache
.
commons
.
lang
.
StringUtils
.
isEmpty
(
user
.
getUuid
()))
{
user
.
setUuid
(
uuid
);
}
user
.
setPhoneNo
(
phoneNo
);
user
.
setUpdatedAt
(
new
Timestamp
(
updatedAt
));
user
.
setEnable
(
true
);
user
.
setRegisteredFrom
(
registeredFrom
);
user
.
setUuid
(
uuid
);
user
.
setPassword
(
password
);
user
=
userService
.
saveUser
(
user
);
if
(
user
!=
null
)
{
//存在已注销
if
(!
user
.
getEnable
())
{
log
.
info
(
"用户已经注销,phoneNo:{}"
,
phoneNo
);
return
JsonResult
.
buildErrorStateResult
(
"用户已经注销"
,
null
);
}
//已存在用户
return
JsonResult
.
buildSuccessResult
(
null
,
new
UserRet
(
user
));
}
//注册新用户
user
=
userRegisterService
.
register
(
registeredFrom
,
phoneNo
,
null
,
null
,
0L
,
0L
);
return
JsonResult
.
buildSuccessResult
(
null
,
new
UserRet
(
user
));
}
...
...
@@ -623,7 +607,7 @@ public class InnerController implements IBaseController {
* @param name - 姓名
* @param phoneNo - 手机号
* @param idNo - 身份证号
* @return JsonResult<List
<
UserDetail>>
* @return JsonResult<List
<
UserDetail>>
*/
@RequestMapping
(
"/user_detail/search_list"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"按照姓名、份证号或手机号查询用户实名信息 - 精确查询,供客服用,不限制入参正确性"
)
...
...
@@ -642,7 +626,7 @@ public class InnerController implements IBaseController {
*
* @param phoneNo - 手机号
* @param idNo - 身份证号
* @return JsonResult<List
<
UserDetail>>
* @return JsonResult<List
<
UserDetail>>
*/
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"按照身份证号和手机号查询用户实名信息查询 - 模糊查询"
)
@RequestMapping
(
"/user_detail/fuzzyQuery"
)
...
...
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