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
898a6fb2
Commit
898a6fb2
authored
Mar 06, 2018
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实践编码规约
parent
e844a6ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
40 deletions
+62
-40
UserQueryLogController.java
.../controller/external/queryLog/UserQueryLogController.java
+43
-33
UserQueryInfo.java
src/main/java/cn/quantgroup/xyqb/model/UserQueryInfo.java
+19
-7
No files found.
src/main/java/cn/quantgroup/xyqb/controller/external/queryLog/UserQueryLogController.java
View file @
898a6fb2
...
@@ -69,20 +69,18 @@ public class UserQueryLogController {
...
@@ -69,20 +69,18 @@ public class UserQueryLogController {
@Autowired
@Autowired
private
IHttpService
httpService
;
private
IHttpService
httpService
;
private
static
final
String
publicKey
=
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCYiw1PKWnCbkKyzHK+blHpKTR/qtO3Oq7nvjSdcopCSmOJqji3B+qJMrf03242mYJIQeF3YSTQZTfri5EkNgoqn0Y/KYpLAKuq89jPdIkB3lvirvew9tpfbAT4B14WgoWdMH5ooqBt0ly3f+JjoBM5dKFTOrhckhFDoaB3UAaaiQIDAQAB"
;
private
static
final
String
PUBLIC_KEY
=
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCYiw1PKWnCbkKyzHK+blHpKTR/qtO3Oq7nvjSdcopCSmOJqji3B+qJMrf03242mYJIQeF3YSTQZTfri5EkNgoqn0Y/KYpLAKuq89jPdIkB3lvirvew9tpfbAT4B14WgoWdMH5ooqBt0ly3f+JjoBM5dKFTOrhckhFDoaB3UAaaiQIDAQAB"
;
private
static
final
String
privateKey
=
"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJiLDU8pacJuQrLMcr5uUekpNH+q07c6rue+NJ1yikJKY4mqOLcH6okyt/TfbjaZgkhB4XdhJNBlN+uLkSQ2CiqfRj8piksAq6rz2M90iQHeW+Ku97D22l9sBPgHXhaChZ0wfmiioG3SXLd/4mOgEzl0oVM6uFySEUOhoHdQBpqJAgMBAAECgYA3DfCWwoaWEr9l0p4TFrPfZ+y3qwrQVZCsuRw6Ow2lUT3NgK8JeATw0WpNKZqYgBziQUzDjj8AK5fcHjobDJnsKGqC2VQ+j05hQZztoHTrYxOx6xrGxIzqmbt/dPsw779xXSRJu3DuUeCm6CrGZpVpPX/NtXBxIhXRY2KRNa1SZQJBAPMboc+M6/OeGPQqFvXg9jgEWcosBpy6HtukfjONQAVuM5e0pZa8SQCLhcoHgbbqcEhbDAJEqr9x9eZjjFPSt08CQQCgoe/hOVf0s5oo1IM1TVEUkGOIzVVlyTMwu0p4jwt3987D7BKZe7mCl41quWDwL4JIQ0GcivVMpJzYsDBZHRqnAkBMgCKAHHlXdSWnF+OXxg3U/NGAhDAke5EgTvgDouxFiTMlBwygjWlviXg1Zf1UoRtqOXRi9lbA3cyijirnacSTAkBmve0ug30MmOvbfcHGkANyQcBIOf2LMxu46bKCVgwh2bC4hACJhydqrgDX6GZmehy8l7gZpo+rTAa+WkMyXHk1AkEArt6ElkyNI7TDu0By59Zin05tuZJr6QoMXs9bVH+xP3OBG1KfPYTBc9yb5MOjXIxAjyGGeDpUfhuUDBe56GTOBA=="
;
private
static
final
String
PRIVATE_KEY
=
"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJiLDU8pacJuQrLMcr5uUekpNH+q07c6rue+NJ1yikJKY4mqOLcH6okyt/TfbjaZgkhB4XdhJNBlN+uLkSQ2CiqfRj8piksAq6rz2M90iQHeW+Ku97D22l9sBPgHXhaChZ0wfmiioG3SXLd/4mOgEzl0oVM6uFySEUOhoHdQBpqJAgMBAAECgYA3DfCWwoaWEr9l0p4TFrPfZ+y3qwrQVZCsuRw6Ow2lUT3NgK8JeATw0WpNKZqYgBziQUzDjj8AK5fcHjobDJnsKGqC2VQ+j05hQZztoHTrYxOx6xrGxIzqmbt/dPsw779xXSRJu3DuUeCm6CrGZpVpPX/NtXBxIhXRY2KRNa1SZQJBAPMboc+M6/OeGPQqFvXg9jgEWcosBpy6HtukfjONQAVuM5e0pZa8SQCLhcoHgbbqcEhbDAJEqr9x9eZjjFPSt08CQQCgoe/hOVf0s5oo1IM1TVEUkGOIzVVlyTMwu0p4jwt3987D7BKZe7mCl41quWDwL4JIQ0GcivVMpJzYsDBZHRqnAkBMgCKAHHlXdSWnF+OXxg3U/NGAhDAke5EgTvgDouxFiTMlBwygjWlviXg1Zf1UoRtqOXRi9lbA3cyijirnacSTAkBmve0ug30MmOvbfcHGkANyQcBIOf2LMxu46bKCVgwh2bC4hACJhydqrgDX6GZmehy8l7gZpo+rTAa+WkMyXHk1AkEArt6ElkyNI7TDu0By59Zin05tuZJr6QoMXs9bVH+xP3OBG1KfPYTBc9yb5MOjXIxAjyGGeDpUfhuUDBe56GTOBA=="
;
@RequestMapping
(
"/queryLog"
)
@RequestMapping
(
"/queryLog"
)
public
JsonResult
queryLog
(
HttpServletRequest
request
,
@RequestParam
(
required
=
false
)
String
beginDate
,
@RequestParam
(
required
=
false
)
String
endDate
,
Integer
pageId
,
Integer
pageSize
)
{
public
JsonResult
queryLog
(
HttpServletRequest
request
,
@RequestParam
(
required
=
false
)
String
beginDate
,
@RequestParam
(
required
=
false
)
String
endDate
,
Integer
pageId
,
Integer
pageSize
)
{
LOGGER
.
info
(
"查询日期:beginDate{},endDate{}"
,
beginDate
,
endDate
);
LOGGER
.
info
(
"查询日期:beginDate{},endDate{}"
,
beginDate
,
endDate
);
String
token
=
request
.
getHeader
(
Constants
.
X_AUTH_TOKEN
);
String
token
=
request
.
getHeader
(
Constants
.
X_AUTH_TOKEN
);
if
(
token
==
null
||
token
.
equals
(
""
)){
if
(
StringUtils
.
isEmpty
(
token
)){
LOGGER
.
info
(
"token为空,非法查询"
);
LOGGER
.
info
(
"token为空,非法查询"
);
return
JsonResult
.
buildErrorStateResult
(
"缺少授权信息"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"缺少授权信息"
,
null
);
}
}
if
(
StringUtils
.
isEmpty
(
checkUserToken
(
token
))){
if
(
checkUserToken
(
token
).
equals
(
""
)){
LOGGER
.
info
(
"token授权异常"
);
LOGGER
.
info
(
"token授权异常"
);
return
JsonResult
.
buildErrorStateResult
(
"未授权查询"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"未授权查询"
,
null
);
}
}
...
@@ -144,7 +142,7 @@ public class UserQueryLogController {
...
@@ -144,7 +142,7 @@ public class UserQueryLogController {
LOGGER
.
info
(
"查询条件:key{},columns{}"
,
key
,
columns
);
LOGGER
.
info
(
"查询条件:key{},columns{}"
,
key
,
columns
);
String
token
=
request
.
getHeader
(
Constants
.
X_AUTH_TOKEN
);
String
token
=
request
.
getHeader
(
Constants
.
X_AUTH_TOKEN
);
if
(
token
==
null
||
token
.
equals
(
""
)){
if
(
StringUtils
.
isEmpty
(
token
)){
LOGGER
.
info
(
"token为空,非法查询"
);
LOGGER
.
info
(
"token为空,非法查询"
);
return
JsonResult
.
buildErrorStateResult
(
"缺少授权信息"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"缺少授权信息"
,
null
);
}
}
...
@@ -154,7 +152,7 @@ public class UserQueryLogController {
...
@@ -154,7 +152,7 @@ public class UserQueryLogController {
//后台参数校验
//后台参数校验
//校验用户权限
//校验用户权限
String
userName
=
checkUserToken
(
token
);
String
userName
=
checkUserToken
(
token
);
if
(
userName
.
equals
(
""
)){
if
(
StringUtils
.
isEmpty
(
userName
)){
LOGGER
.
info
(
"token授权异常"
);
LOGGER
.
info
(
"token授权异常"
);
return
JsonResult
.
buildErrorStateResult
(
"未授权查询"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"未授权查询"
,
null
);
}
}
...
@@ -187,7 +185,7 @@ public class UserQueryLogController {
...
@@ -187,7 +185,7 @@ public class UserQueryLogController {
columns
=
columns
+
","
+
key
;
columns
=
columns
+
","
+
key
;
}
}
if
(
key
.
equals
(
"userId"
)){
if
(
Objects
.
equals
(
key
,
"userId"
)){
List
<
Long
>
userIds
=
new
ArrayList
<
Long
>();
List
<
Long
>
userIds
=
new
ArrayList
<
Long
>();
try
{
try
{
for
(
String
s:
queryV
){
for
(
String
s:
queryV
){
...
@@ -204,7 +202,7 @@ public class UserQueryLogController {
...
@@ -204,7 +202,7 @@ public class UserQueryLogController {
}
}
userDetailPage
=
userDetailService
.
getUserDetailsPage
(
userIds
,
null
,
null
,
pageId
,
pageSize
,
"auto"
);
userDetailPage
=
userDetailService
.
getUserDetailsPage
(
userIds
,
null
,
null
,
pageId
,
pageSize
,
"auto"
);
}
else
if
(
key
.
equals
(
Constants
.
PHONE_NO
)){
}
else
if
(
Objects
.
equals
(
key
,
Constants
.
PHONE_NO
)){
for
(
String
pn:
queryV
){
for
(
String
pn:
queryV
){
if
(!
ValidationUtil
.
validatePhoneNo
(
pn
)){
if
(!
ValidationUtil
.
validatePhoneNo
(
pn
)){
return
JsonResult
.
buildErrorStateResult
(
"查询的手机号码"
+
pn
+
"格式有误"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"查询的手机号码"
+
pn
+
"格式有误"
,
null
);
...
@@ -212,7 +210,7 @@ public class UserQueryLogController {
...
@@ -212,7 +210,7 @@ public class UserQueryLogController {
}
}
userDetailPage
=
userDetailService
.
getUserDetailsPage
(
null
,
queryV
,
null
,
pageId
,
pageSize
,
"auto"
);
userDetailPage
=
userDetailService
.
getUserDetailsPage
(
null
,
queryV
,
null
,
pageId
,
pageSize
,
"auto"
);
}
else
if
(
key
.
equals
(
"idNo"
)){
}
else
if
(
Objects
.
equals
(
key
,
"idNo"
)){
IdcardValidator
iv
=
new
IdcardValidator
();
IdcardValidator
iv
=
new
IdcardValidator
();
for
(
String
idno:
queryV
){
for
(
String
idno:
queryV
){
if
(!
iv
.
is18Idcard
(
idno
)&&!
iv
.
is15Idcard
(
idno
)){
if
(!
iv
.
is18Idcard
(
idno
)&&!
iv
.
is15Idcard
(
idno
)){
...
@@ -229,9 +227,9 @@ public class UserQueryLogController {
...
@@ -229,9 +227,9 @@ public class UserQueryLogController {
if
(
columns
.
contains
(
"bankCard"
)){
if
(
columns
.
contains
(
"bankCard"
)){
//需加银行卡信息
//需加银行卡信息
if
(
key
.
equals
(
Constants
.
PHONE_NO
)){
if
(
Objects
.
equals
(
key
,
Constants
.
PHONE_NO
)){
phonesCards
=
getBankCardsByPhoneNos
(
queryV
);
phonesCards
=
getBankCardsByPhoneNos
(
queryV
);
if
(
phonesCards
!=
null
&&
phonesCards
.
get
(
"errorMsg"
)!=
null
&&!
phonesCards
.
get
(
"errorMsg"
).
equals
(
""
)){
if
(
phonesCards
!=
null
&&
phonesCards
.
get
(
"errorMsg"
)!=
null
&&!
StringUtils
.
isEmpty
(
phonesCards
.
get
(
"errorMsg"
)
)){
return
JsonResult
.
buildErrorStateResult
(
phonesCards
.
get
(
"errorMsg"
),
null
);
return
JsonResult
.
buildErrorStateResult
(
phonesCards
.
get
(
"errorMsg"
),
null
);
}
}
}
else
{
}
else
{
...
@@ -240,7 +238,7 @@ public class UserQueryLogController {
...
@@ -240,7 +238,7 @@ public class UserQueryLogController {
phones
.
add
(
uda
.
getPhoneNo
());
phones
.
add
(
uda
.
getPhoneNo
());
}
}
phonesCards
=
getBankCardsByPhoneNos
(
phones
);
phonesCards
=
getBankCardsByPhoneNos
(
phones
);
if
(
phonesCards
!=
null
&&
phonesCards
.
get
(
"errorMsg"
)!=
null
&&!
phonesCards
.
get
(
"errorMsg"
).
equals
(
""
)){
if
(
phonesCards
!=
null
&&
phonesCards
.
get
(
"errorMsg"
)!=
null
&&!
StringUtils
.
isEmpty
(
phonesCards
.
get
(
"errorMsg"
)
)){
return
JsonResult
.
buildErrorStateResult
(
phonesCards
.
get
(
"errorMsg"
),
null
);
return
JsonResult
.
buildErrorStateResult
(
phonesCards
.
get
(
"errorMsg"
),
null
);
}
}
}
}
...
@@ -267,11 +265,14 @@ public class UserQueryLogController {
...
@@ -267,11 +265,14 @@ public class UserQueryLogController {
if
(
columns
.
contains
(
Constants
.
PHONE_NO
)){
if
(
columns
.
contains
(
Constants
.
PHONE_NO
)){
uqi
.
setPhoneNo
(
ud
.
getPhoneNo
());
uqi
.
setPhoneNo
(
ud
.
getPhoneNo
());
}
}
if
(
columns
.
contains
(
"name"
)){
uqi
.
setName
(
ud
.
getName
());
}
if
(
columns
.
contains
(
"userId"
)){
if
(
columns
.
contains
(
"userId"
)){
uqi
.
setUserId
(
ud
.
getUserId
());
uqi
.
setUserId
(
ud
.
getUserId
());
}
}
if
(
columns
.
contains
(
"address"
)){
if
(
columns
.
contains
(
"address"
)){
Optional
<
Address
>
oad
=
addresslist
.
stream
().
filter
(
addr
->
addr
.
getUserId
()==
ud
.
getUserId
(
)).
findFirst
();
Optional
<
Address
>
oad
=
addresslist
.
stream
().
filter
(
addr
->
Objects
.
equals
(
addr
.
getUserId
(),
ud
.
getUserId
()
)).
findFirst
();
if
(
oad
.
isPresent
()){
if
(
oad
.
isPresent
()){
uqi
.
setAddress
(
oad
.
get
().
toString
());
uqi
.
setAddress
(
oad
.
get
().
toString
());
}
}
...
@@ -286,10 +287,10 @@ public class UserQueryLogController {
...
@@ -286,10 +287,10 @@ public class UserQueryLogController {
//保存记录
//保存记录
UserQueryLog
log
=
new
UserQueryLog
();
UserQueryLog
log
=
new
UserQueryLog
();
log
.
setQueryItems
(
columns
.
replace
(
"userId"
,
"用户ID"
).
replace
(
Constants
.
PHONE_NO
,
"手机号"
).
replace
(
"idNo"
,
"身份证号"
).
replace
(
"bankCard"
,
"银行卡号"
).
replace
(
"address"
,
"地址"
));
log
.
setQueryItems
(
columns
.
replace
(
"userId"
,
"用户ID"
).
replace
(
Constants
.
PHONE_NO
,
"手机号"
).
replace
(
"
name"
,
"姓名"
).
replace
(
"
idNo"
,
"身份证号"
).
replace
(
"bankCard"
,
"银行卡号"
).
replace
(
"address"
,
"地址"
));
log
.
setResultAmount
(
Long
.
valueOf
(
userDetailPage
.
getTotalElements
()));
log
.
setResultAmount
(
Long
.
valueOf
(
userDetailPage
.
getTotalElements
()));
//转换存储
//转换存储
log
.
setQueryCondition
(
key
.
replace
(
"userId"
,
"用户ID"
).
replace
(
Constants
.
PHONE_NO
,
"手机号"
).
replace
(
"idNo"
,
"身份证号"
));
log
.
setQueryCondition
(
key
.
replace
(
"userId"
,
"用户ID"
).
replace
(
Constants
.
PHONE_NO
,
"手机号"
).
replace
(
"
name"
,
"姓名"
).
replace
(
"
idNo"
,
"身份证号"
));
log
.
setQueryDetail
(
keyValues
.
replace
(
"\n"
,
";"
));
log
.
setQueryDetail
(
keyValues
.
replace
(
"\n"
,
";"
));
log
.
setLoginUserName
(
userName
);
log
.
setLoginUserName
(
userName
);
userQueryLogService
.
save
(
log
);
userQueryLogService
.
save
(
log
);
...
@@ -314,7 +315,7 @@ public class UserQueryLogController {
...
@@ -314,7 +315,7 @@ public class UserQueryLogController {
String
sign
=
""
;
String
sign
=
""
;
HashMap
<
String
,
String
>
phonesMap
=
new
HashMap
<
String
,
String
>();
HashMap
<
String
,
String
>
phonesMap
=
new
HashMap
<
String
,
String
>();
try
{
try
{
data
=
RSA
.
encrypt
(
phoneNoStr
,
publicKey
);
data
=
RSA
.
encrypt
(
phoneNoStr
,
PUBLIC_KEY
);
sign
=
MD5Util
.
build
(
data
);
sign
=
MD5Util
.
build
(
data
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
LOGGER
.
info
(
"参数加密异常"
);
LOGGER
.
info
(
"参数加密异常"
);
...
@@ -336,7 +337,7 @@ public class UserQueryLogController {
...
@@ -336,7 +337,7 @@ public class UserQueryLogController {
String
signStr
=
data1
.
get
(
"sign"
).
getAsString
();
String
signStr
=
data1
.
get
(
"sign"
).
getAsString
();
//校验签名
//校验签名
if
(
MD5Util
.
build
(
dataStr
).
equals
(
signStr
)){
if
(
MD5Util
.
build
(
dataStr
).
equals
(
signStr
)){
String
jsonDataStr
=
RSA
.
decrypt
(
dataStr
,
privateKey
);
String
jsonDataStr
=
RSA
.
decrypt
(
dataStr
,
PRIVATE_KEY
);
JsonArray
listObj
=
new
JsonParser
().
parse
(
jsonDataStr
).
getAsJsonArray
();
JsonArray
listObj
=
new
JsonParser
().
parse
(
jsonDataStr
).
getAsJsonArray
();
for
(
JsonElement
jsonElement
:
listObj
)
{
for
(
JsonElement
jsonElement
:
listObj
)
{
JsonObject
jo
=
jsonElement
.
getAsJsonObject
();
JsonObject
jo
=
jsonElement
.
getAsJsonObject
();
...
@@ -374,13 +375,13 @@ public class UserQueryLogController {
...
@@ -374,13 +375,13 @@ public class UserQueryLogController {
String
token
=
request
.
getHeader
(
Constants
.
X_AUTH_TOKEN
);
String
token
=
request
.
getHeader
(
Constants
.
X_AUTH_TOKEN
);
if
(
token
==
null
||
token
.
equals
(
""
)){
if
(
StringUtils
.
isEmpty
(
token
)){
LOGGER
.
info
(
"token为空,非法查询"
);
LOGGER
.
info
(
"token为空,非法查询"
);
return
JsonResult
.
buildErrorStateResult
(
"缺少授权信息"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"缺少授权信息"
,
null
);
}
}
String
userName
=
checkUserToken
(
token
);
String
userName
=
checkUserToken
(
token
);
if
(
userName
.
equals
(
""
)){
if
(
StringUtils
.
isEmpty
(
userName
)){
return
JsonResult
.
buildErrorStateResult
(
"未授权查询"
,
null
);
return
JsonResult
.
buildErrorStateResult
(
"未授权查询"
,
null
);
}
}
//输入enter换行\n
//输入enter换行\n
...
@@ -408,7 +409,7 @@ public class UserQueryLogController {
...
@@ -408,7 +409,7 @@ public class UserQueryLogController {
List
<
UserDetail
>
userDetails
=
new
ArrayList
<
UserDetail
>();
List
<
UserDetail
>
userDetails
=
new
ArrayList
<
UserDetail
>();
List
<
Address
>
addresslist
=
new
ArrayList
<
Address
>();
List
<
Address
>
addresslist
=
new
ArrayList
<
Address
>();
HashMap
<
String
,
String
>
phonesCards
=
new
HashMap
<
String
,
String
>();
HashMap
<
String
,
String
>
phonesCards
=
new
HashMap
<
String
,
String
>();
if
(
key
.
equals
(
"userId"
)){
if
(
Objects
.
equals
(
key
,
"userId"
)){
List
<
Long
>
userIds
=
new
ArrayList
<
Long
>();
List
<
Long
>
userIds
=
new
ArrayList
<
Long
>();
try
{
try
{
for
(
String
s:
queryV
){
for
(
String
s:
queryV
){
...
@@ -424,7 +425,7 @@ public class UserQueryLogController {
...
@@ -424,7 +425,7 @@ public class UserQueryLogController {
}
}
userDetails
=
userDetailService
.
findByUserIdIn
(
userIds
);
userDetails
=
userDetailService
.
findByUserIdIn
(
userIds
);
}
else
if
(
key
.
equals
(
Constants
.
PHONE_NO
)){
}
else
if
(
Objects
.
equals
(
key
,
Constants
.
PHONE_NO
)){
for
(
String
pn:
queryV
){
for
(
String
pn:
queryV
){
if
(!
ValidationUtil
.
validatePhoneNo
(
pn
)){
if
(!
ValidationUtil
.
validatePhoneNo
(
pn
)){
return
JsonResult
.
buildErrorStateResult
(
"查询的手机号码"
+
pn
+
"格式有误"
,
pn
);
return
JsonResult
.
buildErrorStateResult
(
"查询的手机号码"
+
pn
+
"格式有误"
,
pn
);
...
@@ -432,7 +433,7 @@ public class UserQueryLogController {
...
@@ -432,7 +433,7 @@ public class UserQueryLogController {
}
}
userDetails
=
userDetailService
.
findByPhoneNos
(
queryV
);
userDetails
=
userDetailService
.
findByPhoneNos
(
queryV
);
}
else
if
(
key
.
equals
(
"idNo"
)){
}
else
if
(
Objects
.
equals
(
key
,
"idNo"
)){
IdcardValidator
iv
=
new
IdcardValidator
();
IdcardValidator
iv
=
new
IdcardValidator
();
for
(
String
idno:
queryV
){
for
(
String
idno:
queryV
){
if
(!
iv
.
is18Idcard
(
idno
)&&!
iv
.
is15Idcard
(
idno
)){
if
(!
iv
.
is18Idcard
(
idno
)&&!
iv
.
is15Idcard
(
idno
)){
...
@@ -476,11 +477,14 @@ public class UserQueryLogController {
...
@@ -476,11 +477,14 @@ public class UserQueryLogController {
if
(
columns
.
contains
(
Constants
.
PHONE_NO
)){
if
(
columns
.
contains
(
Constants
.
PHONE_NO
)){
uqi
.
setPhoneNo
(
ud
.
getPhoneNo
());
uqi
.
setPhoneNo
(
ud
.
getPhoneNo
());
}
}
if
(
columns
.
contains
(
"name"
)){
uqi
.
setName
(
ud
.
getName
());
}
if
(
columns
.
contains
(
"userId"
)){
if
(
columns
.
contains
(
"userId"
)){
uqi
.
setUserId
(
ud
.
getUserId
());
uqi
.
setUserId
(
ud
.
getUserId
());
}
}
if
(
columns
.
contains
(
"address"
)){
if
(
columns
.
contains
(
"address"
)){
Optional
<
Address
>
oad
=
addresslist
.
stream
().
filter
(
addr
->
addr
.
getUserId
()==
ud
.
getUserId
(
)).
findFirst
();
Optional
<
Address
>
oad
=
addresslist
.
stream
().
filter
(
addr
->
Objects
.
equals
(
addr
.
getUserId
(),
ud
.
getUserId
()
)).
findFirst
();
if
(
oad
.
isPresent
()){
if
(
oad
.
isPresent
()){
uqi
.
setAddress
(
oad
.
get
().
toString
());
uqi
.
setAddress
(
oad
.
get
().
toString
());
}
}
...
@@ -518,13 +522,15 @@ public class UserQueryLogController {
...
@@ -518,13 +522,15 @@ public class UserQueryLogController {
cell
.
setCellValue
(
"手机号"
);
cell
.
setCellValue
(
"手机号"
);
cell
.
setCellStyle
(
style
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
2
);
cell
=
row
.
createCell
(
2
);
cell
.
setCellValue
(
"
身份证号
"
);
cell
.
setCellValue
(
"
姓名
"
);
cell
.
setCellStyle
(
style
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
3
);
cell
=
row
.
createCell
(
3
);
cell
.
setCellValue
(
"
银行卡
号"
);
cell
.
setCellValue
(
"
身份证
号"
);
cell
.
setCellStyle
(
style
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
4
);
cell
=
row
.
createCell
(
4
);
cell
.
setCellValue
(
"银行卡号"
);
cell
.
setCellStyle
(
style
);
cell
=
row
.
createCell
(
5
);
cell
.
setCellValue
(
"地址"
);
cell
.
setCellValue
(
"地址"
);
cell
.
setCellStyle
(
style
);
cell
.
setCellStyle
(
style
);
...
@@ -549,17 +555,22 @@ public class UserQueryLogController {
...
@@ -549,17 +555,22 @@ public class UserQueryLogController {
HSSFCell
cell2
=
row
.
createCell
(
2
);
HSSFCell
cell2
=
row
.
createCell
(
2
);
if
(
cell2
!=
null
){
if
(
cell2
!=
null
){
cell2
.
setCellValue
(
user
.
get
IdNo
()==
null
?
" "
:
user
.
getIdNo
());
cell2
.
setCellValue
(
user
.
get
Name
()==
null
?
" "
:
user
.
getName
());
}
}
HSSFCell
cell3
=
row
.
createCell
(
3
);
HSSFCell
cell3
=
row
.
createCell
(
3
);
if
(
cell3
!=
null
){
if
(
cell3
!=
null
){
cell3
.
setCellValue
(
user
.
get
BankCards
()==
null
?
" "
:
user
.
getBankCards
());
cell3
.
setCellValue
(
user
.
get
IdNo
()==
null
?
" "
:
user
.
getIdNo
());
}
}
HSSFCell
cell4
=
row
.
createCell
(
4
);
HSSFCell
cell4
=
row
.
createCell
(
4
);
if
(
cell4
!=
null
){
if
(
cell4
!=
null
){
cell4
.
setCellValue
(
user
.
getAddress
()==
null
?
" "
:
user
.
getAddress
());
cell4
.
setCellValue
(
user
.
getBankCards
()==
null
?
" "
:
user
.
getBankCards
());
}
HSSFCell
cell5
=
row
.
createCell
(
5
);
if
(
cell5
!=
null
){
cell5
.
setCellValue
(
user
.
getAddress
()==
null
?
" "
:
user
.
getAddress
());
}
}
}
}
...
@@ -584,14 +595,13 @@ public class UserQueryLogController {
...
@@ -584,14 +595,13 @@ public class UserQueryLogController {
}
}
private
String
checkUserToken
(
String
token
){
private
String
checkUserToken
(
String
token
){
HashMap
<
String
,
String
>
parameters
=
new
HashMap
<>();
HashMap
<
String
,
String
>
parameters
=
new
HashMap
<>();
parameters
.
put
(
"token"
,
token
);
parameters
.
put
(
"token"
,
token
);
//访问用户中心查询用户银行卡接口
//访问用户中心查询用户银行卡接口
String
resultStr
=
httpService
.
post
(
yunyingUrl
+
"/user/info"
,
parameters
);
String
resultStr
=
httpService
.
post
(
yunyingUrl
+
"/user/info"
,
parameters
);
try
{
try
{
JsonObject
resultUser
=
new
JsonParser
().
parse
(
resultStr
).
getAsJsonObject
();
JsonObject
resultUser
=
new
JsonParser
().
parse
(
resultStr
).
getAsJsonObject
();
if
(
resultUser
.
get
(
"code"
).
getAsString
().
equals
(
"0000"
)&&
resultUser
.
get
(
"data"
).
getAsJsonObject
()!=
null
){
if
(
Objects
.
equals
(
"0000"
,
resultUser
.
get
(
"code"
).
getAsString
()
)&&
resultUser
.
get
(
"data"
).
getAsJsonObject
()!=
null
){
String
userName
=
resultUser
.
get
(
"data"
).
getAsJsonObject
().
get
(
"user"
).
getAsString
();
String
userName
=
resultUser
.
get
(
"data"
).
getAsJsonObject
().
get
(
"user"
).
getAsString
();
return
userName
;
return
userName
;
}
}
...
...
src/main/java/cn/quantgroup/xyqb/model/UserQueryInfo.java
View file @
898a6fb2
...
@@ -12,17 +12,29 @@ import java.io.Serializable;
...
@@ -12,17 +12,29 @@ import java.io.Serializable;
@Data
@Data
public
class
UserQueryInfo
implements
Serializable
{
public
class
UserQueryInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1L
;
private
static
final
long
serialVersionUID
=
-
1L
;
/**
* 用户主键
*/
private
Long
userId
;
private
Long
userId
;
/**
* 登录手机号/账号
*/
private
String
phoneNo
;
private
String
phoneNo
;
/**
* 姓名
*/
private
String
name
;
/**
* 银行卡号
*/
private
String
bankCards
;
private
String
bankCards
;
/**
//证件号
* 证件号
*/
private
String
idNo
;
private
String
idNo
;
/**
//0 身份证 1 军官证 2 护照
* 地址
*/
private
String
address
;
private
String
address
;
...
...
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