09061533:对数据库结构的数据量做一个实时
parent
95392b55b8
commit
ea5ae63c6e
|
@ -69,14 +69,6 @@ public class TableDataController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/selectStructureById/{id}")
|
@GetMapping("/selectStructureById/{id}")
|
||||||
public Result<List<Structure>> selectStructureById(@PathVariable("id") Integer id) {
|
public Result<List<Structure>> selectStructureById(@PathVariable("id") Integer id) {
|
||||||
//根据id查询表结构中的数据量
|
|
||||||
long count = structureService.count(new LambdaQueryWrapper<>() {{
|
|
||||||
eq(Structure::getTableId, id);
|
|
||||||
}});
|
|
||||||
tableInfoService.update(new LambdaUpdateWrapper<>() {{
|
|
||||||
eq(TableInfo::getId, id)
|
|
||||||
.set(TableInfo::getDataNum, count);
|
|
||||||
}});
|
|
||||||
List<Structure> structureList =tableInfoService.selectTableInfoById(id);
|
List<Structure> structureList =tableInfoService.selectTableInfoById(id);
|
||||||
return success(structureList);
|
return success(structureList);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue