Commit ffa3535c authored by data爬虫-冯 军凯's avatar data爬虫-冯 军凯

修复查询黑名单bug

parent 58e33bea
...@@ -89,17 +89,17 @@ public class BlackListQueryManagerServiceImpl implements IBlackListQueryManagerS ...@@ -89,17 +89,17 @@ public class BlackListQueryManagerServiceImpl implements IBlackListQueryManagerS
Map<String, Object> userIdMap = queryXyqbUserInfoByPhoneNo.get(0); 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))); List<Map<String, Object>> totalOverdueDaysList = xyqbJdbcTemplate.queryForList(String.format(Constant.SQL.XYQB_QUERY_USER_TOTAL_OVERDUE_SQL, userIdMap.get(Constant.PARAM.USER_ID)));
List<Map<String, Object>> maxOverdueDaysList = xyqbJdbcTemplate.queryForList(String.format(Constant.SQL.XYQB_QUERY_USER_MAX_OVERDUE_SQL, userIdMap.get(Constant.PARAM.USER_ID))); List<Map<String, Object>> maxOverdueDaysList = xyqbJdbcTemplate.queryForList(String.format(Constant.SQL.XYQB_QUERY_USER_MAX_OVERDUE_SQL, userIdMap.get(Constant.PARAM.USER_ID)));
Object totalOverdueDays = totalOverdueDaysList.get(0).get(Constant.PARAM.TOTAL_OVERDUE_DAYS);
Object maxOverdueDays = maxOverdueDaysList.get(0).get(Constant.PARAM.MAX_OVERDUE_DAYS);
queryListBlackListByPhoneNos.stream().filter(o -> Timestamp.valueOf( 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)) LocalDateTime.now().minusYears(channelBlackListExpireConfigMap.get(o.getType())).format(DateTimeFormatter.ofPattern(Constant.DAYE_FORMAT.YYYY_MM_DD_HH_MM_SS))
).getTime() - o.getCreatedAt().getTime() < 0).forEach(blackListQueryTidbVo0 -> { ).getTime() - o.getCreatedAt().getTime() < 0).forEach(blackListQueryTidbVo0 -> {
if (CollectionUtils.isNotEmpty(totalOverdueDaysList)) { if (CollectionUtils.isNotEmpty(totalOverdueDaysList)) {
Object totalOverdueDays = totalOverdueDaysList.get(0).get(Constant.PARAM.TOTAL_OVERDUE_DAYS);
blackListQueryTidbVo0.setTotalOverdueDays(totalOverdueDays.toString()); blackListQueryTidbVo0.setTotalOverdueDays(totalOverdueDays.toString());
} }
if (CollectionUtils.isNotEmpty(maxOverdueDaysList)) { if (CollectionUtils.isNotEmpty(maxOverdueDaysList)) {
Object maxOverdueDays = maxOverdueDaysList.get(0).get(Constant.PARAM.MAX_OVERDUE_DAYS);
blackListQueryTidbVo0.setMaxOverdueDays(maxOverdueDays.toString()); blackListQueryTidbVo0.setMaxOverdueDays(maxOverdueDays.toString());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment