Browse Source

保存

sprint/s4
董书康 7 months ago
parent
commit
671b522fe0
1 changed files with 18 additions and 0 deletions
  1. +18
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java

+ 18
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java View File

@ -72,6 +72,24 @@ public class BasicApiServiceImpl implements BasicApiService {
@Override @Override
public Object layoutConfig(LayoutConfig layoutConfig) throws Exception { public Object layoutConfig(LayoutConfig layoutConfig) throws Exception {
LambdaQueryChainWrapper<LayoutConfig> lambdaQuery = layoutConfigService.lambdaQuery()
.eq(LayoutConfig::getUserId, layoutConfig.getUserId())
.eq(LayoutConfig::getTenantId, layoutConfig.getTenantId())
.eq(LayoutConfig::getSysId, layoutConfig.getSysId());
if (lambdaQuery.exists()) {
layoutConfigService.lambdaUpdate()
.set(LayoutConfig::getTop, layoutConfig.getTop())
.set(LayoutConfig::getLeft, layoutConfig.getLeft())
.set(LayoutConfig::getWidth, layoutConfig.getWidth())
.set(LayoutConfig::getHeight, layoutConfig.getHeight())
.eq(LayoutConfig::getUserId, layoutConfig.getUserId())
.eq(LayoutConfig::getTenantId, layoutConfig.getTenantId())
.eq(LayoutConfig::getSysId, layoutConfig.getSysId())
.update();
} else {
layoutConfigService.save(layoutConfig);
}
return layoutConfigService.saveOrUpdate(layoutConfig); return layoutConfigService.saveOrUpdate(layoutConfig);
} }


Loading…
Cancel
Save