feat: 添加已确认成绩列表API

- 新增 /mini/general/confirmed 接口
- MartialResultServiceImpl 添加 getConfirmedGeneralList 方法
- 支持总裁页面同时显示待确认和已确认成绩

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
2025-12-28 16:09:41 +08:00
parent aab66f79fe
commit 1d5ac896dd
11 changed files with 43 additions and 0 deletions

View File

@@ -766,4 +766,14 @@ public class MartialMiniController extends BladeController {
return R.data(venues); return R.data(venues);
} }
/**
* 获取已总裁确认的成绩列表
*/
@GetMapping("/general/confirmed")
@Operation(summary = "已总裁确认列表", description = "获取已总裁确认的成绩列表")
public R<List<MartialResult>> getConfirmedGeneralList(@RequestParam Long competitionId) {
List<MartialResult> list = resultService.getConfirmedGeneralList(competitionId);
return R.data(list);
}
} }

View File

@@ -93,4 +93,10 @@ public interface IMartialResultService extends IService<MartialResult> {
*/ */
List<MartialResult> getPendingGeneralConfirmList(Long competitionId); List<MartialResult> getPendingGeneralConfirmList(Long competitionId);
/**
* 获取已总裁确认的成绩列表
*/
List<MartialResult> getConfirmedGeneralList(Long competitionId);
} }

View File

@@ -713,4 +713,31 @@ public class MartialResultServiceImpl extends ServiceImpl<MartialResultMapper, M
return results; return results;
} }
/**
* 获取已总裁确认的成绩列表
*/
@Override
public List<MartialResult> getConfirmedGeneralList(Long competitionId) {
QueryWrapper<MartialResult> wrapper = new QueryWrapper<>();
wrapper.eq("competition_id", competitionId);
wrapper.eq("is_deleted", 0);
wrapper.eq("score_status", MartialResult.SCORE_STATUS_GENERAL_CONFIRMED);
wrapper.orderByDesc("general_judge_time");
List<MartialResult> results = this.list(wrapper);
// 填充选手信息
for (MartialResult result : results) {
if (result.getAthleteId() != null) {
MartialAthlete athlete = athleteService.getById(result.getAthleteId());
if (athlete != null) {
result.setPlayerName(athlete.getPlayerName());
result.setTeamName(athlete.getTeamName());
}
}
}
return results;
}
} }