woals 07-26
240726 권민수 DB변동에 맞게 정상적으로 학생 정보 조회 가능하도록 수정
@b73a5a4bf148349f7d18ba6f93c307cc52331964
src/main/resources/mybatis/mapper/lms/student-SQL.xml
--- src/main/resources/mybatis/mapper/lms/student-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/student-SQL.xml
@@ -20,14 +20,13 @@
         SELECT
             u.user_nm AS studentName,
             i.ednst_nm AS institutionName,
-            g.grd_no AS grade,
-            c.scls_nm AS className,
+            ui.grd_no AS grade,
+            ui.scls_nm AS className,
             uc.stn_qna AS studentQuestion
         FROM users u
-                 JOIN institution i ON u.ednst_id = i.ednst_id
+                 JOIN user_institution ui ON u.user_id = ui.user_id
+                 JOIN institution i ON ui.ednst_id = i.ednst_id
                  JOIN user_class uc ON u.user_id = uc.user_id
-                 JOIN class c ON uc.scls_id = c.scls_id
-                 JOIN grade g ON c.sgrd_id = g.sgrd_id
         WHERE u.user_id = #{userId}
     </select>
 
Add a comment
List