Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qg-bl-service
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-spider
qg-bl-service
Commits
70b9e5c6
Commit
70b9e5c6
authored
Aug 16, 2019
by
data爬虫-冯 军凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复查询黑名单bug
parent
a7531170
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
BlackListQueryManagerServiceImpl.java
...ervice/service/impl/BlackListQueryManagerServiceImpl.java
+5
-2
ThirdPartBlackListServiceImpl.java
...blservice/service/impl/ThirdPartBlackListServiceImpl.java
+3
-0
No files found.
src/main/java/cn/quantgroup/qgblservice/service/impl/BlackListQueryManagerServiceImpl.java
View file @
70b9e5c6
...
...
@@ -80,7 +80,9 @@ public class BlackListQueryManagerServiceImpl implements IBlackListQueryManagerS
public
List
<
BlackListQueryTidbVo0
>
getBlackListData
(
String
queryBlackListSql
,
String
queryUserIdSql
,
String
uuid
,
String
name
,
String
phoneNo
,
String
idNo
,
String
type
)
{
Stopwatch
stopwatch
=
Stopwatch
.
createStarted
();
List
<
BlackListQueryTidbVo0
>
queryListBlackListByPhoneNos
=
blackListJdbcTemplate
.
query
(
queryBlackListSql
,
new
BeanPropertyRowMapper
<>(
BlackListQueryTidbVo0
.
class
));
log
.
info
(
"用户黑名单查询结果, uuid: {} , name: {} , phoneNo: {} , idNo: {} , type: {} , result: {} "
,
uuid
,
name
,
phoneNo
,
idNo
,
type
,
JSON
.
toJSONString
(
queryListBlackListByPhoneNos
));
List
<
Map
<
String
,
Object
>>
queryXyqbUserInfoByPhoneNo
=
xyqbUserJdbcTemplate
.
queryForList
(
queryUserIdSql
);
log
.
info
(
"用户userId查询结果, uuid: {} , name: {} , phoneNo: {} , idNo: {} , type: {} , result: {} "
,
uuid
,
name
,
phoneNo
,
idNo
,
type
,
JSON
.
toJSONString
(
queryXyqbUserInfoByPhoneNo
));
if
(
CollectionUtils
.
isNotEmpty
(
queryListBlackListByPhoneNos
))
{
List
<
BlackListQueryTidbVo0
>
blackListQueryTidbVo0s
=
new
ArrayList
<>();
...
...
@@ -88,9 +90,9 @@ public class BlackListQueryManagerServiceImpl implements IBlackListQueryManagerS
Map
<
String
,
Object
>
userIdMap
=
queryXyqbUserInfoByPhoneNo
.
get
(
0
);
List
<
Map
<
String
,
Object
>>
totalOverdueDaysList
=
xyqbJdbcTemplate
.
queryForList
(
String
.
format
(
Constant
.
SQL
.
XYQB_QUERY_USER_TOTAL_OVERDUE_SQL
,
userIdMap
.
get
(
Constant
.
PARAM
.
USER_ID
)));
log
.
info
(
"用户历史逾期总天数, uuid: {} , name: {} , phoneNo: {} , idNo: {} , type"
,
uuid
,
name
,
phoneNo
,
idNo
,
type
,
JSON
.
toJSONString
(
totalOverdueDaysList
));
log
.
info
(
"用户历史逾期总天数, uuid: {} , name: {} , phoneNo: {} , idNo: {} , type
: {} , result: {}
"
,
uuid
,
name
,
phoneNo
,
idNo
,
type
,
JSON
.
toJSONString
(
totalOverdueDaysList
));
List
<
Map
<
String
,
Object
>>
maxOverdueDaysList
=
xyqbJdbcTemplate
.
queryForList
(
String
.
format
(
Constant
.
SQL
.
XYQB_QUERY_USER_MAX_OVERDUE_SQL
,
userIdMap
.
get
(
Constant
.
PARAM
.
USER_ID
)));
log
.
info
(
"用户最大逾期天数, uuid: {} , name: {} , phoneNo: {} , idNo: {} , type"
,
uuid
,
name
,
phoneNo
,
idNo
,
type
,
JSON
.
toJSONString
(
maxOverdueDaysList
));
log
.
info
(
"用户最大逾期天数, uuid: {} , name: {} , phoneNo: {} , idNo: {} , type
: {} , result: {}
"
,
uuid
,
name
,
phoneNo
,
idNo
,
type
,
JSON
.
toJSONString
(
maxOverdueDaysList
));
queryListBlackListByPhoneNos
.
stream
().
filter
(
o
->
Timestamp
.
valueOf
(
LocalDateTime
.
now
().
minusYears
(
channelBlackListExpireConfigMap
.
get
(
o
.
getType
())).
format
(
DateTimeFormatter
.
ofPattern
(
Constant
.
DAYE_FORMAT
.
YYYY_MM_DD_HH_MM_SS
))
...
...
@@ -143,6 +145,7 @@ public class BlackListQueryManagerServiceImpl implements IBlackListQueryManagerS
public
void
initChannelBlackListExpireConfig
()
{
List
<
BlackListChannelExpireConfigVo0
>
queryBlackListChannelExpireConfigVo0List
=
blackListJdbcTemplate
.
query
(
Constant
.
SQL
.
BLACK_LIST_NEW_QUERY_CHANNEL_BLACK_LIST_EXPIRE_CONFIG_SQL
,
new
BeanPropertyRowMapper
<>(
BlackListChannelExpireConfigVo0
.
class
));
channelBlackListExpireConfigMap
=
queryBlackListChannelExpireConfigVo0List
.
stream
().
collect
(
Collectors
.
toMap
(
BlackListChannelExpireConfigVo0:
:
getType
,
BlackListChannelExpireConfigVo0:
:
getExpireTime
));
log
.
info
(
"加载渠道黑名单有效期配置完成, result: {} "
,
JSON
.
toJSONString
(
channelBlackListExpireConfigMap
));
}
}
src/main/java/cn/quantgroup/qgblservice/service/impl/ThirdPartBlackListServiceImpl.java
View file @
70b9e5c6
...
...
@@ -5,6 +5,7 @@ import cn.quantgroup.qgblservice.model.blacklist.ThirdPartBlackListConfigVo0;
import
cn.quantgroup.qgblservice.repository.mybatis.entity.tidb.BlackListQueryTidbVo0
;
import
cn.quantgroup.qgblservice.response.GlobalResponse
;
import
cn.quantgroup.qgblservice.service.IThirdPartBlackListManagerService
;
import
com.alibaba.fastjson.JSON
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -86,6 +87,8 @@ public class ThirdPartBlackListServiceImpl implements IThirdPartBlackListManager
List
<
ThirdPartBlackListConfigVo0
>
thirdPartBlackListConfigVo0s
=
blackListJdbcTemplate
.
query
(
Constant
.
SQL
.
BLACK_LIST_NEW_QUERY_THIRD_PART_BLACK_LIST_CONFIG_SQL
,
new
BeanPropertyRowMapper
<>(
ThirdPartBlackListConfigVo0
.
class
));
thirdPartBlackListCacheConfigMap
=
thirdPartBlackListConfigVo0s
.
stream
().
collect
(
Collectors
.
toMap
(
ThirdPartBlackListConfigVo0:
:
getChannelType
,
ThirdPartBlackListConfigVo0:
:
getType
));
log
.
info
(
"加载三方数据源黑名单配置完成, result: {} "
,
JSON
.
toJSONString
(
thirdPartBlackListCacheConfigMap
));
}
}
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