Commit 7a8b10a2 by lenx065@gmail.com

所属球队

parent 58be192a
...@@ -27,6 +27,8 @@ public class PlayerInfoBasketballResponse { ...@@ -27,6 +27,8 @@ public class PlayerInfoBasketballResponse {
private String weight; private String weight;
@ApiModelProperty("位置") @ApiModelProperty("位置")
private String position; private String position;
@ApiModelProperty("所属球队")
private String formTeam;
private String icon; private String icon;
} }
...@@ -40,6 +40,8 @@ public class PlayerInfoFootballResponse { ...@@ -40,6 +40,8 @@ public class PlayerInfoFootballResponse {
private Integer nationalGoals; private Integer nationalGoals;
@ApiModelProperty("国家队入选次数") @ApiModelProperty("国家队入选次数")
private Integer nationalChosenTimes; private Integer nationalChosenTimes;
@ApiModelProperty("所属球队")
private String formTeam;
private String icon; private String icon;
} }
...@@ -36,6 +36,7 @@ public class TeamPlayer extends BaseEntity{ ...@@ -36,6 +36,7 @@ public class TeamPlayer extends BaseEntity{
private Integer nationalGoals; private Integer nationalGoals;
//1热门球员 //1热门球员
private Integer hot; private Integer hot;
private String teamId;
private String apiResponse; private String apiResponse;
} }
...@@ -379,6 +379,12 @@ public class MatchServiceImpl implements MatchService { ...@@ -379,6 +379,12 @@ public class MatchServiceImpl implements MatchService {
return ResponseData.fail400Response("ID 错误, 球员类型不匹配"); return ResponseData.fail400Response("ID 错误, 球员类型不匹配");
} }
Team team = teamMapper.selectById(teamPlayer.getTeamId());
String teamName = "";
if(team != null){
teamName = team.getTeamName();
}
return ResponseData.successResponse(PlayerInfoBasketballResponse.builder() return ResponseData.successResponse(PlayerInfoBasketballResponse.builder()
.birthCountry(teamPlayer.getBirthCountry()) .birthCountry(teamPlayer.getBirthCountry())
.birthday(teamPlayer.getBirthday()) .birthday(teamPlayer.getBirthday())
...@@ -391,6 +397,7 @@ public class MatchServiceImpl implements MatchService { ...@@ -391,6 +397,7 @@ public class MatchServiceImpl implements MatchService {
.position(teamPlayer.getPosition()) .position(teamPlayer.getPosition())
.rnNumber(teamPlayer.getRnNumber()) .rnNumber(teamPlayer.getRnNumber())
.weight(teamPlayer.getWeight()) .weight(teamPlayer.getWeight())
.formTeam(teamName)
.build()); .build());
} }
...@@ -416,6 +423,12 @@ public class MatchServiceImpl implements MatchService { ...@@ -416,6 +423,12 @@ public class MatchServiceImpl implements MatchService {
height = (int) (Double.parseDouble(teamPlayer.getHeight().substring(0, teamPlayer.getHeight().length() - 1)) * 100); height = (int) (Double.parseDouble(teamPlayer.getHeight().substring(0, teamPlayer.getHeight().length() - 1)) * 100);
} }
Team team = teamMapper.selectById(teamPlayer.getTeamId());
String teamName = "";
if(team != null){
teamName = team.getTeamName();
}
return ResponseData.successResponse(PlayerInfoFootballResponse.builder() return ResponseData.successResponse(PlayerInfoFootballResponse.builder()
.birthday(teamPlayer.getBirthday()) .birthday(teamPlayer.getBirthday())
.country(countryName) .country(countryName)
...@@ -434,6 +447,7 @@ public class MatchServiceImpl implements MatchService { ...@@ -434,6 +447,7 @@ public class MatchServiceImpl implements MatchService {
.secondPosition1(CommonUtil.getMainPosition(teamPlayer.getSecondPosition1())) .secondPosition1(CommonUtil.getMainPosition(teamPlayer.getSecondPosition1()))
.secondPosition2(CommonUtil.getMainPosition(teamPlayer.getSecondPosition2())) .secondPosition2(CommonUtil.getMainPosition(teamPlayer.getSecondPosition2()))
.weight(teamPlayer.getWeight() == null ? "" : teamPlayer.getWeight()) .weight(teamPlayer.getWeight() == null ? "" : teamPlayer.getWeight())
.formTeam(teamName)
.build()); .build());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment