大屏页面初始化

This commit is contained in:
2026-03-11 18:20:02 +08:00
parent 786217af69
commit 8069e437dc
2 changed files with 29 additions and 25 deletions

View File

@@ -38,18 +38,20 @@ public class ChartInfoController {
@PostMapping("setting")
public Result<Message> save(@RequestBody List<ChartConfig> configs) {
for (ChartConfig config : configs) {
LambdaQueryWrapper<ChartInfo> newQuery = new LambdaQueryWrapper<ChartInfo>()
.eq(ChartInfo::getChartId, config.getChartId())
.eq(ChartInfo::getChartCode, config.getChartCode());
ChartInfo newChartInfo = chartInfoService.getOne(newQuery);
newChartInfo.setSort(config.getSort());
chartInfoService.updateById(newChartInfo);
LambdaQueryWrapper<ChartInfo> oldQuery = new LambdaQueryWrapper<ChartInfo>()
.eq(ChartInfo::getChartId, config.getOldChartId())
.eq(ChartInfo::getChartCode, config.getChartCode());
ChartInfo oldChartInfo = chartInfoService.getOne(oldQuery);
oldChartInfo.setSort(config.getOldSort());
chartInfoService.updateById(oldChartInfo);
System.out.println(config);
// LambdaQueryWrapper<ChartInfo> newQuery = new LambdaQueryWrapper<ChartInfo>()
// .eq(ChartInfo::getChartId, config.getChartId())
// .eq(ChartInfo::getChartCode, config.getChartCode());
// ChartInfo newChartInfo = chartInfoService.getOne(newQuery);
// newChartInfo.setSort(config.getSort());
// chartInfoService.updateById(newChartInfo);
// LambdaQueryWrapper<ChartInfo> oldQuery = new LambdaQueryWrapper<ChartInfo>()
// .eq(ChartInfo::getChartId, config.getOldChartId())
// .eq(ChartInfo::getChartCode, config.getChartCode());
// ChartInfo oldChartInfo = chartInfoService.getOne(oldQuery);
// oldChartInfo.setSort(config.getOldSort());
// chartInfoService.updateById(oldChartInfo);
}
return Result.success(new Message("配置保存成功", 200));
}