Browse Source

Merge branch 'sprint/s4' into release/s4

release/s4
董书康 7 months ago
parent
commit
d097e11317
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
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);
}


Loading…
Cancel
Save