

240726 권민수 학생 정보 조회 api에 푼문제수 조회 기능 추가
@af08b67039a7ce6861f5ae47fc20acbfe7dd7784
--- src/main/java/com/takensoft/ai_lms/lms/student/vo/StudentInfoVO.java
+++ src/main/java/com/takensoft/ai_lms/lms/student/vo/StudentInfoVO.java
... | ... | @@ -12,8 +12,8 @@ |
12 | 12 |
* 학생 불러오는 정보 VO 클래스 |
13 | 13 |
*/ |
14 | 14 |
|
15 |
-@Setter |
|
16 | 15 |
@Getter |
16 |
+@Setter |
|
17 | 17 |
public class StudentInfoVO { |
18 | 18 |
|
19 | 19 |
private String studentName; |
... | ... | @@ -21,6 +21,7 @@ |
21 | 21 |
private int grade; |
22 | 22 |
private String className; |
23 | 23 |
private String studentQuestion; |
24 |
+ private int totalProblemsSolved; |
|
24 | 25 |
private List<HistoryVO> history; |
25 | 26 |
|
26 | 27 |
} |
--- src/main/resources/mybatis/mapper/lms/student-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/student-SQL.xml
... | ... | @@ -13,6 +13,7 @@ |
13 | 13 |
<result property="institutionName" column="institutionName"/> |
14 | 14 |
<result property="grade" column="grade"/> |
15 | 15 |
<result property="className" column="className"/> |
16 |
+ <result property="totalProblemsSolved" column="totalProblemsSolved"/> |
|
16 | 17 |
<result property="studentQuestion" column="studentQuestion"/> |
17 | 18 |
<collection property="history" ofType="com.takensoft.ai_lms.lms.student.vo.HistoryVO"> |
18 | 19 |
<result property="bookName" column="bookName"/> |
... | ... | @@ -29,6 +30,7 @@ |
29 | 30 |
i.ednst_nm AS institutionName, |
30 | 31 |
ui.grd_no AS grade, |
31 | 32 |
ui.scls_nm AS className, |
33 |
+ (SELECT COUNT(*) FROM problem_log pl WHERE pl.std_id = u.user_id) AS totalProblemsSolved, |
|
32 | 34 |
uc.stn_qna AS studentQuestion, |
33 | 35 |
hu.book_id AS bookId, |
34 | 36 |
hu.book_nm AS bookName, |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?