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
d3df6fbd
Commit
d3df6fbd
authored
Jun 21, 2017
by
技术部—现金贷—曾丽宾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
改查询条件的显示和 查询内容分隔符换成\n回车符
parent
54058481
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
UserQueryLogController.java
.../controller/external/queryLog/UserQueryLogController.java
+16
-9
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/queryLog/UserQueryLogController.java
View file @
d3df6fbd
...
...
@@ -146,7 +146,8 @@ public class UserQueryLogController {
LOGGER
.
info
(
"token授权异常"
);
return
JsonResult
.
buildErrorStateResult
(
"未授权查询"
,
null
);
}
String
[]
values
=
keyValues
.
split
(
";"
);
//输入enter换行\n
String
[]
values
=
keyValues
.
split
(
"\\n"
);
List
<
String
>
queryV
=
Arrays
.
asList
(
values
);
List
<
UserQueryInfo
>
userQueryInfos
=
new
ArrayList
<
UserQueryInfo
>();
List
<
UserDetail
>
userDetails
=
new
ArrayList
<
UserDetail
>();
...
...
@@ -161,26 +162,32 @@ public class UserQueryLogController {
pageSize
=
200
;
}
//如果维度里面没有保护查询条件则加入条件
if
(!
columns
.
contains
(
key
)){
columns
=
columns
+
","
+
key
;
}
if
(
key
.
equals
(
"userId"
)){
List
<
Long
>
userIds
=
new
ArrayList
<
Long
>();
try
{
for
(
String
s:
queryV
){
if
(
s
.
length
()>
8
){
return
JsonResult
.
buildErrorStateResult
(
"查询的userId长度超过8位"
,
s
);
return
JsonResult
.
buildSuccessResult
(
"查询的userId"
+
s
+
"长度超过8位"
,
null
);
}
long
uid
=
Long
.
valueOf
(
s
);
userIds
.
add
(
uid
);
}
}
catch
(
Exception
e
){
return
JsonResult
.
build
ErrorState
Result
(
"查询的userId有误"
,
null
);
return
JsonResult
.
build
Success
Result
(
"查询的userId有误"
,
null
);
}
userDetailPage
=
userDetailService
.
getUserDetailsPage
(
userIds
,
null
,
null
,
pageId
,
pageSize
,
"auto"
);
}
else
if
(
key
.
equals
(
"phoneNo"
)){
for
(
String
pn:
queryV
){
if
(!
ValidationUtil
.
validatePhoneNo
(
pn
)){
return
JsonResult
.
build
ErrorStateResult
(
"查询的手机号码格式有误"
,
pn
);
return
JsonResult
.
build
SuccessResult
(
"查询的手机号码"
+
pn
+
"格式有误"
,
null
);
}
}
...
...
@@ -189,7 +196,7 @@ public class UserQueryLogController {
IdcardValidator
iv
=
new
IdcardValidator
();
for
(
String
idno:
queryV
){
if
(!
iv
.
is18Idcard
(
idno
)&&!
iv
.
is15Idcard
(
idno
)){
return
JsonResult
.
build
ErrorStateResult
(
"查询的身份证号格式有误"
,
idno
);
return
JsonResult
.
build
SuccessResult
(
"查询的身份证号"
+
idno
+
"格式有误"
,
null
);
}
}
userDetailPage
=
userDetailService
.
getUserDetailsPage
(
null
,
null
,
queryV
,
pageId
,
pageSize
,
"auto"
);
...
...
@@ -349,21 +356,21 @@ public class UserQueryLogController {
try
{
for
(
String
s:
queryV
){
if
(
s
.
length
()>
8
){
return
JsonResult
.
build
ErrorStateResult
(
"查询的userId
长度超过8位"
,
s
);
return
JsonResult
.
build
SuccessResult
(
"查询的userId"
+
s
+
"
长度超过8位"
,
s
);
}
long
uid
=
Long
.
valueOf
(
s
);
userIds
.
add
(
uid
);
}
}
catch
(
Exception
e
){
return
JsonResult
.
build
ErrorState
Result
(
"查询的userId有误"
,
null
);
return
JsonResult
.
build
Success
Result
(
"查询的userId有误"
,
null
);
}
userDetails
=
userDetailService
.
findByUserIdIn
(
userIds
);
}
else
if
(
key
.
equals
(
"phoneNo"
)){
for
(
String
pn:
queryV
){
if
(!
ValidationUtil
.
validatePhoneNo
(
pn
)){
return
JsonResult
.
build
ErrorStateResult
(
"查询的手机号码
格式有误"
,
pn
);
return
JsonResult
.
build
SuccessResult
(
"查询的手机号码"
+
pn
+
"
格式有误"
,
pn
);
}
}
...
...
@@ -372,7 +379,7 @@ public class UserQueryLogController {
IdcardValidator
iv
=
new
IdcardValidator
();
for
(
String
idno:
queryV
){
if
(!
iv
.
is18Idcard
(
idno
)&&!
iv
.
is15Idcard
(
idno
)){
return
JsonResult
.
build
ErrorStateResult
(
"查询的身份证号
格式有误"
,
idno
);
return
JsonResult
.
build
SuccessResult
(
"查询的身份证号"
+
idno
+
"
格式有误"
,
idno
);
}
}
userDetails
=
userDetailService
.
findByIdnos
(
queryV
);
...
...
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