| | |
| | | |
| | | package org.springblade.mdm.program.controller; |
| | | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.Parameters; |
| | | import io.swagger.v3.oas.annotations.enums.ParameterIn; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.tenant.annotation.NonDS; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.mdm.program.service.NcNodeService; |
| | | import org.springblade.mdm.program.vo.NcNodeVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 程序节点 |
| | |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/save") |
| | | @Operation(summary = "新增节点", description = "节点信息") |
| | | @Operation(summary = "新增节点", description = "节点信息,id保持空") |
| | | public R<Boolean> save(@RequestBody NcNodeVO vo) { |
| | | |
| | | ncNodeService.saveNcCode(vo); |
| | | return R.<Boolean>status(true); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/update") |
| | | @Operation(summary = "修改节点") |
| | | @Operation(summary = "修改节点", description = "节点信息,必须传入ID") |
| | | public R<Boolean> update(@RequestBody NcNodeVO vo) { |
| | | |
| | | ncNodeService.updateNcCode(vo); |
| | | return R.<Boolean>status(true); |
| | | } |
| | |
| | | ncNodeService.removeById(id); |
| | | return R.<Boolean>status(true); |
| | | } |
| | | |
| | | @GetMapping("/lazy-list") |
| | | @Parameters({ |
| | | @Parameter(name = "deptName", description = "部门名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")), |
| | | @Parameter(name = "fullName", description = "部门全称", in = ParameterIn.QUERY, schema = @Schema(type = "string")) |
| | | }) |
| | | |
| | | @Operation(summary = "懒加载列表", description = "程序目录树形结构") |
| | | public R<List<NcNodeVO>> lazyList(Long parentId) { |
| | | List<NcNodeVO> list = ncNodeService.lazyList(parentId); |
| | | return R.data(list); |
| | | } |
| | | } |