09061506:对数据库结构的数据量做一个实时

master
冷调 2024-09-06 15:06:46 +08:00
parent 3372011c64
commit 95392b55b8
1 changed files with 0 additions and 2 deletions

View File

@ -73,12 +73,10 @@ public class TableDataController extends BaseController {
long count = structureService.count(new LambdaQueryWrapper<>() {{ long count = structureService.count(new LambdaQueryWrapper<>() {{
eq(Structure::getTableId, id); eq(Structure::getTableId, id);
}}); }});
if (count!=0L) {
tableInfoService.update(new LambdaUpdateWrapper<>() {{ tableInfoService.update(new LambdaUpdateWrapper<>() {{
eq(TableInfo::getId, id) eq(TableInfo::getId, id)
.set(TableInfo::getDataNum, count); .set(TableInfo::getDataNum, count);
}}); }});
}
List<Structure> structureList =tableInfoService.selectTableInfoById(id); List<Structure> structureList =tableInfoService.selectTableInfoById(id);
return success(structureList); return success(structureList);
} }