Browse Source

Merge branch 'feature/517' into sprint/s4

sprint/s4
董书康 7 months ago
parent
commit
53a66170e8
6 changed files with 114 additions and 0 deletions
  1. +40
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java
  2. +20
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/repository/LayoutConfigRepository.java
  3. +16
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/LayoutConfigServiceImpl.java
  4. +7
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/LayoutConfigService.java
  5. +7
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java
  6. +24
    -0
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/impl/BasicApiServiceImpl.java

+ 40
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/entity/LayoutConfig.java View File

@ -0,0 +1,40 @@
/*
* Author: DONGSK
* Datetime: 2024/4/25 16:43
* Description:
* History:
* 作者姓名 --修改时间 --版本号--描述
*/
package com.digiwin.athena.app.infra.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import java.io.Serializable;
/**
* DigiwinSummit
*
* @author DONGSK 2024/4/25 16:43
* @since 1.0.0
*/
@Data
@TableName(value = "layout_config", autoResultMap = true)
public class LayoutConfig extends Model<LayoutConfig> implements Serializable {
@TableField(value = "sys_id")
String sysId;
@TableField(value = "user_id")
String userId;
@TableField(value = "tenant_id")
String tenantId;
@TableField(value = "top")
String top;
@TableField(value = "left")
String left;
@TableField(value = "height")
String height;
@TableField(value = "width")
String width;
}

+ 20
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/repository/LayoutConfigRepository.java View File

@ -0,0 +1,20 @@
/*
* Author: DONGSK
* Datetime: 2024/4/25 16:49
* Description:
* History:
* 作者姓名 --修改时间 --版本号--描述
*/
package com.digiwin.athena.app.infra.repository;
import com.digiwin.athena.app.infra.entity.LayoutConfig;
import com.digiwin.athena.opt.persistence.repository.BaseRepository;
/**
* DigiwinSummitRepository
*
* @author DONGSK 2024/4/25 16:49
* @since 1.0.0
*/
public interface LayoutConfigRepository extends BaseRepository<LayoutConfig> {
}

+ 16
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/Impl/LayoutConfigServiceImpl.java View File

@ -0,0 +1,16 @@
package com.digiwin.athena.app.infra.service.Impl;
import com.digiwin.athena.app.infra.entity.LayoutConfig;
import com.digiwin.athena.app.infra.repository.LayoutConfigRepository;
import com.digiwin.athena.app.infra.service.LayoutConfigService;
import com.digiwin.athena.opt.persistence.service.impl.AbsBaseService;
import org.springframework.stereotype.Service;
/**
* @author zhenggl
* create: 2023-04-28
* Description:
*/
@Service
public class LayoutConfigServiceImpl extends AbsBaseService<LayoutConfigRepository, LayoutConfig> implements LayoutConfigService {
}

+ 7
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/infra/service/LayoutConfigService.java View File

@ -0,0 +1,7 @@
package com.digiwin.athena.app.infra.service;
import com.digiwin.athena.app.infra.entity.LayoutConfig;
import com.digiwin.athena.opt.persistence.service.IBaseService;
public interface LayoutConfigService extends IBaseService<LayoutConfig> {
}

+ 7
- 0
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/provider/BasicApiService.java View File

@ -13,6 +13,7 @@ import com.digiwin.app.service.restful.DWPathVariable;
import com.digiwin.app.service.restful.DWRequestMapping; import com.digiwin.app.service.restful.DWRequestMapping;
import com.digiwin.app.service.restful.DWRequestMethod; import com.digiwin.app.service.restful.DWRequestMethod;
import com.digiwin.app.service.restful.DWRestfulService; import com.digiwin.app.service.restful.DWRestfulService;
import com.digiwin.athena.app.infra.entity.LayoutConfig;
import java.util.Map; import java.util.Map;
@ -41,6 +42,12 @@ public interface BasicApiService extends DWService {
@DWRequestMapping(path = "/api/clear/login", method = DWRequestMethod.GET) @DWRequestMapping(path = "/api/clear/login", method = DWRequestMethod.GET)
Object clearLogin() throws Exception; Object clearLogin() throws Exception;
@AllowAnonymous
@DWRequestMapping(path = "/api/517/config/save", method = DWRequestMethod.POST)
Object layoutConfig(LayoutConfig layoutConfig) throws Exception;
@AllowAnonymous
@DWRequestMapping(path = "/api/517/config/list", method = DWRequestMethod.GET)
Object layoutConfig(String userId, String tenantId, String sysId) throws Exception;
} }

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

@ -9,10 +9,14 @@
package com.digiwin.athena.app.provider.impl; package com.digiwin.athena.app.provider.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.digiwin.app.service.DWServiceContext; import com.digiwin.app.service.DWServiceContext;
import com.digiwin.athena.app.infra.entity.LayoutConfig;
import com.digiwin.athena.app.infra.service.LayoutConfigService;
import com.digiwin.athena.app.provider.BasicApiService; import com.digiwin.athena.app.provider.BasicApiService;
import com.digiwin.athena.app.service.basic.LoginService; import com.digiwin.athena.app.service.basic.LoginService;
import com.digiwin.athena.opt.common.eai.service.EAIServiceContext; import com.digiwin.athena.opt.common.eai.service.EAIServiceContext;
import org.apache.commons.lang.StringUtils;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.HashMap; import java.util.HashMap;
@ -32,6 +36,9 @@ public class BasicApiServiceImpl implements BasicApiService {
@Resource @Resource
LoginService loginService; LoginService loginService;
@Resource
LayoutConfigService layoutConfigService;
@Override @Override
public String helloWord(String name) throws Exception { public String helloWord(String name) throws Exception {
return "hello ," + name; return "hello ," + name;
@ -63,4 +70,21 @@ public class BasicApiServiceImpl implements BasicApiService {
return "ok"; return "ok";
} }
@Override
public Object layoutConfig(LayoutConfig layoutConfig) throws Exception {
return layoutConfigService.saveOrUpdate(layoutConfig);
}
@Override
public Object layoutConfig(String userId, String tenantId, String sysId) throws Exception {
LambdaQueryChainWrapper<LayoutConfig> lambdaQuery = layoutConfigService.lambdaQuery();
lambdaQuery.eq(LayoutConfig::getUserId, userId);
lambdaQuery.eq(LayoutConfig::getTenantId, tenantId);
if (StringUtils.isNotBlank(sysId)) {
lambdaQuery.eq(LayoutConfig::getSysId, sysId);
}
return lambdaQuery.list();
}
} }

Loading…
Cancel
Save