提交 d297ef25 authored 作者: 吕本才's avatar 吕本才

1、错误日志bean增加字段 2、优化导入直播间类型接口

上级 7ef53fb8
...@@ -26,6 +26,8 @@ public class CollectOrderLog implements Serializable { ...@@ -26,6 +26,8 @@ public class CollectOrderLog implements Serializable {
@TableId(value = "cli_id",type= IdType.AUTO) @TableId(value = "cli_id",type= IdType.AUTO)
private Long cliId; private Long cliId;
private String method;
/** /**
* 采集订单的数量,存储为字符串,长度不超过 20 个字符 * 采集订单的数量,存储为字符串,长度不超过 20 个字符
*/ */
......
...@@ -165,16 +165,16 @@ public class FinanceBaseZbjTypeServiceImpl implements FinanceBaseZbjTypeService ...@@ -165,16 +165,16 @@ public class FinanceBaseZbjTypeServiceImpl implements FinanceBaseZbjTypeService
} }
public void deleteAbsentProducts(List<FinanceBaseZbjType> dataList) { public void deleteAbsentProducts(List<FinanceBaseZbjType> dataList) {
Set excelQdTypes = dataList.stream() // datalist 按照key为zbjQdType转成HashMap
.map(FinanceBaseZbjType::getZbjQdType) Map<String, FinanceBaseZbjType> dataMap = dataList.stream().collect(Collectors.toMap(FinanceBaseZbjType::getFenxiaoName, item -> item));
.collect(Collectors.toSet());
// 查询数据库中所有数据 // 查询数据库中所有数据
List<FinanceBaseZbjType> allDbRecords = dao.list(new LambdaQueryWrapper<>()); List<FinanceBaseZbjType> allDbRecords = dao.list(new LambdaQueryWrapper<>());
// 找出数据库中存在但 Excel 中不存在的记录的 fbztId // 找出数据库中存在但 Excel 中不存在的记录的 fbztId
List<Long> idsToDelete = new ArrayList<>(); List<Long> idsToDelete = new ArrayList<>();
for (FinanceBaseZbjType dbRecord : allDbRecords) { for (FinanceBaseZbjType dbRecord : allDbRecords) {
// 判断 是否匹配ZbjQdType // 判断 是否匹配ZbjQdType
if (!excelQdTypes.contains(dbRecord.getZbjQdType())) { FinanceBaseZbjType financeBaseZbjType = dataMap.get(dbRecord.getFenxiaoName());
if (ObjectUtil.isEmpty(financeBaseZbjType) || !dbRecord.getZbjQdType().equals(financeBaseZbjType.getZbjQdType())) {
idsToDelete.add(dbRecord.getFbztId()); idsToDelete.add(dbRecord.getFbztId());
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论