| | |
| | | this.id = activityPlayer.getId(); |
| | | this.playerName = activityPlayer.getPlayer() != null ? activityPlayer.getPlayer().getName() : ""; |
| | | this.projectName = activityPlayer.getProjectName(); |
| | | // 从User实体获取phone,而不是从Player实体(Player.phone已废弃) |
| | | this.phone = activityPlayer.getPlayer() != null && activityPlayer.getPlayer().getUser() != null ? |
| | | activityPlayer.getPlayer().getUser().getPhone() : ""; |
| | | // 临时使用废弃的Player.phone字段,后续需要从服务层传入User的phone |
| | | this.phone = activityPlayer.getPlayer() != null ? activityPlayer.getPlayer().getPhone() : ""; |
| | | this.averageScore = averageScore; |
| | | this.ratingCount = ratingCount != null ? ratingCount : 0; |
| | | this.applyTime = activityPlayer.getCreateTime() != null ? |
| | | activityPlayer.getCreateTime().format(FORMATTER) : null; |
| | | this.state = activityPlayer.getState(); |
| | | this.playerId = activityPlayer.getPlayerId(); |
| | | } |
| | | |
| | | public PromotableParticipantResponse(ActivityPlayer activityPlayer, BigDecimal averageScore, Integer ratingCount, 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 = averageScore; |
| | | this.ratingCount = ratingCount != null ? ratingCount : 0; |
| | | this.applyTime = activityPlayer.getCreateTime() != null ? |