package com.whyc.controller;
|
|
import com.whyc.dto.Response;
|
import com.whyc.pojo.WorkflowAction;
|
import com.whyc.service.WorkflowActionService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
import java.util.List;
|
|
@RestController
|
@RequestMapping("workflowAction")
|
@Api(tags = "工作流动作")
|
public class WorkflowActionController {
|
|
@Autowired
|
private WorkflowActionService service;
|
|
@PostMapping
|
@ApiOperation(value = "创建动作规则")
|
public Response add(@RequestBody WorkflowAction workflowAction){
|
service.add(workflowAction);
|
return new Response().setII(1,"创建成功");
|
}
|
|
@PutMapping
|
@ApiOperation(value = "更新动作规则")
|
public Response update(@RequestBody WorkflowAction workflowAction){
|
service.update(workflowAction);
|
return new Response().setII(1,"更新成功");
|
}
|
|
@GetMapping("actionTypeList")
|
@ApiOperation(value = "查询动作类型列表")
|
public Response<List<Integer>> getActionTypeList(@RequestParam Integer type,@RequestParam Integer linkType,@RequestParam Integer roleType){
|
List<Integer> actionTypeList = service.getActionTypeList(type,linkType,roleType);
|
return new Response<List<Integer>>().set(1,actionTypeList);
|
}
|
|
|
}
|