Codex Assistant
1 天以前 c8dffd157cd8b62023b26e62a0b92c152d959423
backend/src/main/java/com/rongyichuang/player/dto/PromotableParticipantResponse.java
@@ -28,9 +28,22 @@
        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 ?