【8.1.7】【menu】更新接口,获取业务下所有视图

dev-8.1.9
fengshuonan 2024-05-13 17:01:36 +08:00
parent dfbbf2154b
commit 54570bd812
3 changed files with 55 additions and 0 deletions

View File

@ -24,6 +24,7 @@
*/
package cn.stylefeng.roses.kernel.sys.api;
import cn.stylefeng.roses.kernel.sys.api.pojo.menu.BusinessViewDTO;
import cn.stylefeng.roses.kernel.sys.api.pojo.menu.ProjectBusinessDTO;
import java.util.List;
@ -44,4 +45,12 @@ public interface ProjectBusinessGetApi {
*/
List<ProjectBusinessDTO> getProjectBusinessList();
/**
*
*
* @author fengshuonan
* @since 2024/5/13 16:52
*/
List<BusinessViewDTO> getBusinessViewList(Long businessId);
}

View File

@ -0,0 +1,24 @@
package cn.stylefeng.roses.kernel.sys.api.pojo.menu;
import lombok.Data;
/**
* DTO
*
* @author fengshuonan
* @since 2024/5/13 16:51
*/
@Data
public class BusinessViewDTO {
/**
* id
*/
private Long viewId;
/**
*
*/
private String viewName;
}

View File

@ -8,12 +8,14 @@ import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
import cn.stylefeng.roses.kernel.sys.api.ProjectBusinessGetApi;
import cn.stylefeng.roses.kernel.sys.api.constants.PermissionCodeConstants;
import cn.stylefeng.roses.kernel.sys.api.pojo.menu.BusinessViewDTO;
import cn.stylefeng.roses.kernel.sys.api.pojo.menu.ProjectBusinessDTO;
import cn.stylefeng.roses.kernel.sys.modular.menu.entity.SysMenu;
import cn.stylefeng.roses.kernel.sys.modular.menu.pojo.request.SysMenuRequest;
import cn.stylefeng.roses.kernel.sys.modular.menu.pojo.response.AppGroupDetail;
import cn.stylefeng.roses.kernel.sys.modular.menu.service.SysMenuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.repository.query.Param;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@ -127,4 +129,24 @@ public class SysMenuController {
return new SuccessResponseData<>(bean.getProjectBusinessList());
}
/**
*
*
* @author fengshuonan
* @since 2024/5/13 16:54
*/
@GetResource(name = "获取业务设计下的所有视图列表", path = "/sysMenu/getBusinessViewList")
public ResponseData<List<BusinessViewDTO>> getBusinessViewList(@Param("businessId") Long businessId) {
ProjectBusinessGetApi bean = null;
try {
bean = SpringUtil.getBean(ProjectBusinessGetApi.class);
} catch (Exception e) {
log.warn("无法获取到ProjectBusinessGetApi Bean");
return new SuccessResponseData<>(new ArrayList<>());
}
return new SuccessResponseData<>(bean.getBusinessViewList(businessId));
}
}