競賽資訊完整版 ( 只剩評分、競賽得獎 )

This commit is contained in:
2025-09-16 17:19:20 +08:00
parent b4386dc481
commit 6ce0b250cb
4 changed files with 67 additions and 22 deletions

View File

@@ -1151,10 +1151,14 @@ export class TeamService {
static async getTeamApps(teamId: string): Promise<any[]> {
console.log('🔍 TeamService.getTeamApps 被調用, teamId:', teamId);
const sql = `
SELECT id, name, description, category, type, icon, icon_color, app_url, likes_count, views_count, rating
FROM apps
WHERE team_id = ? AND is_active = TRUE
ORDER BY created_at DESC
SELECT
a.id, a.name, a.description, a.category, a.type, a.icon, a.icon_color,
a.app_url, a.likes_count, a.views_count, a.rating, a.created_at,
u.name as creator_name, u.department as creator_department
FROM apps a
LEFT JOIN users u ON a.creator_id = u.id
WHERE a.team_id = ? AND a.is_active = TRUE
ORDER BY a.created_at DESC
`;
console.log('📝 getTeamApps SQL:', sql);
console.log('📝 getTeamApps 參數:', [teamId]);