mirror of https://gitee.com/stylefeng/roses
【8.1.7】【menu】更新接口,获取业务下所有视图
parent
dfbbf2154b
commit
54570bd812
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue