Commit d7e5865f authored by 郝彦辉's avatar 郝彦辉

黑灰名单2020.04.24_01

parent 470af8aa
......@@ -6,13 +6,8 @@ import cn.quantgroup.qgblservice.service.IBlackListManagerService;
import cn.quantgroup.qgblservice.service.IThirdPartBlackListManagerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import java.util.Map;
/**
* 黑名单导入管理接口
......@@ -36,33 +31,50 @@ public class BlackListImportManagerController {
@RequestMapping("/phone_black_list_import_by_month")
public GlobalResponse phoneBlackListImportByMonth(String startTime, String endTime) {
log.info("方法phoneBlackListImportByMonth入参, startTime: {} , endTime: {} ", startTime, endTime);
return iBlackListImportManagerService.blackListPhoneImport(startTime, endTime);
}
@RequestMapping("/id_no_black_list_import_by_month")
public GlobalResponse idNoBlackListImportByMonth(String startTime, String endTime){
log.info("方法idNoBlackListImportByMonth入参, startTime: {} , endTime: {} ", startTime, endTime);
return iBlackListImportManagerService.blackListIdCardImport(startTime, endTime);
}
/**
* -----------------------------------------------------------------------------<br>
* 描 述: 三方数据源项目,命中外部黑名单,调该接口写入黑名单库 <br>
* 创建人: fengjunkai <br>
* 创建时间: 2019-07-31 17:18 <br>
* 最后修改人: yanhui.Hao <br>
* 最后修改时间: 2020.04.24 11:28 <br>
* 入参说明: <br>
* 出参说明: <br>
* -----------------------------------------------------------------------------
*/
@RequestMapping("/third_part_black_list")
public GlobalResponse thirdPartBlackList(String uuid, String name, String phoneNo, String idCard, String type){
log.info("方法thirdPartBlackList入参, uuid: {} , name: {} , phoneNo: {} , idCard: {} , type: {} ", uuid, name, phoneNo, idCard, type);
return iThirdPartBlackListManagerService.saveThirdPartBlackList(uuid, name, phoneNo, idCard, type);
}
@RequestMapping("/phone_black_list_test")
public GlobalResponse phoneBlackListTest(String startTime, String endTime){
log.info("方法phoneBlackListTest入参, startTime: {} , endTime: {} ", startTime, endTime);
iBlackListManagerService.blackListPhoneManagerByDay(startTime, endTime);
return GlobalResponse.success();
}
@RequestMapping("/idcard_black_list_test")
public GlobalResponse idcardBlackListTest(String startTime, String endTime){
log.info("方法idcardBlackListTest入参, startTime: {} , endTime: {} ", startTime, endTime);
iBlackListManagerService.blackListIdCardManagerByDay(startTime, endTime);
return GlobalResponse.success();
}
@RequestMapping("/black_list_real_time_test")
public GlobalResponse blackListRealTimeTest(){
log.info("方法blackListRealTimeTest开始调用");
iBlackListManagerService.blackListRealTimeManagerByDay();
return GlobalResponse.success();
}
......@@ -81,6 +93,7 @@ public class BlackListImportManagerController {
// }
@RequestMapping("/manual_import_black_list")
public GlobalResponse manualImport(String sourcePath){
log.info("方法manualImport入参, sourcePath: {} ", sourcePath);
return iBlackListManagerService.manualImportBlackList(sourcePath);
}
......
......@@ -113,6 +113,7 @@ public class BlackToGreyListParallel implements ParallelComputingProcess<BlackGr
//关联查询太慢
//List<BlackGreyListRjoinDVo> rJoinDVoList = blackGreyListMapper.findBlackGreyListRjoinD(queryParam);
List<BlackGreyListDetails> detailsList = blackGreyListMapper.findBlackGreyListDetails(queryParam);
log.info("黑转灰-明细表查询列表: {} , rId: {} , uuid: {} ", detailsList!=null?JSON.toJSONString(detailsList):"null", rId, uuid);
if (detailsList!=null && detailsList.size()>0) {
boolean is_type_11 = false;
......@@ -167,7 +168,7 @@ public class BlackToGreyListParallel implements ParallelComputingProcess<BlackGr
try {
in_overdue_Obj = acsdbJdbcTemplate.queryForObject(ConstantBlackGrey.SQL.XYQB_QUERY_VCC_IS_PAYOFF, new Object[]{xyqbUser.getId()}, Integer.class);
}catch (EmptyResultDataAccessException e){
log.error("查询(VCC)逾期逾期黑名单是否已还清-查询xyqb异常, r_Id: {} , id: {} , uuid: {} , user_id: {} , e: {} ", rId, detailsVo.getId(), uuid, xyqbUser.getId(), e.toString());
log.error("查询(VCC)逾期逾期黑名单是否已还清-查询acsdb异常, r_Id: {} , id: {} , uuid: {} , user_id: {} , e: {} ", rId, detailsVo.getId(), uuid, xyqbUser.getId(), e.toString());
}finally {
log.info("查询(VCC)逾期逾期黑名单是否已还清-结束, r_Id: {} , id: {} , uuid: {} , user_id: {} , in_overdue_Obj : {} ", rId, detailsVo.getId(), uuid, xyqbUser.getId(), in_overdue_Obj!=null? in_overdue_Obj.toString(): "null");
}
......@@ -252,7 +253,8 @@ public class BlackToGreyListParallel implements ParallelComputingProcess<BlackGr
}
}
log.info(log_inf + "黑名单转灰名单process处理结束CPU_{} , this_list_size: {} , type_11: {} , update_r_count: {} , update_d_count: {} , 失败: {} , 耗时: {} ", threadId, list_size, type_11.get(), update_r_count.get(), update_d_count.get(), err_count.get(), (System.currentTimeMillis()-start));
log.info(log_inf + "黑名单转灰名单process处理结束CPU_{} , this_list_size: {} , type_11: {} , update_r_count: {} , update_d_count: {} , 失败: {} , 耗时: {} ",
threadId, list_size, type_11.get(), update_r_count.get(), update_d_count.get(), err_count.get(), (System.currentTimeMillis()-start));
}
......
......@@ -100,8 +100,11 @@ public class ThirdPartBlackListServiceImpl implements IThirdPartBlackListManager
param[10] = phoneNo_md5;
param[11] = idCard_md5;
blackListJdbcTemplate.update(Constant.SQL.BLACK_LIST_NEW_INSERT_THIRD_PART_BLACK_LIST_SQL, param);
//insert into `black_list_new` (`uuid`, `name`, `phone_no`, `id_no`, `major_type`, `type`, `black_level`, `join_black_reason`, `created_at`, `updated_at`,`phone_no_md5`,`id_no_md5`)
// 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));
}
@PostConstruct
......
......@@ -112,7 +112,7 @@ public class UpdateBlackListOverdueDayParallel implements ParallelComputingProce
BlackGreyListQueryVo queryParam = BlackGreyListQueryVo.builder().rId(rId).status(0).build();
List<BlackGreyListDetails> detailsList = blackGreyListMapper.findBlackGreyListDetails(queryParam);
boolean details_is_update= false; //用于标记修改结果表修改时间
log.info("明细表查询列表: {} , rId: {} , uuid: {} ", detailsList!=null?JSON.toJSONString(detailsList):"null", rId, uuid);
log.info("修改逾期天数-明细表查询列表: {} , rId: {} , uuid: {} ", detailsList!=null?JSON.toJSONString(detailsList):"null", rId, uuid);
if (detailsList!=null && detailsList.size()>0) {
boolean is_type_11 = false;
......
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