Commit 9eca6384 by Lem

用户信息不为null

sportId字段
parent 27b57db0
...@@ -13,6 +13,7 @@ public class RecentMatchResponse { ...@@ -13,6 +13,7 @@ public class RecentMatchResponse {
private String id; private String id;
private int status; private int status;
private Integer sportsId;
private String sportsName; private String sportsName;
private String matchTime; private String matchTime;
private TeamResponse home; private TeamResponse home;
......
...@@ -306,11 +306,13 @@ public class MatchServiceImpl implements MatchService { ...@@ -306,11 +306,13 @@ public class MatchServiceImpl implements MatchService {
List<RecentMatchResponse> responses = matches.stream().map(b -> { List<RecentMatchResponse> responses = matches.stream().map(b -> {
Team home = teamMapper.selectById(b.getHomeId()); Team home = teamMapper.selectById(b.getHomeId());
Team away = teamMapper.selectById(b.getAwayId()); Team away = teamMapper.selectById(b.getAwayId());
Sports sports = sportsMapper.selectById(b.getSportsId());
return RecentMatchResponse.builder() return RecentMatchResponse.builder()
.id(b.getId()) .id(b.getId())
.matchTime(DateUtil.format(b.getMatchTime(), DateUtil.MDHM_)) .matchTime(DateUtil.format(b.getMatchTime(), DateUtil.MDHM_))
.sportsName(b.getCompetitionShortName()) .sportsName(b.getCompetitionShortName())
.sportsId(sports.getSportsId())
.status(b.getCompetitionStatus()) .status(b.getCompetitionStatus())
.away(TeamResponse.builder() .away(TeamResponse.builder()
.score(b.getHomeScore()) .score(b.getHomeScore())
......
...@@ -592,7 +592,7 @@ public class UserServiceImpl implements UserService { ...@@ -592,7 +592,7 @@ public class UserServiceImpl implements UserService {
.avatarUrl(ConstantValue.completeAddress(account.getUserIcon())) .avatarUrl(ConstantValue.completeAddress(account.getUserIcon()))
.id(account.getId()) .id(account.getId())
.userName(account.getUserName()) .userName(account.getUserName())
.userDesc(account.getUserDesc()) .userDesc(StringUtils.isBlank(account.getUserDesc()) ? "" : account.getUserDesc())
.message((int) count + 1) .message((int) count + 1)
.collectMatch((int) collectMatch) .collectMatch((int) collectMatch)
.collectTeam((int) collectTeam) .collectTeam((int) collectTeam)
......
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