| | |
| | | this.id = activityPlayer.getId(); |
| | | this.playerName = activityPlayer.getPlayer() != null ? activityPlayer.getPlayer().getName() : ""; |
| | | this.projectName = activityPlayer.getProjectName(); |
| | | // 临时使用废弃的Player.phone字段,后续需要从服务层传入User的phone |
| | | this.phone = activityPlayer.getPlayer() != null ? activityPlayer.getPlayer().getPhone() : ""; |
| | | this.averageScore = activityPlayer.getTotalScore(); |
| | | this.ratingCount = 0; // 需要从评分表中统计 |
| | |
| | | this.state = activityPlayer.getState(); |
| | | } |
| | | |
| | | public CompetitionParticipantResponse(ActivityPlayer activityPlayer, String userPhone) { |
| | | this.id = activityPlayer.getId(); |
| | | this.playerName = activityPlayer.getPlayer() != null ? activityPlayer.getPlayer().getName() : ""; |
| | | this.projectName = activityPlayer.getProjectName(); |
| | | // 从参数获取User的phone |
| | | this.phone = userPhone != null ? userPhone : ""; |
| | | this.averageScore = activityPlayer.getTotalScore(); |
| | | this.ratingCount = 0; // 需要从评分表中统计 |
| | | this.applyTime = activityPlayer.getCreateTime() != null ? |
| | | activityPlayer.getCreateTime().format(FORMATTER) : null; |
| | | this.state = activityPlayer.getState(); |
| | | } |
| | | |
| | | public CompetitionParticipantResponse(ActivityPlayer activityPlayer, Integer ratingCount) { |
| | | this(activityPlayer); |
| | | this.ratingCount = ratingCount != null ? ratingCount : 0; |