Commit 7a8b10a2 by lenx065@gmail.com

所属球队

parent 58be192a
......@@ -27,6 +27,8 @@ public class PlayerInfoBasketballResponse {
private String weight;
@ApiModelProperty("位置")
private String position;
@ApiModelProperty("所属球队")
private String formTeam;
private String icon;
}
......@@ -40,6 +40,8 @@ public class PlayerInfoFootballResponse {
private Integer nationalGoals;
@ApiModelProperty("国家队入选次数")
private Integer nationalChosenTimes;
@ApiModelProperty("所属球队")
private String formTeam;
private String icon;
}
......@@ -36,6 +36,7 @@ public class TeamPlayer extends BaseEntity{
private Integer nationalGoals;
//1热门球员
private Integer hot;
private String teamId;
private String apiResponse;
}
......@@ -379,6 +379,12 @@ public class MatchServiceImpl implements MatchService {
return ResponseData.fail400Response("ID 错误, 球员类型不匹配");
}
Team team = teamMapper.selectById(teamPlayer.getTeamId());
String teamName = "";
if(team != null){
teamName = team.getTeamName();
}
return ResponseData.successResponse(PlayerInfoBasketballResponse.builder()
.birthCountry(teamPlayer.getBirthCountry())
.birthday(teamPlayer.getBirthday())
......@@ -391,6 +397,7 @@ public class MatchServiceImpl implements MatchService {
.position(teamPlayer.getPosition())
.rnNumber(teamPlayer.getRnNumber())
.weight(teamPlayer.getWeight())
.formTeam(teamName)
.build());
}
......@@ -416,6 +423,12 @@ public class MatchServiceImpl implements MatchService {
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()
.birthday(teamPlayer.getBirthday())
.country(countryName)
......@@ -434,6 +447,7 @@ public class MatchServiceImpl implements MatchService {
.secondPosition1(CommonUtil.getMainPosition(teamPlayer.getSecondPosition1()))
.secondPosition2(CommonUtil.getMainPosition(teamPlayer.getSecondPosition2()))
.weight(teamPlayer.getWeight() == null ? "" : teamPlayer.getWeight())
.formTeam(teamName)
.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