Skip to content

Commit

Permalink
fix the member team interface
Browse files Browse the repository at this point in the history
  • Loading branch information
liberhe committed Dec 17, 2023
1 parent c9c1776 commit 26ed0a9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/dl/officialsite/team/TeamController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<TeamsWithMembers> teamMembers = teamService.getMemberTeamsInfo(memberId);
return BaseResponse.successWithData(teamMembers);
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/com/dl/officialsite/team/TeamService.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,6 @@ public List<Member> getNeedApproveMembers(Long teamId) {

public List<TeamsWithMembers> getMemberTeamsInfo(Long memberId) {
List<TeamMember> 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> teamsWithMembers = new ArrayList<>();

Expand All @@ -257,7 +253,6 @@ public List<TeamsWithMembers> getMemberTeamsInfo(Long memberId) {
teamsWithMembers.add(teamVO);
});
return teamsWithMembers;
}
}


Expand Down

0 comments on commit 26ed0a9

Please sign in to comment.