diff --git a/src/main/java/com/dl/officialsite/team/TeamController.java b/src/main/java/com/dl/officialsite/team/TeamController.java index dbc70797..75e9f137 100644 --- a/src/main/java/com/dl/officialsite/team/TeamController.java +++ b/src/main/java/com/dl/officialsite/team/TeamController.java @@ -92,7 +92,7 @@ BaseResponse getTeamById(@RequestParam Long teamId, @RequestParam String address /** * 查询member属于那个团队 */ - @GetMapping("/member/role") + @GetMapping("/member/teams") BaseResponse getMemberTeamsInfo(@RequestParam Long memberId, @RequestParam String address) { List teamMembers = teamService.getMemberTeamsInfo(memberId); return BaseResponse.successWithData(teamMembers); diff --git a/src/main/java/com/dl/officialsite/team/TeamService.java b/src/main/java/com/dl/officialsite/team/TeamService.java index 08e15cdf..634880a9 100644 --- a/src/main/java/com/dl/officialsite/team/TeamService.java +++ b/src/main/java/com/dl/officialsite/team/TeamService.java @@ -242,10 +242,6 @@ public List getNeedApproveMembers(Long teamId) { public List getMemberTeamsInfo(Long memberId) { List teamMembers = teamMemberRepository.findByMemberId(memberId); - if (teamMembers.size() == 0) { - throw new BizException(CodeEnums.MEMBER_NOT_IN_TEAM.getCode(), - CodeEnums.MEMBER_NOT_IN_TEAM.getMsg()); - } else { //ids List teamsWithMembers = new ArrayList<>(); @@ -257,7 +253,6 @@ public List getMemberTeamsInfo(Long memberId) { teamsWithMembers.add(teamVO); }); return teamsWithMembers; - } }