3 changed files with 61 additions and 13 deletions
@ -0,0 +1,38 @@
|
||||
package com.biutag.lan.controller.system; |
||||
|
||||
import com.biutag.aop.NotPower; |
||||
import com.biutag.core.AjaxResult; |
||||
import com.biutag.lan.domain.FlowNode; |
||||
import com.biutag.lan.domain.vo.FlowNodeVo; |
||||
import com.biutag.lan.service.FlowNodeService; |
||||
import io.swagger.annotations.Api; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
@RestController |
||||
@RequestMapping("api/system/flowNode") |
||||
@Api(tags = "流程节点获取") |
||||
@RequiredArgsConstructor |
||||
public class FlowNodeController { |
||||
private final FlowNodeService flowNodeService; |
||||
|
||||
@NotPower |
||||
@GetMapping("/list") |
||||
public AjaxResult<List<FlowNodeVo>> list() { |
||||
List<FlowNode> list = flowNodeService.list(); |
||||
List<FlowNodeVo> result = new ArrayList<>(); |
||||
for (FlowNode flowNode : list) { |
||||
FlowNodeVo flowNodeVo = new FlowNodeVo(); |
||||
flowNodeVo.setKey(flowNode.getKey()); |
||||
flowNodeVo.setName(flowNode.getBeforeName()); |
||||
flowNodeVo.setFullName(flowNode.getFullName()); |
||||
result.add(flowNodeVo); |
||||
} |
||||
return AjaxResult.success(result); |
||||
} |
||||
} |
||||
@ -0,0 +1,12 @@
|
||||
package com.biutag.lan.domain.vo; |
||||
|
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
@Getter |
||||
@Setter |
||||
public class FlowNodeVo { |
||||
private String key; |
||||
private String name; |
||||
private String fullName; |
||||
} |
||||
Loading…
Reference in new issue