|
|
|
|
@ -55,14 +55,12 @@ public class BlacklistTimerJob extends QuartzJobBean { |
|
|
|
|
List<ApmRecord> recordUpdateList = new ArrayList<>(); |
|
|
|
|
List<Blacklist> blacklists = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, Object>> renegedCountList = recordService.getRenegedCountList(); |
|
|
|
|
for (Map<String, Object> item : renegedCountList) { |
|
|
|
|
Long createDept = (Long) item.get("createDept"); |
|
|
|
|
String cupName = (String) item.get("cupName"); |
|
|
|
|
String cupCardNo = (String) item.get("cupCardNo"); |
|
|
|
|
String cupPhone = (String) item.get("cupPhone"); |
|
|
|
|
int renegedTimes = (Integer) item.get("renegedTimes"); |
|
|
|
|
int renegedTimes = Integer.parseInt(item.get("renegedTimes").toString()); |
|
|
|
|
|
|
|
|
|
// 若未达到
|
|
|
|
|
if (renegedTimes < configRenegedTimes) { |
|
|
|
|
@ -71,7 +69,6 @@ public class BlacklistTimerJob extends QuartzJobBean { |
|
|
|
|
|
|
|
|
|
// 2. 若未记录的违约记录 >= renegedTimes, 添加黑名单,
|
|
|
|
|
Blacklist blacklist = new Blacklist(); |
|
|
|
|
blacklist.setCreateDept(createDept); |
|
|
|
|
blacklist.setCupName(cupName); |
|
|
|
|
blacklist.setCupCardNo(cupCardNo); |
|
|
|
|
blacklist.setCupPhone(cupPhone); |
|
|
|
|
@ -85,9 +82,9 @@ public class BlacklistTimerJob extends QuartzJobBean { |
|
|
|
|
recordUpdateList.add(record); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
blacklistService.saveBatch(blacklists); |
|
|
|
|
recordService.updateBatchById(recordUpdateList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
blacklistService.saveBatch(blacklists); |
|
|
|
|
recordService.updateBatchById(recordUpdateList); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|