Commit 10fd2d1e authored by 郝彦辉's avatar 郝彦辉

2020.04.28 21:18 历史黑名单&黑灰名单-都双写2

parent 49ce9210
......@@ -71,7 +71,7 @@ public class ThirdPartBlackListServiceImpl implements IThirdPartBlackListManager
phoneNo, name, idCard, thirdPartBlackListCacheConfigMap.get(type)), new BeanPropertyRowMapper<>(BlackListQueryTidbVo0.class));
if (CollectionUtils.isNotEmpty(blackListQueryTidbVo0s)) {
log.info("三方数据源黑名单已存在, uuid: {} , name: {} , phoneNo: {} , idCard: {} , size: {} ", uuid, name, phoneNo, idCard, blackListQueryTidbVo0s.size());
for (int i = 0; i < blackListQueryTidbVo0s.size(); i++) {
BlackListQueryTidbVo0 blackListQueryTidbVo0 = blackListQueryTidbVo0s.get(i);
......@@ -124,7 +124,7 @@ public class ThirdPartBlackListServiceImpl implements IThirdPartBlackListManager
// values (?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,? ,?);
int insert = blackListJdbcTemplate.update(Constant.SQL.BLACK_LIST_NEW_INSERT_THIRD_PART_BLACK_LIST_SQL, param);
log.info("插入黑名单表结束, insert: {} , param: {} ", insert, JSON.toJSONString(param));
log.info("插入三方数据源黑名单结束, insert: {} , param: {} ", insert, JSON.toJSONString(param));
}
@PostConstruct
......@@ -154,8 +154,9 @@ public class ThirdPartBlackListServiceImpl implements IThirdPartBlackListManager
//根据三方数据源urlType获取黑灰名单来源type
String typeCode = thirdPartBlackListCacheConfigMap.get(type);
String reasonCode = getReasonCodeByTypeMap.get(type);
String reasonCode = getReasonCodeByTypeMap.get(typeCode);
String reasonExplain = getReasonExplainByReasonCodeMap.get(reasonCode);
log.info("插入黑灰名单入参, uuid: {} , name: {} , phoneNo: {} , idCard: {} , type: {} , typeCode: {} , reasonCode: {} , reasonExplain: {} ", uuid, name, phoneNo, idCard, type, typeCode, reasonCode, reasonExplain);
if(org.apache.commons.lang3.StringUtils.isAnyEmpty(typeCode, reasonCode, reasonExplain)){
log.error("插入黑灰名单时-未匹配到typeCode或reason! uuid: {} , name: {} , phoneNo: {} , idCard: {} , type: {} ", uuid, name, phoneNo, idCard, type);
return GlobalResponse.error("参数type未匹配到typeCode!");
......@@ -195,7 +196,7 @@ public class ThirdPartBlackListServiceImpl implements IThirdPartBlackListManager
List<TmpBlackGreyList> blackGreyList = new ArrayList<TmpBlackGreyList>();
blackGreyList.add(blackGreyObj);
int saveOkCount = blackGreyListService.saveBlackGreyListByJdbc(blackGreyList);
log.info("插入黑灰名单结束, uuid: {} , name: {} , phoneNo: {} , idCard: {} , type: {} , typeCode: {} , reasonCode: {} , reasonExplain: {} , insert: {} ", uuid, name, phoneNo, idCard, type, typeCode, reasonCode, reasonExplain, saveOkCount);
return GlobalResponse.success("保存黑灰名单成功"+saveOkCount+"条");
} catch (SQLException e) {
log.error("保存黑灰名单数据异常", e);
......
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