fix -- 工作流部分移除@Autowired和@Resource注解,改用构造器注入
This commit is contained in:
@@ -19,7 +19,6 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -37,7 +36,7 @@ import java.util.List;
|
||||
*/
|
||||
@Validated
|
||||
@Api(value = "流程分类控制器", tags = {"流程分类管理"})
|
||||
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/workflow/category")
|
||||
public class FlowCategoryController extends BaseController {
|
||||
|
||||
@@ -14,12 +14,11 @@ import com.ruoyi.workflow.service.IFlowDefinitionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -40,18 +39,16 @@ import java.util.Map;
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "流程定义")
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/workflow/definition")
|
||||
public class FlowDefinitionController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IFlowDefinitionService flowDefinitionService;
|
||||
private final IFlowDefinitionService flowDefinitionService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
private final ISysUserService userService;
|
||||
|
||||
@Resource
|
||||
private ISysRoleService sysRoleService;
|
||||
private final ISysRoleService sysRoleService;
|
||||
|
||||
|
||||
@GetMapping(value = "/list")
|
||||
|
||||
@@ -7,8 +7,8 @@ import com.ruoyi.workflow.service.IFlowInstanceService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -21,12 +21,12 @@ import java.util.Map;
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "工作流流程实例管理")
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/workflow/instance")
|
||||
public class FlowInstanceController {
|
||||
|
||||
@Autowired
|
||||
private IFlowInstanceService flowInstanceService;
|
||||
private final IFlowInstanceService flowInstanceService;
|
||||
|
||||
@ApiOperation(value = "根据流程定义id启动流程实例")
|
||||
@PostMapping("/startBy/{procDefId}")
|
||||
|
||||
@@ -9,8 +9,8 @@ import com.ruoyi.workflow.service.IFlowTaskService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
@@ -28,12 +28,12 @@ import java.io.OutputStream;
|
||||
*/
|
||||
@Slf4j
|
||||
@Api(tags = "工作流流程任务管理")
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/workflow/task")
|
||||
public class FlowTaskController {
|
||||
|
||||
@Autowired
|
||||
private IFlowTaskService flowTaskService;
|
||||
private final IFlowTaskService flowTaskService;
|
||||
|
||||
@ApiOperation(value = "我发起的流程", response = FlowTaskDto.class)
|
||||
@GetMapping(value = "/myProcess")
|
||||
|
||||
@@ -8,11 +8,11 @@ import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.workflow.service.ISysDeployFormService;
|
||||
import com.ruoyi.workflow.service.ISysFormService;
|
||||
import com.ruoyi.system.domain.SysDeployForm;
|
||||
import com.ruoyi.system.domain.SysForm;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import com.ruoyi.workflow.service.ISysDeployFormService;
|
||||
import com.ruoyi.workflow.service.ISysFormService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@@ -24,14 +24,14 @@ import java.util.List;
|
||||
* @author XuanXuan
|
||||
* @date 2021-04-03
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/workflow/form")
|
||||
public class SysFormController extends BaseController {
|
||||
@Autowired
|
||||
private ISysFormService SysFormService;
|
||||
|
||||
@Autowired
|
||||
private ISysDeployFormService sysDeployFormService;
|
||||
private final ISysFormService SysFormService;
|
||||
|
||||
private final ISysDeployFormService sysDeployFormService;
|
||||
|
||||
/**
|
||||
* 查询流程表单列表
|
||||
|
||||
Reference in New Issue
Block a user