From 29fc6f5b1981775be5d2f0f9f8e61fec2f550252 Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期一, 29 九月 2025 19:29:11 +0800
Subject: [PATCH] 删除所有test开头的测试文件
---
backend/src/main/java/com/rongyichuang/player/service/ActivityPlayerDetailService.java | 31 ++++++++++++++++++++++---------
1 files changed, 22 insertions(+), 9 deletions(-)
diff --git a/backend/src/main/java/com/rongyichuang/player/service/ActivityPlayerDetailService.java b/backend/src/main/java/com/rongyichuang/player/service/ActivityPlayerDetailService.java
index 00413de..0eb0337 100644
--- a/backend/src/main/java/com/rongyichuang/player/service/ActivityPlayerDetailService.java
+++ b/backend/src/main/java/com/rongyichuang/player/service/ActivityPlayerDetailService.java
@@ -1,6 +1,7 @@
package com.rongyichuang.player.service;
import com.rongyichuang.player.dto.response.*;
+import com.rongyichuang.player.dto.response.RegionInfoResponse;
import com.rongyichuang.rating.dto.response.RatingItemResponse;
import com.rongyichuang.rating.entity.RatingScheme;
import com.rongyichuang.rating.repository.RatingSchemeRepository;
@@ -45,14 +46,16 @@
public ActivityPlayerDetailResponse getDetailForRating(Long activityPlayerId) {
log.info("鑾峰彇鎶ュ悕璇︽儏鐢ㄤ簬璇勫垎锛宎ctivityPlayerId: {}", activityPlayerId);
- // 鏌ヨ鍩烘湰淇℃伅
+ // 鏌ヨ鍩烘湰淇℃伅锛屽寘鍚尯鍩熶俊鎭�
String sql = """
- SELECT ap.id, ap.description, ap.activity_id,
+ SELECT ap.id, ap.description, ap.activity_id, ap.region_id,
p.id as player_id, p.name as player_name, p.phone, p.description as player_desc,
- a.name as activity_name, a.rating_scheme_id
+ a.name as activity_name, a.rating_scheme_id,
+ r.id as r_id, r.name as region_name, r.full_path as region_path
FROM t_activity_player ap
JOIN t_player p ON p.id = ap.player_id
JOIN t_activity a ON a.id = ap.activity_id
+ LEFT JOIN t_region r ON r.id = ap.region_id
WHERE ap.id = ?
""";
@@ -70,14 +73,24 @@
ActivityPlayerDetailResponse response = new ActivityPlayerDetailResponse();
response.setId(activityPlayerId);
response.setDescription(row[1] != null ? row[1].toString() : "");
- response.setActivityName(row[7] != null ? row[7].toString() : "");
+ response.setActivityName(row[8] != null ? row[8].toString() : "");
// 鏋勫缓瀛﹀憳淇℃伅
PlayerInfoResponse playerInfo = new PlayerInfoResponse();
- playerInfo.setId(row[3] != null ? ((Number) row[3]).longValue() : null);
- playerInfo.setName(row[4] != null ? row[4].toString() : "");
- playerInfo.setPhone(row[5] != null ? row[5].toString() : "");
- playerInfo.setDescription(row[6] != null ? row[6].toString() : "");
+ playerInfo.setId(row[4] != null ? ((Number) row[4]).longValue() : null);
+ playerInfo.setName(row[5] != null ? row[5].toString() : "");
+ playerInfo.setPhone(row[6] != null ? row[6].toString() : "");
+ playerInfo.setDescription(row[7] != null ? row[7].toString() : "");
+
+ // 鏋勫缓鍖哄煙淇℃伅
+ RegionInfoResponse regionInfo = new RegionInfoResponse();
+ if (row[10] != null) {
+ regionInfo.setId(((Number) row[10]).longValue());
+ regionInfo.setName(row[11] != null ? row[11].toString() : "");
+ regionInfo.setFullPath(row[12] != null ? row[12].toString() : "");
+ response.setRegionInfo(regionInfo);
+ log.info("鎵惧埌鍖哄煙淇℃伅: {}", regionInfo.getName());
+ }
// 鏌ヨ瀛﹀憳澶村儚锛堜娇鐢ㄦ灇涓惧父閲忚〃绀哄鍛樺ご鍍忕被鍨嬶級
if (playerInfo.getId() != null) {
@@ -102,7 +115,7 @@
log.info("鎵惧埌鎻愪氦璧勬枡 {} 涓�", submissionFiles.size());
// 鏌ヨ璇勫垎妯℃澘
- Long ratingSchemeId = row[8] != null ? ((Number) row[8]).longValue() : null;
+ Long ratingSchemeId = row[9] != null ? ((Number) row[9]).longValue() : null;
if (ratingSchemeId != null) {
RatingFormResponse ratingForm = buildRatingForm(ratingSchemeId);
response.setRatingForm(ratingForm);
--
Gitblit v1.8.0