提交 4ac1154b authored 作者: zhoushaopan's avatar zhoushaopan

[工作流模块]新增了用户模块管理

上级 32a692e9
package com.tykj.workflowcore.workflow_editer.controller;
import com.tykj.workflowcore.workflow_editer.entity.WorkFlowRole;
import com.tykj.workflowcore.workflow_editer.entity.WorkFlowRoleType;
import com.tykj.workflowcore.workflow_editer.entity.WorkFlowUser;
import com.tykj.workflowcore.workflow_editer.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* ClassName: UserController
* Package: com.tykj.workflowcore.workflow_editer.controller
* Description:
* Datetime: 2021/3/24 18:56
*
* @Author: zsp
*/
@RestController
@Api(tags = "人员管理接口")
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
@GetMapping("/getAllUsers")
@ApiOperation(value = "查询所有用户")
public List<WorkFlowUser> getAllUsers(){
List<WorkFlowUser> allUser = userService.getAllUser();
return allUser;
}
@GetMapping("/getAllRoles")
@ApiOperation(value = "查询所有的角色类型")
public List<WorkFlowRoleType> getAllRoles(){
List<WorkFlowRoleType> roleType = userService.getRoleType();
return roleType;
}
@GetMapping("/getAllUserByRole")
@ApiOperation(value = "查询所有的角色类型下的所有角色")
public List<WorkFlowRole> getAllUserByRole(String roleType){
List<WorkFlowRole> allRole = userService.getAllRole(roleType);
return allRole;
}
}
......@@ -33,7 +33,7 @@ public class DefaultUserServiceImpl implements UserService {
List<WorkFlowUser> workFlowUsers = new ArrayList<>();
for (int i = 0; i < 10; i++) {
WorkFlowUser workFlowUser = new WorkFlowUser();
workFlowUser.setUserName("张1");
workFlowUser.setUserName("张"+i);
workFlowUser.setId(i);
workFlowUsers.add(workFlowUser);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论