master
ShiPengHui 2022-07-05 19:56:17 +08:00
parent b42b6b0b77
commit 4ca6b5a164
4 changed files with 4 additions and 4 deletions

View File

@ -18,11 +18,11 @@ import java.util.List;
@RequestMapping("/project/type") @RequestMapping("/project/type")
public class ProjectTypeController { public class ProjectTypeController {
@Autowired @Autowired
private IProjectTypeService projectTypeServiceImpl; private IProjectTypeService projectTypeService;
@GetMapping @GetMapping
public ResponseList<ProjectType> getAllProjectType() { public ResponseList<ProjectType> getAllProjectType() {
List<ProjectType> res = projectTypeServiceImpl.findAllProjectType(); List<ProjectType> res = projectTypeService.findAllProjectType();
return ResponseList.ofSuccess("获得所有类成功", res); return ResponseList.ofSuccess("获得所有类成功", res);
} }
} }

View File

@ -49,4 +49,4 @@ public class TaskController {
task = taskService.insertTask(token, task); task = taskService.insertTask(token, task);
return ResponseMap.ofSuccess("新建成功", task); return ResponseMap.ofSuccess("新建成功", task);
} }
} }

View File

@ -15,7 +15,6 @@ import java.util.List;
*/ */
@Service @Service
public class ProjectTypeServiceImpl extends ServiceImpl<ProjectTypeMapper, ProjectType> implements IProjectTypeService { public class ProjectTypeServiceImpl extends ServiceImpl<ProjectTypeMapper, ProjectType> implements IProjectTypeService {
@Override @Override
public List<ProjectType> findAllProjectType() { public List<ProjectType> findAllProjectType() {
return baseMapper.selectList(Wrappers.<ProjectType>lambdaQuery().ne(ProjectType::getProjectClassId, 0)); return baseMapper.selectList(Wrappers.<ProjectType>lambdaQuery().ne(ProjectType::getProjectClassId, 0));

View File

@ -29,6 +29,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements IT
@Autowired @Autowired
private ProjectGroupServiceImpl projectGroupService; private ProjectGroupServiceImpl projectGroupService;
//FIXME: 抛出未授权异常
@Override @Override
public List<Task> getTaskList(String token, Integer projectId, Long fatherId) throws BadRequestException { public List<Task> getTaskList(String token, Integer projectId, Long fatherId) throws BadRequestException {
if (projectGroupService.getUserLevelInGroup(token, projectId) == 0 || fatherId == null) { if (projectGroupService.getUserLevelInGroup(token, projectId) == 0 || fatherId == null) {