guntaek
08-02
240802 김건택 단원 상세정보 기능 수정 및 지문 VO에 단원 아이디 책 아이디 추가
@df84bdfe2e0bfac228700f944e3d530ff98b5645
--- src/main/java/com/takensoft/ai_lms/lms/text/vo/TextVO.java
+++ src/main/java/com/takensoft/ai_lms/lms/text/vo/TextVO.java
... | ... | @@ -35,5 +35,9 @@ |
35 | 35 |
private String textTypeId; |
36 | 36 |
// 사용자 아이디(선생님) |
37 | 37 |
private String userId; |
38 |
+ // 책 아이디 |
|
39 |
+ private String bookId; |
|
40 |
+ // 단원 아이디 |
|
41 |
+ private String unitId; |
|
38 | 42 |
|
39 | 43 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/unit/dao/UnitDAO.java
+++ src/main/java/com/takensoft/ai_lms/lms/unit/dao/UnitDAO.java
... | ... | @@ -3,6 +3,7 @@ |
3 | 3 |
import com.takensoft.ai_lms.lms.unit.vo.UnitVO; |
4 | 4 |
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; |
5 | 5 |
|
6 |
+import java.util.HashMap; |
|
6 | 7 |
import java.util.List; |
7 | 8 |
|
8 | 9 |
/** |
... | ... | @@ -52,5 +53,5 @@ |
52 | 53 |
* |
53 | 54 |
* 단원 상세 정보 |
54 | 55 |
*/ |
55 |
- List<UnitVO> unitDetail(UnitVO unitVO) throws Exception; |
|
56 |
+ List<HashMap<String, Object>> unitDetail(UnitVO unitVO) throws Exception; |
|
56 | 57 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/unit/service/Impl/UnitServiceImpl.java
+++ src/main/java/com/takensoft/ai_lms/lms/unit/service/Impl/UnitServiceImpl.java
... | ... | @@ -81,7 +81,7 @@ |
81 | 81 |
* 단원 상세 정보 |
82 | 82 |
*/ |
83 | 83 |
@Override |
84 |
- public List<UnitVO> unitDetail(UnitVO unitVO) throws Exception { |
|
84 |
+ public List<HashMap<String, Object>> unitDetail(UnitVO unitVO) throws Exception { |
|
85 | 85 |
return unitDAO.unitDetail(unitVO); |
86 | 86 |
} |
87 | 87 |
|
--- src/main/java/com/takensoft/ai_lms/lms/unit/service/UnitService.java
+++ src/main/java/com/takensoft/ai_lms/lms/unit/service/UnitService.java
... | ... | @@ -51,6 +51,6 @@ |
51 | 51 |
* |
52 | 52 |
* 단원 상세 정보 |
53 | 53 |
*/ |
54 |
- List<UnitVO> unitDetail (UnitVO unitVO) throws Exception; |
|
54 |
+ List<HashMap<String, Object>> unitDetail (UnitVO unitVO) throws Exception; |
|
55 | 55 |
|
56 | 56 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/unit/web/UnitController.java
+++ src/main/java/com/takensoft/ai_lms/lms/unit/web/UnitController.java
... | ... | @@ -84,7 +84,7 @@ |
84 | 84 |
*/ |
85 | 85 |
@PostMapping(path = "/unitDetail.json") |
86 | 86 |
public ResponseEntity<?> unitDetail(@RequestBody UnitVO unitVO) throws Exception { |
87 |
- List<UnitVO> result = unitService.unitDetail(unitVO); |
|
87 |
+ List<HashMap<String, Object>> result = unitService.unitDetail(unitVO); |
|
88 | 88 |
return new ResponseEntity<>(result, HttpStatus.OK); |
89 | 89 |
} |
90 | 90 |
} |
--- src/main/resources/mybatis/mapper/lms/text-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/text-SQL.xml
... | ... | @@ -11,6 +11,8 @@ |
11 | 11 |
<result property="fileMngId" column="file_mng_id"/> |
12 | 12 |
<result property="textTypeId" column="text_type_id"/> |
13 | 13 |
<result property="userId" column="user_id"/> |
14 |
+ <result property="bookId" column="book_id"/> |
|
15 |
+ <result property="unitId" column="unit_id"/> |
|
14 | 16 |
</resultMap> |
15 | 17 |
|
16 | 18 |
|
... | ... | @@ -28,6 +30,8 @@ |
28 | 30 |
,file_mng_id |
29 | 31 |
,text_type_id |
30 | 32 |
,user_id |
33 |
+ ,book_id |
|
34 |
+ ,unit_id |
|
31 | 35 |
) VALUES (#{textId} |
32 | 36 |
,#{textTtl} |
33 | 37 |
,#{textCnt} |
... | ... | @@ -36,6 +40,8 @@ |
36 | 40 |
,#{fileMngId} |
37 | 41 |
,#{textTypeId} |
38 | 42 |
,#{userId} |
43 |
+ ,#{bookId} |
|
44 |
+ ,#{unitId} |
|
39 | 45 |
); |
40 | 46 |
</insert> |
41 | 47 |
|
... | ... | @@ -63,6 +69,8 @@ |
63 | 69 |
,file_mng_id |
64 | 70 |
,text_type_id |
65 | 71 |
,user_id |
72 |
+ ,book_id |
|
73 |
+ ,unit_id |
|
66 | 74 |
FROM text |
67 | 75 |
ORDER BY text_id DESC |
68 | 76 |
LIMIT #{pageSize} |
... | ... | @@ -83,6 +91,8 @@ |
83 | 91 |
, file_mng_id |
84 | 92 |
, text_type_id |
85 | 93 |
,user_id |
94 |
+ ,book_id |
|
95 |
+ ,unit_id |
|
86 | 96 |
FROM text |
87 | 97 |
WHERE text_id = #{textId} |
88 | 98 |
ORDER BY text_id DESC |
--- src/main/resources/mybatis/mapper/lms/unit-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/unit-SQL.xml
... | ... | @@ -64,15 +64,26 @@ |
64 | 64 |
|
65 | 65 |
<!-- |
66 | 66 |
작 성 자 : 김건택 |
67 |
- 작 성 일 : 2024.07.25 |
|
67 |
+ 작 성 일 : 2024.08.02 |
|
68 | 68 |
내 용 : 단원 상세 정보 |
69 | 69 |
--> |
70 |
- <select id="unitDetail" parameterType="UnitVO" resultType="com.takensoft.ai_lms.lms.unit.vo.UnitVO"> |
|
71 |
- SELECT unit_id |
|
72 |
- , book_id |
|
73 |
- , unit_nm |
|
74 |
- FROM unit |
|
75 |
- WHERE unit_id = #{unitId} |
|
70 |
+<!-- <select id="unitDetail" parameterType="UnitVO" resultType="com.takensoft.ai_lms.lms.unit.vo.UnitVO">--> |
|
71 |
+<!-- SELECT unit_id--> |
|
72 |
+<!-- , book_id--> |
|
73 |
+<!-- , unit_nm--> |
|
74 |
+<!-- FROM unit--> |
|
75 |
+<!-- WHERE unit_id = #{unitId}--> |
|
76 |
+<!-- </select>--> |
|
77 |
+ |
|
78 |
+ <select id="unitDetail" parameterType="UnitVO" resultType="HashMap"> |
|
79 |
+ SELECT t.text_id |
|
80 |
+ , u.unit_id |
|
81 |
+ , u.book_id |
|
82 |
+ , w.wd_book_id |
|
83 |
+ FROM unit u |
|
84 |
+ JOIN text t ON u.unit_id = t.unit_id |
|
85 |
+ JOIN wordbook w ON u.book_id = w.book_id |
|
86 |
+ WHERE u.book_id = #{bookId} AND u.unit_id = #{unitId}; |
|
76 | 87 |
</select> |
77 | 88 |
|
78 | 89 |
</mapper>(파일 끝에 줄바꿈 문자 없음) |
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?