Merge remote-tracking branch 'origin/dunhuan_jdk8' into dunhuang
This commit is contained in:
commit
57fa0fcff7
@ -1,5 +1,6 @@
|
|||||||
package com.zhgd.xmgl.modules.project.controller;
|
package com.zhgd.xmgl.modules.project.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@ -91,7 +92,16 @@ public class LargeScreenConfigController {
|
|||||||
@ApiOperation(value = " 添加自定义大屏配置信息", notes = "添加自定义大屏配置信息", httpMethod = "POST")
|
@ApiOperation(value = " 添加自定义大屏配置信息", notes = "添加自定义大屏配置信息", httpMethod = "POST")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<Object> add(@RequestBody LargeScreenConfig largeScreenConfig) {
|
public Result<Object> add(@RequestBody LargeScreenConfig largeScreenConfig) {
|
||||||
|
LargeScreenConfig dbConfig = largeScreenConfigService.getOne(new LambdaQueryWrapper<LargeScreenConfig>()
|
||||||
|
.eq(LargeScreenConfig::getProjectSn, largeScreenConfig.getProjectSn())
|
||||||
|
.eq(LargeScreenConfig::getConfigKey, largeScreenConfig.getConfigKey())
|
||||||
|
);
|
||||||
|
if (dbConfig != null) {
|
||||||
|
largeScreenConfig.setId(dbConfig.getId());
|
||||||
|
largeScreenConfigService.updateById(largeScreenConfig);
|
||||||
|
} else {
|
||||||
largeScreenConfigService.save(largeScreenConfig);
|
largeScreenConfigService.save(largeScreenConfig);
|
||||||
|
}
|
||||||
return Result.success("添加成功!");
|
return Result.success("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user