异常消息定时任务处理修改

This commit is contained in:
cwchen 2025-11-17 15:07:29 +08:00
parent 8dd1bf5ed8
commit 733a01d1b4
2 changed files with 4 additions and 4 deletions

View File

@ -70,7 +70,7 @@
business_type AS businessType,
source_table AS sourceTable
FROM tb_error_info WHERE source_table = #{tableName} AND business_id IN
<foreach collection="list" open="(" close=")" item="item">
<foreach collection="list" open="(" close=")" item="item" separator=",">
#{item}
</foreach>
</select>

View File

@ -38,12 +38,12 @@ public class ScanCertificateTask {
List<ErrorInfo> totalList = new ArrayList<>();
// 主体库
List<ErrorInfo> enterpriseErrorInfos = handleDataByType(TableConstants.TB_ENTERPRISE);
if (CollectionUtils.isEmpty(enterpriseErrorInfos)) {
if (CollectionUtils.isNotEmpty(enterpriseErrorInfos)) {
totalList.addAll(enterpriseErrorInfos);
}
// 人员证件库
List<ErrorInfo> personnelErrorInfos = handleDataByType(TableConstants.TB_PERSONNEL_CERTIFICATE);
if (CollectionUtils.isEmpty(personnelErrorInfos)) {
if (CollectionUtils.isNotEmpty(personnelErrorInfos)) {
totalList.addAll(personnelErrorInfos);
}
if (CollectionUtils.isNotEmpty(totalList)) {
@ -101,7 +101,7 @@ public class ScanCertificateTask {
*/
private List<ErrorInfo> filterNotExistErrorInfo(List<ErrorInfo> expiredList, String sourceTable) {
if (CollectionUtils.isEmpty(expiredList)) {
return Collections.emptyList(); // 返回空集合而不是null避免NPE
return Collections.emptyList(); // 返回空集合而不是null
}
// 提取业务ID并去重