Resolve merge conflicts and fix student course details functionality

This commit is contained in:
祀梦
2025-12-22 19:56:36 +08:00
6 changed files with 53 additions and 19 deletions

View File

@@ -1,6 +1,5 @@
const Score = require('../models/Score');
const Student = require('../models/Student');
const Course = require('../models/Course');
class StudentService {
@@ -23,10 +22,6 @@ class StudentService {
}
static async getStudentGrades(userId) {
// 先通过 userId 获取 studentId
// 假设 users.id = students.id或者通过 user_id 关联
// 根据之前的 authService我们假设 users.id 就是 students.id
// 确认学生是否存在
const student = await Student.findById(userId);
if (!student) {
@@ -72,4 +67,4 @@ class StudentService {
}
}
module.exports = StudentService;
module.exports = StudentService;