guntaek
07-31
Merge remote-tracking branch 'origin/master'
# Conflicts: # src/main/java/com/takensoft/ai_lms/common/confing/SecurityConfig.java
@5cfc75742b2145ebbfc2b8c985bdfec91adb0ebd
--- src/main/java/com/takensoft/ai_lms/common/confing/SecurityConfig.java
+++ src/main/java/com/takensoft/ai_lms/common/confing/SecurityConfig.java
... | ... | @@ -74,6 +74,14 @@ |
74 | 74 |
.requestMatchers("/photo/**").permitAll() // 사진 정보 진입 허용 |
75 | 75 |
.requestMatchers("/photoMng/**").permitAll() // 사진첩 정보 진입 허용 |
76 | 76 |
.requestMatchers("/wordbook/**").permitAll() |
77 |
+ .requestMatchers("/problem/**").permitAll() // 문제 정보 진입 허용 |
|
78 |
+ .requestMatchers("/evaluation/**").permitAll() // 단원 평가 정보 진입 허용 |
|
79 |
+ .requestMatchers("/evalProblem/**").permitAll() // 단원 평가 문제 진입 허용 |
|
80 |
+ .requestMatchers("/unitLearning/**").permitAll() // 로드맵 정보 진입 허용 |
|
81 |
+ .requestMatchers("/unit/**").permitAll() |
|
82 |
+ .requestMatchers("/photo/**").permitAll() |
|
83 |
+ .requestMatchers("/wordbook/**").permitAll() // 단어장 정보 진입 허용 |
|
84 |
+ .requestMatchers("/word/**").permitAll() // 단어 정보 진입 허용 |
|
77 | 85 |
.requestMatchers("/survey/**").permitAll() |
78 | 86 |
.anyRequest().authenticated()); // 나머지 경로는 인증 필요 |
79 | 87 |
|
--- src/main/java/com/takensoft/ai_lms/common/idgen/context/ContextIdgen.java
+++ src/main/java/com/takensoft/ai_lms/common/idgen/context/ContextIdgen.java
... | ... | @@ -228,5 +228,16 @@ |
228 | 228 |
return idgenServiceImpl; |
229 | 229 |
} |
230 | 230 |
|
231 |
+ // 설문 조사 상세 정보 |
|
232 |
+ @Bean(name = "surveyDetailIdgn") |
|
233 |
+ public IdgenService surveyDetail() { |
|
234 |
+ IdgenService idgenServiceImpl = new IdgenService(); |
|
235 |
+ idgenServiceImpl.setCipers(15); |
|
236 |
+ idgenServiceImpl.setFillChar('0'); |
|
237 |
+ idgenServiceImpl.setPrefix("SURVEY_DETAIL_"); |
|
238 |
+ idgenServiceImpl.setTblNm("SURVEY_DETAIL_ID"); |
|
239 |
+ return idgenServiceImpl; |
|
240 |
+ } |
|
241 |
+ |
|
231 | 242 |
|
232 | 243 |
}(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/java/com/takensoft/ai_lms/lms/board/vo/BoardClassVO.java
... | ... | @@ -0,0 +1,34 @@ |
1 | +package com.takensoft.ai_lms.lms.board.vo; | |
2 | + | |
3 | + | |
4 | +import lombok.AllArgsConstructor; | |
5 | +import lombok.Getter; | |
6 | +import lombok.NoArgsConstructor; | |
7 | +import lombok.Setter; | |
8 | + | |
9 | +import java.util.List; | |
10 | + | |
11 | +/** | |
12 | + * @author : 박세훈 | |
13 | + * since : 2024.07.25 | |
14 | + * | |
15 | + * 게시판 class 관련 VO | |
16 | + */ | |
17 | + | |
18 | + | |
19 | + | |
20 | +@Getter | |
21 | +@Setter | |
22 | +@AllArgsConstructor | |
23 | +@NoArgsConstructor | |
24 | +public class BoardClassVO { | |
25 | + | |
26 | + // 반 아이디 | |
27 | + private String sclsId; | |
28 | + | |
29 | + //반 이름 | |
30 | + private String sclsNm; | |
31 | + | |
32 | + // 게시판 테이블과 연결 | |
33 | + private List<BoardVO> board; | |
34 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/board/vo/BoardUserVO.java
... | ... | @@ -0,0 +1,34 @@ |
1 | +package com.takensoft.ai_lms.lms.board.vo; | |
2 | + | |
3 | + | |
4 | +import lombok.AllArgsConstructor; | |
5 | +import lombok.Getter; | |
6 | +import lombok.NoArgsConstructor; | |
7 | +import lombok.Setter; | |
8 | + | |
9 | +import java.util.List; | |
10 | + | |
11 | +/** | |
12 | + * @author : 박세훈 | |
13 | + * since : 2024.07.25 | |
14 | + * | |
15 | + * 게시판 user 관련 VO | |
16 | + */ | |
17 | + | |
18 | + | |
19 | + | |
20 | +@Getter | |
21 | +@Setter | |
22 | +@AllArgsConstructor | |
23 | +@NoArgsConstructor | |
24 | +public class BoardUserVO { | |
25 | + | |
26 | + // 사용자 아이디 | |
27 | + private String userId; | |
28 | + | |
29 | + // 사용자 이름 | |
30 | + private String userNm; | |
31 | + | |
32 | + // 반 테이블과 연결 | |
33 | + private List<BoardClassVO> boardClass; | |
34 | +} |
--- src/main/java/com/takensoft/ai_lms/lms/board/vo/BoardVO.java
+++ src/main/java/com/takensoft/ai_lms/lms/board/vo/BoardVO.java
... | ... | @@ -32,15 +32,15 @@ |
32 | 32 |
// 게시판 아이디 |
33 | 33 |
private String bbsId; |
34 | 34 |
// 게시판 제목 |
35 |
- private String bbsTitle; |
|
35 |
+ private String bbsTtl; |
|
36 | 36 |
// 게시판 카테고리 |
37 |
- private String bbsCategory; |
|
37 |
+ private String bbsCls; |
|
38 | 38 |
// 게시판 내용 |
39 |
- private String bbsContents; |
|
39 |
+ private String bbsCnt; |
|
40 | 40 |
// 게시판 등록 날짜 |
41 |
- private String bbsTime; |
|
41 |
+ private String bbsTm; |
|
42 | 42 |
// 파일 관리 아이디 |
43 |
- private String fileManageId; |
|
43 |
+ private String fileMngId; |
|
44 | 44 |
// 반 아이디 |
45 | 45 |
private String sclsId; |
46 | 46 |
|
--- src/main/java/com/takensoft/ai_lms/lms/board/web/BoardController.java
+++ src/main/java/com/takensoft/ai_lms/lms/board/web/BoardController.java
... | ... | @@ -59,15 +59,9 @@ |
59 | 59 |
public ResponseEntity<?> findAllBoard(@RequestBody HashMap<String, Object> params) throws Exception { |
60 | 60 |
HashMap<String, Object> result = new HashMap<>(); |
61 | 61 |
|
62 |
- // 페이지 번호와 페이지 크기를 파라미터로 전달 |
|
63 |
- int page = Integer.parseInt(params.get("page").toString()); |
|
64 |
- int pageSize = Integer.parseInt(params.get("pageSize").toString()); |
|
65 |
- |
|
66 |
- |
|
67 | 62 |
// 전체 게시물 수 조회 및 추가 |
68 |
- int totalBoard = boardService.boardCount(params); |
|
69 |
- result.put("totalBoard", totalBoard); |
|
70 |
- result.put("list", boardService.findAllBoard(params)); |
|
63 |
+ result.put("totalBoard", boardService.boardCount(params)); |
|
64 |
+ result.put("result", boardService.findAllBoard(params)); |
|
71 | 65 |
|
72 | 66 |
|
73 | 67 |
return new ResponseEntity<>(result, HttpStatus.OK); |
... | ... | @@ -84,7 +78,7 @@ |
84 | 78 |
public ResponseEntity<?> findByBoardId(@RequestBody HashMap<String, Object> params) throws Exception { |
85 | 79 |
HashMap<String, Object> result = new HashMap<>(); |
86 | 80 |
|
87 |
- result.put("list", boardService.findByBoardId(params)); |
|
81 |
+ result.put("result", boardService.findByBoardId(params)); |
|
88 | 82 |
return new ResponseEntity<>(result, HttpStatus.OK); |
89 | 83 |
} |
90 | 84 |
/** |
... | ... | @@ -93,7 +87,7 @@ |
93 | 87 |
* |
94 | 88 |
* 게시글 수정 |
95 | 89 |
*/ |
96 |
- @PutMapping("/update.json") |
|
90 |
+ @PostMapping("/update.json") |
|
97 | 91 |
public String updateBoard(@RequestBody BoardVO boardVO) throws Exception { |
98 | 92 |
try { |
99 | 93 |
int result = boardService.updateBoard(boardVO); |
... | ... | @@ -113,7 +107,7 @@ |
113 | 107 |
* |
114 | 108 |
* 게시글 삭제 |
115 | 109 |
*/ |
116 |
- @DeleteMapping("/delete.json") |
|
110 |
+ @PostMapping("/delete.json") |
|
117 | 111 |
public String deleteBoard(@RequestBody Map<String, String> request) throws Exception { |
118 | 112 |
try{ |
119 | 113 |
String bbsId = request.get("bbsId"); |
... | ... | @@ -141,7 +135,7 @@ |
141 | 135 |
HashMap<String, Object> result = new HashMap<>(); |
142 | 136 |
|
143 | 137 |
List<HashMap<String, Object>> boardList = boardService.searchBoard(params); |
144 |
- result.put("list", boardList); |
|
138 |
+ result.put("result", boardList); |
|
145 | 139 |
return new ResponseEntity<>(result, HttpStatus.OK); |
146 | 140 |
} |
147 | 141 |
|
--- src/main/java/com/takensoft/ai_lms/lms/book/vo/BookVO.java
+++ src/main/java/com/takensoft/ai_lms/lms/book/vo/BookVO.java
... | ... | @@ -16,6 +16,7 @@ |
16 | 16 |
@NoArgsConstructor |
17 | 17 |
@AllArgsConstructor |
18 | 18 |
public class BookVO { |
19 |
+ |
|
19 | 20 |
// 교재 아이디 |
20 | 21 |
private String book_id; |
21 | 22 |
// 교재 제목 |
--- src/main/java/com/takensoft/ai_lms/lms/book/web/BookController.java
+++ src/main/java/com/takensoft/ai_lms/lms/book/web/BookController.java
... | ... | @@ -21,57 +21,58 @@ |
21 | 21 |
private final BookServiceImpl bookServiceImpl; |
22 | 22 |
|
23 | 23 |
/** |
24 |
- * @author : 구자현 |
|
25 |
- * @since : 2024.07.25 |
|
24 |
+ * @author : 구자현 |
|
25 |
+ * @since : 2024.07.25 |
|
26 | 26 |
* |
27 | 27 |
* 전체 교재 목록 출력 |
28 | 28 |
*/ |
29 |
- @GetMapping |
|
29 |
+ @GetMapping("/findAll.json") |
|
30 | 30 |
public List<BookVO> getAllBooks() { |
31 | 31 |
return bookServiceImpl.getAllBooks(); |
32 | 32 |
} |
33 | 33 |
|
34 | 34 |
/** |
35 |
- * @author : 구자현 |
|
36 |
- * @since : 2024.07.25 |
|
35 |
+ * @author : 구자현 |
|
36 |
+ * @since : 2024.07.25 |
|
37 | 37 |
* |
38 | 38 |
* 책의 상세 정보 |
39 | 39 |
*/ |
40 |
- @GetMapping("/{book_id}") |
|
41 |
- public BookVO getBookById(@PathVariable String book_id) { |
|
42 |
- return bookServiceImpl.getBookById(book_id); |
|
40 |
+ @GetMapping("/find.json") |
|
41 |
+ public BookVO getBookById(@RequestBody BookVO bookVO) { |
|
42 |
+ return bookServiceImpl.getBookById(bookVO.getBook_id()); |
|
43 | 43 |
} |
44 | 44 |
|
45 | 45 |
/** |
46 |
- * @author : 구자현 |
|
47 |
- * @since : 2024.07.25 |
|
46 |
+ * @author : 구자현 |
|
47 |
+ * @since : 2024.07.25 |
|
48 | 48 |
* |
49 | 49 |
* 교재 등록 |
50 | 50 |
*/ |
51 |
- @PostMapping |
|
51 |
+ @PostMapping("/insert.json") |
|
52 | 52 |
public void insertBook(@RequestBody BookVO book) { |
53 | 53 |
bookServiceImpl.insertBook(book); |
54 | 54 |
} |
55 | 55 |
|
56 | 56 |
/** |
57 |
- * @author : 구자현 |
|
58 |
- * @since : 2024.07.25 |
|
57 |
+ * @author : 구자현 |
|
58 |
+ * @since : 2024.07.25 |
|
59 | 59 |
* |
60 | 60 |
* 교재 제목 수정 |
61 | 61 |
*/ |
62 |
- @PutMapping |
|
62 |
+ @PutMapping("/update.json") |
|
63 | 63 |
public void updateBook(@RequestBody BookVO book) { |
64 | 64 |
bookServiceImpl.updateBook(book); |
65 | 65 |
} |
66 | 66 |
|
67 | 67 |
/** |
68 |
- * @author : 구자현 |
|
69 |
- * @since : 2024.07.25 |
|
68 |
+ * @author : 구자현 |
|
69 |
+ * @since : 2024.07.25 |
|
70 | 70 |
* |
71 | 71 |
* 교재 삭제 |
72 | 72 |
*/ |
73 |
- @DeleteMapping("/{book_id}") |
|
74 |
- public void deleteBook(@PathVariable String book_id) { |
|
75 |
- bookServiceImpl.deleteBook(book_id); |
|
73 |
+ @DeleteMapping("/delete.json") |
|
74 |
+ public void deleteBook(@RequestBody BookVO bookVO) { |
|
75 |
+ bookServiceImpl.deleteBook(bookVO.getBook_id()); |
|
76 | 76 |
} |
77 |
+ |
|
77 | 78 |
}(파일 끝에 줄바꿈 문자 없음) |
--- src/main/java/com/takensoft/ai_lms/lms/class_book/dao/ClassBookDAO.java
+++ src/main/java/com/takensoft/ai_lms/lms/class_book/dao/ClassBookDAO.java
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
public interface ClassBookDAO { |
19 | 19 |
|
20 | 20 |
// 교재 등록 |
21 |
- int registerBook(ClassBookVO classBookVO) throws Exception; |
|
21 |
+ void registerBook(List<ClassBookVO> classBookVO) throws Exception; |
|
22 | 22 |
|
23 | 23 |
// 교재 삭제 |
24 | 24 |
int deleteClassBook(ClassBookVO classBookVO) throws Exception; |
--- src/main/java/com/takensoft/ai_lms/lms/class_book/service/ClassBookService.java
+++ src/main/java/com/takensoft/ai_lms/lms/class_book/service/ClassBookService.java
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 |
public interface ClassBookService { |
17 | 17 |
|
18 | 18 |
// 교재 등록 |
19 |
- int registerBook(ClassBookVO classBookVO) throws Exception; |
|
19 |
+ void registerBook(List<ClassBookVO> classBookVO) throws Exception; |
|
20 | 20 |
|
21 | 21 |
// 교재 삭제 |
22 | 22 |
int deleteClassBook(ClassBookVO classBookVO) throws Exception; |
--- src/main/java/com/takensoft/ai_lms/lms/class_book/service/Impl/ClassBookServiceImpl.java
+++ src/main/java/com/takensoft/ai_lms/lms/class_book/service/Impl/ClassBookServiceImpl.java
... | ... | @@ -26,8 +26,8 @@ |
26 | 26 |
|
27 | 27 |
// 교재 등록 |
28 | 28 |
@Override |
29 |
- public int registerBook(ClassBookVO classBookVO) throws Exception { |
|
30 |
- return classBookDAO.registerBook(classBookVO); |
|
29 |
+ public void registerBook(List<ClassBookVO> classBookVO) throws Exception { |
|
30 |
+ classBookDAO.registerBook(classBookVO); |
|
31 | 31 |
} |
32 | 32 |
|
33 | 33 |
// 교재 삭제 |
--- src/main/java/com/takensoft/ai_lms/lms/class_book/web/ClassBookController.java
+++ src/main/java/com/takensoft/ai_lms/lms/class_book/web/ClassBookController.java
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 |
import org.springframework.web.bind.annotation.*; |
9 | 9 |
|
10 | 10 |
import java.util.HashMap; |
11 |
+import java.util.List; |
|
11 | 12 |
|
12 | 13 |
@RestController |
13 | 14 |
@RequiredArgsConstructor |
... | ... | @@ -26,18 +27,9 @@ |
26 | 27 |
* 반 교재 등록 |
27 | 28 |
*/ |
28 | 29 |
@PostMapping("/register.json") |
29 |
- public String registerBook(@RequestBody ClassBookVO classBookVO) throws Exception { |
|
30 |
- try { |
|
31 |
- int result = classBookService.registerBook(classBookVO); |
|
32 |
- if (result > 0) { |
|
33 |
- return "success"; |
|
34 |
- } else { |
|
35 |
- return "fail"; |
|
36 |
- } |
|
37 |
- } catch (Exception e) { |
|
38 |
- e.printStackTrace(); |
|
39 |
- return "Error"; |
|
40 |
- } |
|
30 |
+ public ResponseEntity<Void> registerBook(@RequestBody List<ClassBookVO> classBookVO) throws Exception { |
|
31 |
+ classBookService.registerBook(classBookVO); |
|
32 |
+ return new ResponseEntity<>(HttpStatus.OK); |
|
41 | 33 |
} |
42 | 34 |
|
43 | 35 |
|
... | ... | @@ -54,7 +46,7 @@ |
54 | 46 |
public ResponseEntity<?> findByBookId(@RequestBody HashMap<String, Object> params) throws Exception { |
55 | 47 |
HashMap<String, Object> result = new HashMap<>(); |
56 | 48 |
|
57 |
- result.put("list", classBookService.findByBookId(params)); |
|
49 |
+ result.put("result", classBookService.findByBookId(params)); |
|
58 | 50 |
|
59 | 51 |
return new ResponseEntity<>(result, HttpStatus.OK); |
60 | 52 |
} |
... | ... | @@ -66,14 +58,13 @@ |
66 | 58 |
* param ClassBookDAO |
67 | 59 |
* @return |
68 | 60 |
* @throws Exception |
69 |
- * |
|
61 |
+ |
|
70 | 62 |
* 반 교재 삭제 |
71 | 63 |
*/ |
72 |
- @DeleteMapping("/delete.json") |
|
64 |
+ @PostMapping("/delete.json") |
|
73 | 65 |
public String deleteClassBook(@RequestBody ClassBookVO classBookVO) throws Exception { |
74 | 66 |
try { |
75 | 67 |
int result = classBookService.deleteClassBook(classBookVO); |
76 |
- System.out.println("result = " + result); |
|
77 | 68 |
if (result > 0) { |
78 | 69 |
return "success"; |
79 | 70 |
} else { |
--- src/main/java/com/takensoft/ai_lms/lms/classes/web/ClassController.java
+++ src/main/java/com/takensoft/ai_lms/lms/classes/web/ClassController.java
... | ... | @@ -149,7 +149,7 @@ |
149 | 149 |
* |
150 | 150 |
* 반 삭제 |
151 | 151 |
*/ |
152 |
- @DeleteMapping("/deleteClass.json") |
|
152 |
+ @PostMapping("/deleteClass.json") |
|
153 | 153 |
@Operation(summary = "반 삭제") |
154 | 154 |
public String deleteClass(@RequestBody Map<String, Object> params) throws Exception{ |
155 | 155 |
Gson gson = new Gson(); |
+++ src/main/java/com/takensoft/ai_lms/lms/eval_problem/dao/EvalProblemDAO.java
... | ... | @@ -0,0 +1,32 @@ |
1 | +package com.takensoft.ai_lms.lms.eval_problem.dao; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.eval_problem.vo.EvalProblemVO; | |
4 | +import com.takensoft.ai_lms.lms.evaluation.vo.EvaluationVO; | |
5 | +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
6 | + | |
7 | +/** | |
8 | + * @author 권지수 | |
9 | + * @since 2024.07.29 | |
10 | + * | |
11 | + * 단원 평가 문제 DAO 클래스 | |
12 | + */ | |
13 | + | |
14 | +@Mapper("evalProblemDAO") | |
15 | +public interface EvalProblemDAO { | |
16 | + | |
17 | + /** | |
18 | + * @author 권지수 | |
19 | + * @since 2024.07.29 | |
20 | + * | |
21 | + * 단원 평가 문제 정보 입력 | |
22 | + */ | |
23 | + int insertEvalProblem(EvalProblemVO evalProblemVO) throws Exception; | |
24 | + | |
25 | + /** | |
26 | + * @author 권지수 | |
27 | + * @since 2024.07.30 | |
28 | + * | |
29 | + * 특정 단원의 문제 수 조회 | |
30 | + */ | |
31 | + int unitProblemNum(EvalProblemVO evalProblemVO) throws Exception; | |
32 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/eval_problem/service/EvalProblemService.java
... | ... | @@ -0,0 +1,28 @@ |
1 | +package com.takensoft.ai_lms.lms.eval_problem.service; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.eval_problem.vo.EvalProblemVO; | |
4 | + | |
5 | +/** | |
6 | + * @author 권지수 | |
7 | + * @since 2024.07.29 | |
8 | + * | |
9 | + * 단원 평가 문제 Service 클래스 | |
10 | + */ | |
11 | +public interface EvalProblemService { | |
12 | + | |
13 | + /** | |
14 | + * @author 권지수 | |
15 | + * @since 2024.07.29 | |
16 | + * | |
17 | + * 단원 평가 문제 정보 입력 | |
18 | + */ | |
19 | + int insertEvalProblem(EvalProblemVO evalProblemVO) throws Exception; | |
20 | + | |
21 | + /** | |
22 | + * @author 권지수 | |
23 | + * @since 2024.07.30 | |
24 | + * | |
25 | + * 특정 단원의 문제 수 조회 | |
26 | + */ | |
27 | + int unitProblemNum(EvalProblemVO evalProblemVO) throws Exception; | |
28 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/eval_problem/service/Impl/EvalProblemImpl.java
... | ... | @@ -0,0 +1,42 @@ |
1 | +package com.takensoft.ai_lms.lms.eval_problem.service.Impl; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.eval_problem.dao.EvalProblemDAO; | |
4 | +import com.takensoft.ai_lms.lms.eval_problem.service.EvalProblemService; | |
5 | +import com.takensoft.ai_lms.lms.eval_problem.vo.EvalProblemVO; | |
6 | +import lombok.RequiredArgsConstructor; | |
7 | +import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
8 | +import org.springframework.stereotype.Service; | |
9 | + | |
10 | +/** | |
11 | + * @author 권지수 | |
12 | + * @since 2024.07.29 | |
13 | + * | |
14 | + * 단원 평가 문제 ServiceImpl 클래스 | |
15 | + */ | |
16 | + | |
17 | +@Service("evalProblemService") | |
18 | +@RequiredArgsConstructor | |
19 | +public class EvalProblemImpl extends EgovAbstractServiceImpl implements EvalProblemService { | |
20 | + | |
21 | + private final EvalProblemDAO evalProblemDAO; | |
22 | + | |
23 | + /** | |
24 | + * @author 권지수 | |
25 | + * @since 2024.07.29 | |
26 | + * | |
27 | + * 단원 평가 문제 정보 입력 | |
28 | + */ | |
29 | + public int insertEvalProblem(EvalProblemVO evalProblemVO) throws Exception { | |
30 | + return evalProblemDAO.insertEvalProblem(evalProblemVO); | |
31 | + } | |
32 | + | |
33 | + /** | |
34 | + * @author 권지수 | |
35 | + * @since 2024.07.30 | |
36 | + * | |
37 | + * 특정 단원의 문제 수 조회 | |
38 | + */ | |
39 | + public int unitProblemNum(EvalProblemVO evalProblemVO) throws Exception { | |
40 | + return evalProblemDAO.unitProblemNum(evalProblemVO); | |
41 | + } | |
42 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/eval_problem/vo/EvalProblemVO.java
... | ... | @@ -0,0 +1,17 @@ |
1 | +package com.takensoft.ai_lms.lms.eval_problem.vo; | |
2 | + | |
3 | +import lombok.AllArgsConstructor; | |
4 | +import lombok.Getter; | |
5 | +import lombok.NoArgsConstructor; | |
6 | +import lombok.Setter; | |
7 | + | |
8 | +@Getter | |
9 | +@Setter | |
10 | +@AllArgsConstructor | |
11 | +@NoArgsConstructor | |
12 | +public class EvalProblemVO { | |
13 | + // 단원 평가 아이디 | |
14 | + private String evalId; | |
15 | + // 문제 아이디 | |
16 | + private String prblmId; | |
17 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/eval_problem/web/EvalProblemController.java
... | ... | @@ -0,0 +1,55 @@ |
1 | +package com.takensoft.ai_lms.lms.eval_problem.web; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.eval_problem.service.EvalProblemService; | |
4 | +import com.takensoft.ai_lms.lms.eval_problem.vo.EvalProblemVO; | |
5 | +import com.takensoft.ai_lms.lms.evaluation.vo.EvaluationVO; | |
6 | +import lombok.RequiredArgsConstructor; | |
7 | +import lombok.extern.slf4j.Slf4j; | |
8 | +import org.springframework.http.HttpStatus; | |
9 | +import org.springframework.http.ResponseEntity; | |
10 | +import org.springframework.web.bind.annotation.PostMapping; | |
11 | +import org.springframework.web.bind.annotation.RequestBody; | |
12 | +import org.springframework.web.bind.annotation.RequestMapping; | |
13 | +import org.springframework.web.bind.annotation.RestController; | |
14 | + | |
15 | +/** | |
16 | + * @author 권지수 | |
17 | + * @since 2024.07.29 | |
18 | + * | |
19 | + * 단원 평가 Controller 클래스 | |
20 | + */ | |
21 | + | |
22 | +@RestController | |
23 | +@RequiredArgsConstructor | |
24 | +@Slf4j | |
25 | +@RequestMapping(value = "/evalProblem") | |
26 | +public class EvalProblemController { | |
27 | + | |
28 | + private final EvalProblemService evalProblemService; | |
29 | + | |
30 | + /** | |
31 | + * @author 권지수 | |
32 | + * @since 2024.07.29 | |
33 | + * | |
34 | + * 단원 평가 문제 입력 | |
35 | + */ | |
36 | + @PostMapping(path = "/insertEvalProblem.json") | |
37 | + public ResponseEntity<?> insertEvalProblem(@RequestBody EvalProblemVO evalProblemVO) throws Exception { | |
38 | + int result = evalProblemService.insertEvalProblem(evalProblemVO); | |
39 | + | |
40 | + return new ResponseEntity<>(result, HttpStatus.OK); | |
41 | + } | |
42 | + | |
43 | + /** | |
44 | + * @author 권지수 | |
45 | + * @since 2024.07.30 | |
46 | + * | |
47 | + * 특정 단원의 문제 수 조회 | |
48 | + */ | |
49 | + @PostMapping(path = "/unitProblemNum.json") | |
50 | + public ResponseEntity<?> unitProblemNum(@RequestBody EvalProblemVO evalProblemVO) throws Exception { | |
51 | + int result = evalProblemService.unitProblemNum(evalProblemVO); | |
52 | + | |
53 | + return new ResponseEntity<>(result, HttpStatus.OK); | |
54 | + } | |
55 | +} |
--- src/main/java/com/takensoft/ai_lms/lms/evaluation/dao/EvaluationDAO.java
+++ src/main/java/com/takensoft/ai_lms/lms/evaluation/dao/EvaluationDAO.java
... | ... | @@ -1,4 +1,59 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.evaluation.dao; |
2 | 2 |
|
3 |
+import com.takensoft.ai_lms.lms.evaluation.vo.EvaluationVO; |
|
4 |
+import com.takensoft.ai_lms.lms.problem.vo.SearchVO; |
|
5 |
+import org.egovframe.rte.psl.dataaccess.mapper.Mapper; |
|
6 |
+ |
|
7 |
+import java.util.List; |
|
8 |
+ |
|
9 |
+/** |
|
10 |
+ * @author 권지수 |
|
11 |
+ * @since 2024.07.29 |
|
12 |
+ * |
|
13 |
+ * 단원 평가 DAO 클래스 |
|
14 |
+ */ |
|
15 |
+ |
|
16 |
+@Mapper("evaluationDAO") |
|
3 | 17 |
public interface EvaluationDAO { |
18 |
+ |
|
19 |
+ /** |
|
20 |
+ * @author 권지수 |
|
21 |
+ * @since 2024.07.29 |
|
22 |
+ * |
|
23 |
+ * 단원 평가 정보 입력 |
|
24 |
+ */ |
|
25 |
+ int insertEvaluation(EvaluationVO evaluationVO) throws Exception; |
|
26 |
+ |
|
27 |
+ /** |
|
28 |
+ * @author 권지수 |
|
29 |
+ * @since 2024.07.29 |
|
30 |
+ * |
|
31 |
+ * 단원 평가 정보 조회 |
|
32 |
+ */ |
|
33 |
+ EvaluationVO evaluationInfo(EvaluationVO evaluationVO) throws Exception; |
|
34 |
+ |
|
35 |
+ /** |
|
36 |
+ * @author 권지수 |
|
37 |
+ * @since 2024.07.29 |
|
38 |
+ * |
|
39 |
+ * 특정 단원 평가 정보 조회 |
|
40 |
+ */ |
|
41 |
+ List<EvaluationVO> evaluationUnitList(SearchVO searchVO) throws Exception; |
|
42 |
+ |
|
43 |
+ /** |
|
44 |
+ * @author 권지수 |
|
45 |
+ * @since 2024.07.29 |
|
46 |
+ * |
|
47 |
+ * 단원 평가 정보 수정 |
|
48 |
+ */ |
|
49 |
+ int updateEvaluation(EvaluationVO evaluationVO) throws Exception; |
|
50 |
+ |
|
51 |
+ /** |
|
52 |
+ * @author 권지수 |
|
53 |
+ * @since 2024.07.29 |
|
54 |
+ * |
|
55 |
+ * 단원 평가 정보 삭제 |
|
56 |
+ */ |
|
57 |
+ int deleteEvaluation(EvaluationVO evaluationVO) throws Exception; |
|
58 |
+ |
|
4 | 59 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/evaluation/service/EvaluationService.java
+++ src/main/java/com/takensoft/ai_lms/lms/evaluation/service/EvaluationService.java
... | ... | @@ -1,4 +1,58 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.evaluation.service; |
2 | 2 |
|
3 |
+import com.takensoft.ai_lms.lms.evaluation.vo.EvaluationVO; |
|
4 |
+import com.takensoft.ai_lms.lms.problem.vo.SearchVO; |
|
5 |
+import org.egovframe.rte.psl.dataaccess.mapper.Mapper; |
|
6 |
+ |
|
7 |
+import java.util.List; |
|
8 |
+ |
|
9 |
+/** |
|
10 |
+ * @author 권지수 |
|
11 |
+ * @since 2024.07.29 |
|
12 |
+ * |
|
13 |
+ * 단원 평가 Service 클래스 |
|
14 |
+ */ |
|
15 |
+ |
|
3 | 16 |
public interface EvaluationService { |
17 |
+ |
|
18 |
+ /** |
|
19 |
+ * @author 권지수 |
|
20 |
+ * @since 2024.07.29 |
|
21 |
+ * |
|
22 |
+ * 단원 평가 정보 입력 |
|
23 |
+ */ |
|
24 |
+ int insertEvaluation(EvaluationVO evaluationVO) throws Exception; |
|
25 |
+ |
|
26 |
+ /** |
|
27 |
+ * @author 권지수 |
|
28 |
+ * @since 2024.07.29 |
|
29 |
+ * |
|
30 |
+ * 단원 평가 정보 조회 |
|
31 |
+ */ |
|
32 |
+ EvaluationVO evaluationInfo(EvaluationVO evaluationVO) throws Exception; |
|
33 |
+ |
|
34 |
+ /** |
|
35 |
+ * @author 권지수 |
|
36 |
+ * @since 2024.07.29 |
|
37 |
+ * |
|
38 |
+ * 특정 단원 평가 정보 조회 |
|
39 |
+ */ |
|
40 |
+ List<EvaluationVO> evaluationUnitList(SearchVO searchVO) throws Exception; |
|
41 |
+ |
|
42 |
+ /** |
|
43 |
+ * @author 권지수 |
|
44 |
+ * @since 2024.07.29 |
|
45 |
+ * |
|
46 |
+ * 단원 평가 정보 수정 |
|
47 |
+ */ |
|
48 |
+ int updateEvaluation(EvaluationVO evaluationVO) throws Exception; |
|
49 |
+ |
|
50 |
+ /** |
|
51 |
+ * @author 권지수 |
|
52 |
+ * @since 2024.07.29 |
|
53 |
+ * |
|
54 |
+ * 단원 평가 정보 삭제 |
|
55 |
+ */ |
|
56 |
+ int deleteEvaluation(EvaluationVO evaluationVO) throws Exception; |
|
57 |
+ |
|
4 | 58 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/evaluation/service/Impl/EvaluationService.java
... | ... | @@ -1,4 +0,0 @@ |
1 | -package com.takensoft.ai_lms.lms.evaluation.service.Impl; | |
2 | - | |
3 | -public class EvaluationService { | |
4 | -} |
+++ src/main/java/com/takensoft/ai_lms/lms/evaluation/service/Impl/EvaluationServiceImpl.java
... | ... | @@ -0,0 +1,81 @@ |
1 | +package com.takensoft.ai_lms.lms.evaluation.service.Impl; | |
2 | + | |
3 | +import com.takensoft.ai_lms.common.idgen.service.IdgenService; | |
4 | +import com.takensoft.ai_lms.lms.evaluation.dao.EvaluationDAO; | |
5 | +import com.takensoft.ai_lms.lms.evaluation.service.EvaluationService; | |
6 | +import com.takensoft.ai_lms.lms.evaluation.vo.EvaluationVO; | |
7 | +import com.takensoft.ai_lms.lms.problem.vo.SearchVO; | |
8 | +import lombok.RequiredArgsConstructor; | |
9 | +import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; | |
10 | +import org.springframework.stereotype.Service; | |
11 | + | |
12 | +import java.util.List; | |
13 | + | |
14 | +/** | |
15 | + * @author 권지수 | |
16 | + * @since 2024.07.29 | |
17 | + * | |
18 | + * 단원 평가 ServiceImpl 클래스 | |
19 | + */ | |
20 | + | |
21 | +@Service("evaluationService") | |
22 | +@RequiredArgsConstructor | |
23 | +public class EvaluationServiceImpl extends EgovAbstractServiceImpl implements EvaluationService { | |
24 | + | |
25 | + private final EvaluationDAO evaluationDAO; | |
26 | + private final IdgenService evalIdgn; | |
27 | + | |
28 | + /** | |
29 | + * @author 권지수 | |
30 | + * @since 2024.07.29 | |
31 | + * | |
32 | + * 단원 평가 정보 입력 | |
33 | + */ | |
34 | + public int insertEvaluation(EvaluationVO evaluationVO) throws Exception { | |
35 | + String evaluationId = evalIdgn.getNextStringId(); | |
36 | + evaluationVO.setEvalId(evaluationId); | |
37 | + | |
38 | + return evaluationDAO.insertEvaluation(evaluationVO); | |
39 | + } | |
40 | + | |
41 | + /** | |
42 | + * @author 권지수 | |
43 | + * @since 2024.07.29 | |
44 | + * | |
45 | + * 단원 평가 정보 조회 | |
46 | + */ | |
47 | + public EvaluationVO evaluationInfo(EvaluationVO evaluationVO) throws Exception { | |
48 | + return evaluationDAO.evaluationInfo(evaluationVO); | |
49 | + } | |
50 | + | |
51 | + /** | |
52 | + * @author 권지수 | |
53 | + * @since 2024.07.29 | |
54 | + * | |
55 | + * 특정 단원 평가 정보 조회 | |
56 | + */ | |
57 | + public List<EvaluationVO> evaluationUnitList(SearchVO searchVO) throws Exception { | |
58 | + return evaluationDAO.evaluationUnitList(searchVO); | |
59 | + } | |
60 | + | |
61 | + /** | |
62 | + * @author 권지수 | |
63 | + * @since 2024.07.29 | |
64 | + * | |
65 | + * 단원 평가 정보 수정 | |
66 | + */ | |
67 | + public int updateEvaluation(EvaluationVO evaluationVO) throws Exception { | |
68 | + return evaluationDAO.updateEvaluation(evaluationVO); | |
69 | + } | |
70 | + | |
71 | + /** | |
72 | + * @author 권지수 | |
73 | + * @since 2024.07.29 | |
74 | + * | |
75 | + * 단원 평가 정보 삭제 | |
76 | + */ | |
77 | + public int deleteEvaluation(EvaluationVO evaluationVO) throws Exception { | |
78 | + return evaluationDAO.deleteEvaluation(evaluationVO); | |
79 | + } | |
80 | + | |
81 | +} |
--- src/main/java/com/takensoft/ai_lms/lms/evaluation/vo/EvaluationVO.java
+++ src/main/java/com/takensoft/ai_lms/lms/evaluation/vo/EvaluationVO.java
... | ... | @@ -1,4 +1,19 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.evaluation.vo; |
2 | 2 |
|
3 |
+import lombok.AllArgsConstructor; |
|
4 |
+import lombok.Getter; |
|
5 |
+import lombok.NoArgsConstructor; |
|
6 |
+import lombok.Setter; |
|
7 |
+ |
|
8 |
+@Getter |
|
9 |
+@Setter |
|
10 |
+@AllArgsConstructor |
|
11 |
+@NoArgsConstructor |
|
3 | 12 |
public class EvaluationVO { |
13 |
+ // 단원 평가 아이디 |
|
14 |
+ private String evalId; |
|
15 |
+ // 단원 평가 유형 |
|
16 |
+ private String evalType; |
|
17 |
+ // 단원 아이디 |
|
18 |
+ private String unitId; |
|
4 | 19 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/evaluation/web/EvaluationController.java
+++ src/main/java/com/takensoft/ai_lms/lms/evaluation/web/EvaluationController.java
... | ... | @@ -1,4 +1,97 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.evaluation.web; |
2 | 2 |
|
3 |
+import com.takensoft.ai_lms.lms.evaluation.service.EvaluationService; |
|
4 |
+import com.takensoft.ai_lms.lms.evaluation.vo.EvaluationVO; |
|
5 |
+import com.takensoft.ai_lms.lms.problem.vo.ProblemVO; |
|
6 |
+import com.takensoft.ai_lms.lms.problem.vo.SearchVO; |
|
7 |
+import lombok.RequiredArgsConstructor; |
|
8 |
+import lombok.extern.slf4j.Slf4j; |
|
9 |
+import org.springframework.http.HttpStatus; |
|
10 |
+import org.springframework.http.ResponseEntity; |
|
11 |
+import org.springframework.web.bind.annotation.PostMapping; |
|
12 |
+import org.springframework.web.bind.annotation.RequestBody; |
|
13 |
+import org.springframework.web.bind.annotation.RequestMapping; |
|
14 |
+import org.springframework.web.bind.annotation.RestController; |
|
15 |
+ |
|
16 |
+import java.util.List; |
|
17 |
+ |
|
18 |
+/** |
|
19 |
+ * @author 권지수 |
|
20 |
+ * @since 2024.07.29 |
|
21 |
+ * |
|
22 |
+ * 단원 평가 Controller 클래스 |
|
23 |
+ */ |
|
24 |
+ |
|
25 |
+@RestController |
|
26 |
+@RequiredArgsConstructor |
|
27 |
+@Slf4j |
|
28 |
+@RequestMapping(value = "/evaluation") |
|
3 | 29 |
public class EvaluationController { |
30 |
+ |
|
31 |
+ private final EvaluationService evaluationService; |
|
32 |
+ |
|
33 |
+ /** |
|
34 |
+ * @author 권지수 |
|
35 |
+ * @since 2024.07.29 |
|
36 |
+ * |
|
37 |
+ * 단원 평가 정보 입력 |
|
38 |
+ */ |
|
39 |
+ @PostMapping(path = "/insertEvaluation.json") |
|
40 |
+ public ResponseEntity<?> insertEvaluation(@RequestBody EvaluationVO evaluationVO) throws Exception { |
|
41 |
+ int result = evaluationService.insertEvaluation(evaluationVO); |
|
42 |
+ |
|
43 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
44 |
+ } |
|
45 |
+ |
|
46 |
+ /** |
|
47 |
+ * @author 권지수 |
|
48 |
+ * @since 2024.07.29 |
|
49 |
+ * |
|
50 |
+ * 단원 평가 정보 조회 |
|
51 |
+ */ |
|
52 |
+ @PostMapping(path = "/evaluationInfo.json") |
|
53 |
+ public ResponseEntity<?> evaluationInfo(@RequestBody EvaluationVO evaluationVO) throws Exception { |
|
54 |
+ EvaluationVO result = evaluationService.evaluationInfo(evaluationVO); |
|
55 |
+ |
|
56 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
57 |
+ } |
|
58 |
+ |
|
59 |
+ /** |
|
60 |
+ * @author 권지수 |
|
61 |
+ * @since 2024.07.29 |
|
62 |
+ * |
|
63 |
+ * 특정 단원 평가 정보 조회 |
|
64 |
+ */ |
|
65 |
+ @PostMapping(path = "/evaluationUnitList.json") |
|
66 |
+ public ResponseEntity<?> evaluationUnitList(@RequestBody SearchVO searchVO) throws Exception { |
|
67 |
+ List<EvaluationVO> result = evaluationService.evaluationUnitList(searchVO); |
|
68 |
+ |
|
69 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
70 |
+ } |
|
71 |
+ |
|
72 |
+ /** |
|
73 |
+ * @author 권지수 |
|
74 |
+ * @since 2024.07.29 |
|
75 |
+ * |
|
76 |
+ * 단원 평가 정보 수정 |
|
77 |
+ */ |
|
78 |
+ @PostMapping(path = "/updateEvaluation.json") |
|
79 |
+ public ResponseEntity<?> updateEvaluation(@RequestBody EvaluationVO evaluationVO) throws Exception { |
|
80 |
+ int result = evaluationService.updateEvaluation(evaluationVO); |
|
81 |
+ |
|
82 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
83 |
+ } |
|
84 |
+ |
|
85 |
+ /** |
|
86 |
+ * @author 권지수 |
|
87 |
+ * @since 2024.07.29 |
|
88 |
+ * |
|
89 |
+ * 단원 평가 정보 삭제 |
|
90 |
+ */ |
|
91 |
+ @PostMapping(path = "/deleteEvaluation.json") |
|
92 |
+ public ResponseEntity<?> deleteEvaluation(@RequestBody EvaluationVO evaluationVO) throws Exception { |
|
93 |
+ int result = evaluationService.deleteEvaluation(evaluationVO); |
|
94 |
+ |
|
95 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
96 |
+ } |
|
4 | 97 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/problem/dao/ProblemDAO.java
+++ src/main/java/com/takensoft/ai_lms/lms/problem/dao/ProblemDAO.java
... | ... | @@ -1,7 +1,9 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.problem.dao; |
2 | 2 |
|
3 |
+import com.takensoft.ai_lms.lms.eval_problem.vo.EvalProblemVO; |
|
3 | 4 |
import com.takensoft.ai_lms.lms.problem.vo.ProblemDetailVO; |
4 | 5 |
import com.takensoft.ai_lms.lms.problem.vo.ProblemVO; |
6 |
+import com.takensoft.ai_lms.lms.problem.vo.SearchVO; |
|
5 | 7 |
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; |
6 | 8 |
|
7 | 9 |
import java.util.List; |
... | ... | @@ -72,4 +74,20 @@ |
72 | 74 |
*/ |
73 | 75 |
int deleteProblem(ProblemVO problemVO) throws Exception; |
74 | 76 |
|
77 |
+ /** |
|
78 |
+ * @author 권지수 |
|
79 |
+ * @since 2024.07.30 |
|
80 |
+ * |
|
81 |
+ * 전체 문제 목록 조회 |
|
82 |
+ */ |
|
83 |
+ List<ProblemVO> problemList(SearchVO searchVO) throws Exception; |
|
84 |
+ |
|
85 |
+ /** |
|
86 |
+ * @author 권지수 |
|
87 |
+ * @since 2024.07.30 |
|
88 |
+ * |
|
89 |
+ * 특정 단원 평가의 문제 목록 조회 |
|
90 |
+ */ |
|
91 |
+ List<ProblemVO> evaluationProblemList(SearchVO searchVO) throws Exception; |
|
92 |
+ |
|
75 | 93 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/problem/service/Impl/ProblemServiceImpl.java
+++ src/main/java/com/takensoft/ai_lms/lms/problem/service/Impl/ProblemServiceImpl.java
... | ... | @@ -1,10 +1,12 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.problem.service.Impl; |
2 | 2 |
|
3 | 3 |
import com.takensoft.ai_lms.common.idgen.service.IdgenService; |
4 |
+import com.takensoft.ai_lms.lms.eval_problem.vo.EvalProblemVO; |
|
4 | 5 |
import com.takensoft.ai_lms.lms.problem.dao.ProblemDAO; |
5 | 6 |
import com.takensoft.ai_lms.lms.problem.service.ProblemService; |
6 | 7 |
import com.takensoft.ai_lms.lms.problem.vo.ProblemDetailVO; |
7 | 8 |
import com.takensoft.ai_lms.lms.problem.vo.ProblemVO; |
9 |
+import com.takensoft.ai_lms.lms.problem.vo.SearchVO; |
|
8 | 10 |
import lombok.RequiredArgsConstructor; |
9 | 11 |
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; |
10 | 12 |
import org.springframework.stereotype.Service; |
... | ... | @@ -106,4 +108,24 @@ |
106 | 108 |
public int deleteProblem(ProblemVO problemVO) throws Exception { |
107 | 109 |
return problemDAO.deleteProblem(problemVO); |
108 | 110 |
} |
111 |
+ |
|
112 |
+ /** |
|
113 |
+ * @author 권지수 |
|
114 |
+ * @since 2024.07.30 |
|
115 |
+ * |
|
116 |
+ * 전체 문제 목록 조회 |
|
117 |
+ */ |
|
118 |
+ public List<ProblemVO> problemList(SearchVO searchVO) throws Exception { |
|
119 |
+ return problemDAO.problemList(searchVO); |
|
120 |
+ } |
|
121 |
+ |
|
122 |
+ /** |
|
123 |
+ * @author 권지수 |
|
124 |
+ * @since 2024.07.30 |
|
125 |
+ * |
|
126 |
+ * 특정 단원 평가의 문제 목록 조회 |
|
127 |
+ */ |
|
128 |
+ public List<ProblemVO> evaluationProblemList(SearchVO searchVO) throws Exception { |
|
129 |
+ return problemDAO.evaluationProblemList(searchVO); |
|
130 |
+ } |
|
109 | 131 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/problem/service/ProblemService.java
+++ src/main/java/com/takensoft/ai_lms/lms/problem/service/ProblemService.java
... | ... | @@ -1,7 +1,9 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.problem.service; |
2 | 2 |
|
3 |
+import com.takensoft.ai_lms.lms.eval_problem.vo.EvalProblemVO; |
|
3 | 4 |
import com.takensoft.ai_lms.lms.problem.vo.ProblemDetailVO; |
4 | 5 |
import com.takensoft.ai_lms.lms.problem.vo.ProblemVO; |
6 |
+import com.takensoft.ai_lms.lms.problem.vo.SearchVO; |
|
5 | 7 |
|
6 | 8 |
import java.util.HashMap; |
7 | 9 |
import java.util.List; |
... | ... | @@ -70,4 +72,20 @@ |
70 | 72 |
* 문제 정보 삭제 |
71 | 73 |
*/ |
72 | 74 |
int deleteProblem(ProblemVO problemVO) throws Exception; |
75 |
+ |
|
76 |
+ /** |
|
77 |
+ * @author 권지수 |
|
78 |
+ * @since 2024.07.30 |
|
79 |
+ * |
|
80 |
+ * 전체 문제 목록 조회 |
|
81 |
+ */ |
|
82 |
+ List<ProblemVO> problemList(SearchVO searchVO) throws Exception; |
|
83 |
+ |
|
84 |
+ /** |
|
85 |
+ * @author 권지수 |
|
86 |
+ * @since 2024.07.30 |
|
87 |
+ * |
|
88 |
+ * 특정 단원 평가의 문제 목록 조회 |
|
89 |
+ */ |
|
90 |
+ List<ProblemVO> evaluationProblemList(SearchVO searchVO) throws Exception; |
|
73 | 91 |
} |
+++ src/main/java/com/takensoft/ai_lms/lms/problem/vo/SearchVO.java
... | ... | @@ -0,0 +1,25 @@ |
1 | +package com.takensoft.ai_lms.lms.problem.vo; | |
2 | + | |
3 | +import lombok.AllArgsConstructor; | |
4 | +import lombok.Getter; | |
5 | +import lombok.NoArgsConstructor; | |
6 | +import lombok.Setter; | |
7 | + | |
8 | +@Getter | |
9 | +@Setter | |
10 | +@AllArgsConstructor | |
11 | +@NoArgsConstructor | |
12 | +public class SearchVO { | |
13 | + // 검색 옵션 | |
14 | + private String option; | |
15 | + // 검색 키워드 | |
16 | + private String keyword; | |
17 | + // 페이지 크기 | |
18 | + private int pageSize; | |
19 | + // 시작 인덱스 | |
20 | + private int startIndex; | |
21 | + // 단원 평가 아이디 | |
22 | + private String evalId; | |
23 | + // 단원 아이디 | |
24 | + private String unitId; | |
25 | +} |
--- src/main/java/com/takensoft/ai_lms/lms/problem/web/ProblemController.java
+++ src/main/java/com/takensoft/ai_lms/lms/problem/web/ProblemController.java
... | ... | @@ -1,9 +1,11 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.problem.web; |
2 | 2 |
|
3 | 3 |
import com.takensoft.ai_lms.lms.auth.vo.UserVO; |
4 |
+import com.takensoft.ai_lms.lms.eval_problem.vo.EvalProblemVO; |
|
4 | 5 |
import com.takensoft.ai_lms.lms.problem.service.ProblemService; |
5 | 6 |
import com.takensoft.ai_lms.lms.problem.vo.ProblemDetailVO; |
6 | 7 |
import com.takensoft.ai_lms.lms.problem.vo.ProblemVO; |
8 |
+import com.takensoft.ai_lms.lms.problem.vo.SearchVO; |
|
7 | 9 |
import lombok.RequiredArgsConstructor; |
8 | 10 |
import lombok.extern.slf4j.Slf4j; |
9 | 11 |
import org.springframework.http.HttpStatus; |
... | ... | @@ -136,4 +138,30 @@ |
136 | 138 |
|
137 | 139 |
return new ResponseEntity<>(result, HttpStatus.OK); |
138 | 140 |
} |
141 |
+ |
|
142 |
+ /** |
|
143 |
+ * @author 권지수 |
|
144 |
+ * @since 2024.07.26 |
|
145 |
+ * |
|
146 |
+ * 전체 문제 목록 조회 |
|
147 |
+ */ |
|
148 |
+ @PostMapping(path = "/problemList.json") |
|
149 |
+ public ResponseEntity<?> problemList(@RequestBody SearchVO searchVO) throws Exception { |
|
150 |
+ List<ProblemVO> result = problemService.problemList(searchVO); |
|
151 |
+ |
|
152 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
153 |
+ } |
|
154 |
+ |
|
155 |
+ /** |
|
156 |
+ * @author 권지수 |
|
157 |
+ * @since 2024.07.26 |
|
158 |
+ * |
|
159 |
+ * 특정 단원 평가의 문제 목록 조회 |
|
160 |
+ */ |
|
161 |
+ @PostMapping(path = "/evaluationProblemList.json") |
|
162 |
+ public ResponseEntity<?> evaluationProblemList(@RequestBody SearchVO searchVO) throws Exception { |
|
163 |
+ List<ProblemVO> result = problemService.evaluationProblemList(searchVO); |
|
164 |
+ |
|
165 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
166 |
+ } |
|
139 | 167 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/schedule/web/ScheduleController.java
+++ src/main/java/com/takensoft/ai_lms/lms/schedule/web/ScheduleController.java
... | ... | @@ -55,17 +55,17 @@ |
55 | 55 |
/** |
56 | 56 |
* 학습 일정 출력 |
57 | 57 |
*/ |
58 |
- @GetMapping("/selectSchedule.json") |
|
58 |
+ @PostMapping("/selectSchedule.json") |
|
59 | 59 |
@Operation(summary = "스케줄 출력") |
60 |
- public List<HashMap<String, Object>> selectSchedule(@RequestParam HashMap<String, Object> scheduleId) throws Exception { |
|
61 |
- return scheduleService.selectSchedule(scheduleId); |
|
60 |
+ public List<HashMap<String, Object>> selectSchedule(@RequestBody HashMap<String, Object> stdId) throws Exception { |
|
61 |
+ return scheduleService.selectSchedule(stdId); |
|
62 | 62 |
} |
63 | 63 |
|
64 | 64 |
|
65 | 65 |
/** |
66 | 66 |
* 학습 일정 수정 |
67 | 67 |
*/ |
68 |
- @PutMapping(value = "/scheduleUpdate.json") |
|
68 |
+ @PostMapping(value = "/scheduleUpdate.json") |
|
69 | 69 |
@Operation(summary = "스케줄 수정") |
70 | 70 |
public String scheduleUpdate(@RequestBody ScheduleVO scheduleVO) throws Exception { |
71 | 71 |
Gson gson = new Gson(); |
... | ... | @@ -92,7 +92,7 @@ |
92 | 92 |
/** |
93 | 93 |
* 학습 일정 삭제 |
94 | 94 |
*/ |
95 |
- @DeleteMapping(value = "/scheduleDelete.json") |
|
95 |
+ @PostMapping(value = "/scheduleDelete.json") |
|
96 | 96 |
@Operation(summary = "스케줄 삭제") |
97 | 97 |
public String scheduleDelete(@RequestBody Map<String, String> request) throws Exception { |
98 | 98 |
Gson gson = new Gson(); |
--- src/main/java/com/takensoft/ai_lms/lms/survey/dao/SurveyDAO.java
+++ src/main/java/com/takensoft/ai_lms/lms/survey/dao/SurveyDAO.java
... | ... | @@ -1,6 +1,7 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.survey.dao; |
2 | 2 |
|
3 | 3 |
|
4 |
+import com.takensoft.ai_lms.lms.survey.vo.SurveyDetailVO; |
|
4 | 5 |
import com.takensoft.ai_lms.lms.survey.vo.SurveyVO; |
5 | 6 |
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; |
6 | 7 |
|
... | ... | @@ -26,5 +27,14 @@ |
26 | 27 |
int updateSurvey(SurveyVO surveyVO) throws Exception; |
27 | 28 |
|
28 | 29 |
// 설문 조사 삭제 |
29 |
- int deleteSurvey(String srvyId) throws Exception; |
|
30 |
+ void deleteSurvey(String srvyId) throws Exception; |
|
31 |
+ |
|
32 |
+ // 설문 조사 상제 삭세 |
|
33 |
+ void deleteSurveyDetail(String srvyId) throws Exception; |
|
34 |
+ |
|
35 |
+ // 설문 조사 상세 정보 등록 |
|
36 |
+ void insertSurveyDetail(List<SurveyDetailVO> surveyDetailVO) throws Exception; |
|
37 |
+ |
|
38 |
+ // 설문 조사 상세 정보 조회 |
|
39 |
+ List<SurveyDetailVO> surveyDetailList(SurveyDetailVO surveyDetailVO) throws Exception; |
|
30 | 40 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/survey/service/Impl/SurveyServiceImpl.java
+++ src/main/java/com/takensoft/ai_lms/lms/survey/service/Impl/SurveyServiceImpl.java
... | ... | @@ -4,18 +4,20 @@ |
4 | 4 |
import com.takensoft.ai_lms.common.idgen.service.IdgenService; |
5 | 5 |
import com.takensoft.ai_lms.lms.survey.dao.SurveyDAO; |
6 | 6 |
import com.takensoft.ai_lms.lms.survey.service.SurveyService; |
7 |
+import com.takensoft.ai_lms.lms.survey.vo.SurveyDetailVO; |
|
7 | 8 |
import com.takensoft.ai_lms.lms.survey.vo.SurveyVO; |
8 | 9 |
import lombok.RequiredArgsConstructor; |
9 | 10 |
import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; |
10 | 11 |
import org.springframework.stereotype.Service; |
12 |
+import org.springframework.transaction.annotation.Transactional; |
|
11 | 13 |
|
12 | 14 |
import java.util.List; |
13 | 15 |
|
14 | 16 |
|
15 | 17 |
/** |
16 |
- * @author : 박세훈 |
|
18 |
+ * @author : 박세훈 |
|
17 | 19 |
* since : 2024.07.29 |
18 |
- * |
|
20 |
+ * <p> |
|
19 | 21 |
* 설문 조사 관련 ServiceImpl |
20 | 22 |
*/ |
21 | 23 |
@Service("surveyService") |
... | ... | @@ -26,9 +28,11 @@ |
26 | 28 |
|
27 | 29 |
private final IdgenService surveyIdgn; |
28 | 30 |
|
31 |
+ private final IdgenService surveyDetailIdgn; |
|
32 |
+ |
|
29 | 33 |
// 설문 조사 등록 |
30 | 34 |
@Override |
31 |
- public int insertSurvey(SurveyVO surveyVO) throws Exception{ |
|
35 |
+ public int insertSurvey(SurveyVO surveyVO) throws Exception { |
|
32 | 36 |
String srvyId = surveyIdgn.getNextStringId(); |
33 | 37 |
surveyVO.setSrvyId(srvyId); |
34 | 38 |
return surveyDAO.insertSurvey(surveyVO); |
... | ... | @@ -47,8 +51,28 @@ |
47 | 51 |
} |
48 | 52 |
|
49 | 53 |
// 설문 조사 삭제 |
54 |
+ @Transactional |
|
50 | 55 |
@Override |
51 |
- public int deleteSurvey(String srvyId) throws Exception { |
|
52 |
- return surveyDAO.deleteSurvey(srvyId); |
|
56 |
+ public void deleteSurveyWithDetails(String srvyId) throws Exception { |
|
57 |
+ surveyDAO.deleteSurveyDetail(srvyId); |
|
58 |
+ surveyDAO.deleteSurvey(srvyId); |
|
59 |
+ } |
|
60 |
+ |
|
61 |
+ |
|
62 |
+ |
|
63 |
+ // 설문 조사 상세 정보 |
|
64 |
+ @Override |
|
65 |
+ public void insertSurveyDetail(List<SurveyDetailVO> surveyDetailVO) throws Exception { |
|
66 |
+ for (SurveyDetailVO detail : surveyDetailVO) { |
|
67 |
+ String srvyDtlId = surveyDetailIdgn.getNextStringId(); |
|
68 |
+ detail.setSrvyDtlId(srvyDtlId); |
|
69 |
+ } |
|
70 |
+ surveyDAO.insertSurveyDetail(surveyDetailVO); |
|
71 |
+ } |
|
72 |
+ |
|
73 |
+ // 설문 조사 상세 정보 조회 |
|
74 |
+ @Override |
|
75 |
+ public List<SurveyDetailVO> surveyDetailList(SurveyDetailVO surveyDetailVO) throws Exception { |
|
76 |
+ return surveyDAO.surveyDetailList(surveyDetailVO); |
|
53 | 77 |
} |
54 | 78 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/survey/service/SurveyService.java
+++ src/main/java/com/takensoft/ai_lms/lms/survey/service/SurveyService.java
... | ... | @@ -1,5 +1,6 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.survey.service; |
2 | 2 |
|
3 |
+import com.takensoft.ai_lms.lms.survey.vo.SurveyDetailVO; |
|
3 | 4 |
import com.takensoft.ai_lms.lms.survey.vo.SurveyVO; |
4 | 5 |
|
5 | 6 |
import java.util.List; |
... | ... | @@ -24,5 +25,11 @@ |
24 | 25 |
int updateSurvey(SurveyVO surveyVO) throws Exception; |
25 | 26 |
|
26 | 27 |
// 설문 조사 삭제 |
27 |
- int deleteSurvey(String srvyId) throws Exception; |
|
28 |
+ void deleteSurveyWithDetails(String srvyId) throws Exception; |
|
29 |
+ |
|
30 |
+ // 설문 조사 상세 정보 |
|
31 |
+ void insertSurveyDetail(List<SurveyDetailVO> surveyDetailVO) throws Exception; |
|
32 |
+ |
|
33 |
+ // 설문 조사 상세 정보 조회 |
|
34 |
+ List<SurveyDetailVO> surveyDetailList(SurveyDetailVO surveyDetailVO) throws Exception; |
|
28 | 35 |
} |
+++ src/main/java/com/takensoft/ai_lms/lms/survey/vo/SurveyDetailVO.java
... | ... | @@ -0,0 +1,29 @@ |
1 | +package com.takensoft.ai_lms.lms.survey.vo; | |
2 | + | |
3 | + | |
4 | +import lombok.AllArgsConstructor; | |
5 | +import lombok.Getter; | |
6 | +import lombok.NoArgsConstructor; | |
7 | +import lombok.Setter; | |
8 | + | |
9 | +/** | |
10 | + * @author : 박세훈 | |
11 | + * since : 2024.07.30 | |
12 | + * | |
13 | + * 설문 조사 상세 정보 관련 VO | |
14 | + */ | |
15 | +@Getter | |
16 | +@Setter | |
17 | +@AllArgsConstructor | |
18 | +@NoArgsConstructor | |
19 | +public class SurveyDetailVO { | |
20 | + | |
21 | + // 설문 조사 상세 아이디 | |
22 | + private String srvyDtlId; | |
23 | + | |
24 | + // 설문 상세 항목 | |
25 | + private String srvyDtlCnt; | |
26 | + | |
27 | + // 설문 조사 아이디 | |
28 | + private String srvyId; | |
29 | +} |
--- src/main/java/com/takensoft/ai_lms/lms/survey/vo/SurveyVO.java
+++ src/main/java/com/takensoft/ai_lms/lms/survey/vo/SurveyVO.java
... | ... | @@ -6,6 +6,8 @@ |
6 | 6 |
import lombok.NoArgsConstructor; |
7 | 7 |
import lombok.Setter; |
8 | 8 |
|
9 |
+import java.util.List; |
|
10 |
+ |
|
9 | 11 |
|
10 | 12 |
/** |
11 | 13 |
* @author : 박세훈 |
... | ... | @@ -27,4 +29,7 @@ |
27 | 29 |
|
28 | 30 |
// 설문 내용 |
29 | 31 |
private String srvyCnt; |
32 |
+ |
|
33 |
+ // 설문 조사 상세 정보 테이블과 연결 |
|
34 |
+ private List<SurveyDetailVO> surveyDetail; |
|
30 | 35 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/survey/web/SurveyController.java
+++ src/main/java/com/takensoft/ai_lms/lms/survey/web/SurveyController.java
... | ... | @@ -2,8 +2,11 @@ |
2 | 2 |
|
3 | 3 |
|
4 | 4 |
import com.takensoft.ai_lms.lms.survey.service.SurveyService; |
5 |
+import com.takensoft.ai_lms.lms.survey.vo.SurveyDetailVO; |
|
5 | 6 |
import com.takensoft.ai_lms.lms.survey.vo.SurveyVO; |
6 | 7 |
import lombok.RequiredArgsConstructor; |
8 |
+import org.springframework.http.HttpStatus; |
|
9 |
+import org.springframework.http.ResponseEntity; |
|
7 | 10 |
import org.springframework.web.bind.annotation.*; |
8 | 11 |
|
9 | 12 |
import java.util.List; |
... | ... | @@ -23,6 +26,8 @@ |
23 | 26 |
|
24 | 27 |
private final SurveyService surveyService; |
25 | 28 |
|
29 |
+ |
|
30 |
+ // 설문 조사 등록 |
|
26 | 31 |
@PostMapping("/insert.json") |
27 | 32 |
public String insertSurvey(@RequestBody SurveyVO surveyVO) throws Exception { |
28 | 33 |
try { |
... | ... | @@ -37,13 +42,29 @@ |
37 | 42 |
} |
38 | 43 |
} |
39 | 44 |
|
40 |
- @GetMapping("/list.json") |
|
45 |
+ // 설문 조사 상세 등록 |
|
46 |
+ @PostMapping("/insertDetail.json") |
|
47 |
+ public ResponseEntity<Void> insertDetailSurvey(@RequestBody List<SurveyDetailVO> surveyDetailVO) throws Exception { |
|
48 |
+ surveyService.insertSurveyDetail(surveyDetailVO); |
|
49 |
+ return new ResponseEntity<>(HttpStatus.OK); |
|
50 |
+ } |
|
51 |
+ |
|
52 |
+ |
|
53 |
+ // 설문 조사 조회 |
|
54 |
+ @PostMapping("/list.json") |
|
41 | 55 |
public List<SurveyVO> surveyList(SurveyVO surveyVO) throws Exception { |
42 | 56 |
return surveyService.surveyList(surveyVO); |
43 | 57 |
} |
44 | 58 |
|
59 |
+ // 설문 조사 상세 조회 |
|
60 |
+ @PostMapping("detailList.json") |
|
61 |
+ public List<SurveyDetailVO> surveyDetailVOList(@RequestBody SurveyDetailVO surveyDetailVO) throws Exception { |
|
62 |
+ return surveyService.surveyDetailList(surveyDetailVO); |
|
63 |
+ } |
|
45 | 64 |
|
46 |
- @PutMapping("/update.json") |
|
65 |
+ |
|
66 |
+ // 설문 조사 수정 |
|
67 |
+ @PostMapping("/update.json") |
|
47 | 68 |
public String updateSurvey (@RequestBody SurveyVO surveyVO) throws Exception { |
48 | 69 |
try { |
49 | 70 |
int result = surveyService.updateSurvey(surveyVO); |
... | ... | @@ -58,19 +79,11 @@ |
58 | 79 |
} |
59 | 80 |
|
60 | 81 |
|
61 |
- @DeleteMapping("/delete.json") |
|
62 |
- public String deleteSurvey (@RequestBody Map<String, String> request) throws Exception { |
|
63 |
- try { |
|
64 |
- String srvyId = request.get("srvyId"); |
|
65 |
- int result = surveyService.deleteSurvey(srvyId); |
|
66 |
- if ( result > 0) { |
|
67 |
- return "success"; |
|
68 |
- } else { |
|
69 |
- return "fail"; |
|
70 |
- } |
|
71 |
- } catch (Exception e) { |
|
72 |
- return "Error"; |
|
73 |
- } |
|
82 |
+ // 설문 조사 삭제(연관된 설문 조사 상세도 삭제됨) |
|
83 |
+ @PostMapping("/delete.json") |
|
84 |
+ public ResponseEntity<Void> deleteSurvey (@RequestBody SurveyVO surveyVO) throws Exception { |
|
85 |
+ surveyService.deleteSurveyWithDetails(surveyVO.getSrvyId()); |
|
86 |
+ return new ResponseEntity<>(HttpStatus.OK); |
|
74 | 87 |
} |
75 | 88 |
|
76 | 89 |
|
--- src/main/java/com/takensoft/ai_lms/lms/text/web/TextController.java
+++ src/main/java/com/takensoft/ai_lms/lms/text/web/TextController.java
... | ... | @@ -60,7 +60,7 @@ |
60 | 60 |
/** |
61 | 61 |
* 지문 리스트 조회 |
62 | 62 |
*/ |
63 |
- @GetMapping("/selectTextList.json") |
|
63 |
+ @PostMapping("/selectTextList.json") |
|
64 | 64 |
@Operation(summary = "지문 리스트 조회") |
65 | 65 |
public HashMap<String, Object> getTextList(@RequestBody HashMap<String, Object> params) throws Exception { |
66 | 66 |
HashMap<String, Object> result = new HashMap<>(); |
... | ... | @@ -78,7 +78,7 @@ |
78 | 78 |
/** |
79 | 79 |
* 지문 출력 |
80 | 80 |
*/ |
81 |
- @GetMapping("/selectOneText.json") |
|
81 |
+ @PostMapping("/selectOneText.json") |
|
82 | 82 |
@Operation(summary = "지문 출력") |
83 | 83 |
public List<HashMap<String, Object>> selectOneText(@RequestBody HashMap<String, Object> textId) throws Exception { |
84 | 84 |
return TextService.selectOneText(textId); |
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 |
/** |
89 | 89 |
* 지문 수정 |
90 | 90 |
*/ |
91 |
- @PutMapping(value = "/textUpdate.json") |
|
91 |
+ @PostMapping(value = "/textUpdate.json") |
|
92 | 92 |
@Operation(summary = "지문 수정") |
93 | 93 |
public String textUpdate(@RequestBody TextVO textVO) throws Exception { |
94 | 94 |
Gson gson = new Gson(); |
... | ... | @@ -115,7 +115,7 @@ |
115 | 115 |
/** |
116 | 116 |
* 지문 삭제 |
117 | 117 |
*/ |
118 |
- @DeleteMapping(value = "/textDelete.json") |
|
118 |
+ @PostMapping(value = "/textDelete.json") |
|
119 | 119 |
@Operation(summary = "지문 삭제") |
120 | 120 |
public String textDelete(@RequestBody Map<String, String> request) throws Exception { |
121 | 121 |
Gson gson = new Gson(); |
... | ... | @@ -143,7 +143,7 @@ |
143 | 143 |
/** |
144 | 144 |
* 지문 검색 |
145 | 145 |
*/ |
146 |
- @GetMapping("/textSearch.json") |
|
146 |
+ @PostMapping("/textSearch.json") |
|
147 | 147 |
@Operation(summary = "지문 검색") |
148 | 148 |
public HashMap<String, Object> searchText(@RequestBody HashMap<String, Object> params) throws Exception { |
149 | 149 |
HashMap<String, Object> result = new HashMap<>(); |
+++ src/main/java/com/takensoft/ai_lms/lms/unit_learning/dao/UnitLearningDAO.java
... | ... | @@ -0,0 +1,56 @@ |
1 | +package com.takensoft.ai_lms.lms.unit_learning.dao; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.unit_learning.vo.UnitLearningVO; | |
4 | +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
5 | + | |
6 | +import java.util.List; | |
7 | + | |
8 | +/** | |
9 | + * @author : 구자현 | |
10 | + * @since : 2024.07.26 | |
11 | + * | |
12 | + * 로드맵 관련 Mapper | |
13 | + */ | |
14 | +@Mapper("unitLearningDAO") | |
15 | +public interface UnitLearningDAO { | |
16 | + | |
17 | + /** | |
18 | + * @author : 구자현 | |
19 | + * @since : 2024.07.26 | |
20 | + * | |
21 | + * 전체 로드맵 목록 출력 | |
22 | + */ | |
23 | + List<UnitLearningVO> getAllUnitLearning(); | |
24 | + | |
25 | + /** | |
26 | + * @author : 구자현 | |
27 | + * @since : 2024.07.26 | |
28 | + * | |
29 | + * 로드맵의 상세 정보 | |
30 | + */ | |
31 | + UnitLearningVO getUnitLearningBySeq(int seq); | |
32 | + | |
33 | + /** | |
34 | + * @author : 구자현 | |
35 | + * @since : 2024.07.26 | |
36 | + * | |
37 | + * 로드맵 등록 | |
38 | + */ | |
39 | + void insertUnitLearning(UnitLearningVO scheduleVO); | |
40 | + | |
41 | + /** | |
42 | + * @author : 구자현 | |
43 | + * @since : 2024.07.26 | |
44 | + * | |
45 | + * 로드맵 순서 수정 | |
46 | + */ | |
47 | + void updateUnitLearning(UnitLearningVO scheduleVO); | |
48 | + | |
49 | + /** | |
50 | + * @author : 구자현 | |
51 | + * @since : 2024.07.26 | |
52 | + * | |
53 | + * 로드맵 삭제 | |
54 | + */ | |
55 | + void deleteUnitLearning(int seq); | |
56 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/unit_learning/service/Impl/UnitLearningServiceImpl.java
... | ... | @@ -0,0 +1,76 @@ |
1 | +package com.takensoft.ai_lms.lms.unit_learning.service.Impl; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.unit_learning.dao.UnitLearningDAO; | |
4 | +import com.takensoft.ai_lms.lms.unit_learning.service.UnitLearningService; | |
5 | +import com.takensoft.ai_lms.lms.unit_learning.vo.UnitLearningVO; | |
6 | +import lombok.RequiredArgsConstructor; | |
7 | +import org.springframework.stereotype.Service; | |
8 | +import java.util.List; | |
9 | + | |
10 | +/** | |
11 | + * @author : 구자현 | |
12 | + * @since : 2024.07.26 | |
13 | + * | |
14 | + * 로드맵 관련 Mapper | |
15 | + */ | |
16 | +@Service | |
17 | +@RequiredArgsConstructor | |
18 | +public class UnitLearningServiceImpl implements UnitLearningService { | |
19 | + | |
20 | + private final UnitLearningDAO unitLearningDAO; | |
21 | + | |
22 | + /** | |
23 | + * @author : 구자현 | |
24 | + * @since : 2024.07.26 | |
25 | + * | |
26 | + * 전체 로드맵 목록 출력 | |
27 | + */ | |
28 | + @Override | |
29 | + public List<UnitLearningVO> getAllUnitLearning() { | |
30 | + return unitLearningDAO.getAllUnitLearning(); | |
31 | + }; | |
32 | + | |
33 | + /** | |
34 | + * @author : 구자현 | |
35 | + * @since : 2024.07.26 | |
36 | + * | |
37 | + * 로드맵의 상세 정보 | |
38 | + */ | |
39 | + @Override | |
40 | + public UnitLearningVO getUnitLearningBySeq(int seq) { | |
41 | + return unitLearningDAO.getUnitLearningBySeq(seq); | |
42 | + }; | |
43 | + | |
44 | + /** | |
45 | + * @author : 구자현 | |
46 | + * @since : 2024.07.26 | |
47 | + * | |
48 | + * 로드맵 등록 | |
49 | + */ | |
50 | + @Override | |
51 | + public void insertUnitLearning(UnitLearningVO unitLearningVO) { | |
52 | + unitLearningDAO.insertUnitLearning(unitLearningVO); | |
53 | + }; | |
54 | + | |
55 | + /** | |
56 | + * @author : 구자현 | |
57 | + * @since : 2024.07.26 | |
58 | + * | |
59 | + * 로드맵 순서 수정 | |
60 | + */ | |
61 | + @Override | |
62 | + public void updateUnitLearning(UnitLearningVO unitLearningVO) { | |
63 | + unitLearningDAO.updateUnitLearning(unitLearningVO); | |
64 | + }; | |
65 | + | |
66 | + /** | |
67 | + * @author : 구자현 | |
68 | + * @since : 2024.07.26 | |
69 | + * | |
70 | + * 로드맵 삭제 | |
71 | + */ | |
72 | + @Override | |
73 | + public void deleteUnitLearning(int seq) { | |
74 | + unitLearningDAO.deleteUnitLearning(seq); | |
75 | + }; | |
76 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/unit_learning/service/UnitLearningService.java
... | ... | @@ -0,0 +1,54 @@ |
1 | +package com.takensoft.ai_lms.lms.unit_learning.service; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.unit_learning.vo.UnitLearningVO; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @author : 구자현 | |
9 | + * @since : 2024.07.26 | |
10 | + * | |
11 | + * 로드맵 관련 Service 클래스 | |
12 | + */ | |
13 | +public interface UnitLearningService { | |
14 | + | |
15 | + /** | |
16 | + * @author : 구자현 | |
17 | + * @since : 2024.07.26 | |
18 | + * | |
19 | + * 전체 로드맵 목록 출력 | |
20 | + */ | |
21 | + List<UnitLearningVO> getAllUnitLearning(); | |
22 | + | |
23 | + /** | |
24 | + * @author : 구자현 | |
25 | + * @since : 2024.07.26 | |
26 | + * | |
27 | + * 로드맵의 상세 정보 | |
28 | + */ | |
29 | + UnitLearningVO getUnitLearningBySeq(int seq); | |
30 | + | |
31 | + /** | |
32 | + * @author : 구자현 | |
33 | + * @since : 2024.07.26 | |
34 | + * | |
35 | + * 로드맵 등록 | |
36 | + */ | |
37 | + void insertUnitLearning(UnitLearningVO unitLearningVO); | |
38 | + | |
39 | + /** | |
40 | + * @author : 구자현 | |
41 | + * @since : 2024.07.26 | |
42 | + * | |
43 | + * 로드맵 순서 수정 | |
44 | + */ | |
45 | + void updateUnitLearning(UnitLearningVO unitLearningVO); | |
46 | + | |
47 | + /** | |
48 | + * @author : 구자현 | |
49 | + * @since : 2024.07.26 | |
50 | + * | |
51 | + * 로드맵 삭제 | |
52 | + */ | |
53 | + void deleteUnitLearning(int seq); | |
54 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/unit_learning/vo/UnitLearningVO.java
... | ... | @@ -0,0 +1,36 @@ |
1 | +package com.takensoft.ai_lms.lms.unit_learning.vo; | |
2 | + | |
3 | +import lombok.AllArgsConstructor; | |
4 | +import lombok.Getter; | |
5 | +import lombok.NoArgsConstructor; | |
6 | +import lombok.Setter; | |
7 | + | |
8 | +/** | |
9 | + * @author : 구자현 | |
10 | + * @since : 2024.07.26 | |
11 | + * | |
12 | + * 로드맵 관련 VO | |
13 | + */ | |
14 | +@Setter | |
15 | +@Getter | |
16 | +@NoArgsConstructor | |
17 | +@AllArgsConstructor | |
18 | +public class UnitLearningVO { | |
19 | + // 단원 아이디 | |
20 | + private String unit_id; | |
21 | + | |
22 | + // 문제 아이디 | |
23 | + private String prblm_id; | |
24 | + | |
25 | + // 단어 관리 아이디 | |
26 | + private String wd_book_id; | |
27 | + | |
28 | + // 지문 아이디 | |
29 | + private String text_id; | |
30 | + | |
31 | + // 단원 평가 아이디 | |
32 | + private String eval_id; | |
33 | + | |
34 | + // 순서 | |
35 | + private int seq; | |
36 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/unit_learning/web/UnitLearningController.java
... | ... | @@ -0,0 +1,71 @@ |
1 | +package com.takensoft.ai_lms.lms.unit_learning.web; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.unit_learning.service.Impl.UnitLearningServiceImpl; | |
4 | +import com.takensoft.ai_lms.lms.unit_learning.vo.UnitLearningVO; | |
5 | +import lombok.RequiredArgsConstructor; | |
6 | +import org.springframework.web.bind.annotation.*; | |
7 | + | |
8 | +import java.util.List; | |
9 | + | |
10 | +@RequiredArgsConstructor | |
11 | +@RestController | |
12 | +@RequestMapping("/unitLearning") | |
13 | +public class UnitLearningController { | |
14 | + | |
15 | + private final UnitLearningServiceImpl unitLearningServiceImpl; | |
16 | + | |
17 | + /** | |
18 | + * @author : 구자현 | |
19 | + * @since : 2024.07.26 | |
20 | + * | |
21 | + * 전체 로드맵 목록 출력 | |
22 | + */ | |
23 | + @GetMapping("/findAll.json") | |
24 | + public List<UnitLearningVO> getAllUnitLearning(){ | |
25 | + return unitLearningServiceImpl.getAllUnitLearning(); | |
26 | + } | |
27 | + | |
28 | + /** | |
29 | + * @author : 구자현 | |
30 | + * @since : 2024.07.26 | |
31 | + * | |
32 | + * 로드맵의 상세 정보 | |
33 | + */ | |
34 | + @GetMapping("/find.json") | |
35 | + public UnitLearningVO getUnitLearningBySeq(@RequestBody UnitLearningVO unitLearningVO){ | |
36 | + return unitLearningServiceImpl.getUnitLearningBySeq(unitLearningVO.getSeq()); | |
37 | + } | |
38 | + | |
39 | + /** | |
40 | + * @author : 구자현 | |
41 | + * @since : 2024.07.26 | |
42 | + * | |
43 | + * 로드맵 등록 | |
44 | + */ | |
45 | + @PostMapping("/insert.json") | |
46 | + public void insertUnitLearning(@RequestBody UnitLearningVO unitLearningVO) { | |
47 | + unitLearningServiceImpl.insertUnitLearning(unitLearningVO); | |
48 | + } | |
49 | + | |
50 | + /** | |
51 | + * @author : 구자현 | |
52 | + * @since : 2024.07.26 | |
53 | + * | |
54 | + * 로드맵 순서 수정 | |
55 | + */ | |
56 | + @PutMapping("/update.json") | |
57 | + public void updateUnitLearning(@RequestBody UnitLearningVO unitLearningVO) { | |
58 | + unitLearningServiceImpl.updateUnitLearning(unitLearningVO); | |
59 | + } | |
60 | + | |
61 | + /** | |
62 | + * @author : 구자현 | |
63 | + * @since : 2024.07.26 | |
64 | + * | |
65 | + * 로드맵 삭제 | |
66 | + */ | |
67 | + @DeleteMapping("/delete.json") | |
68 | + public void deleteUnitLearning(@RequestBody UnitLearningVO unitLearningVO) { | |
69 | + unitLearningServiceImpl.deleteUnitLearning(unitLearningVO.getSeq()); | |
70 | + } | |
71 | +} |
--- src/main/java/com/takensoft/ai_lms/lms/word_book/dao/WordBookDAO.java
+++ src/main/java/com/takensoft/ai_lms/lms/word_book/dao/WordBookDAO.java
... | ... | @@ -30,4 +30,10 @@ |
30 | 30 |
// 단어장 삭제 |
31 | 31 |
int deleteWordBook(String wdBookId); |
32 | 32 |
|
33 |
+ // 단어장 검색(지문 이름으로 검색) |
|
34 |
+ List<WordBookVO> getWordBooksByTextTitle(String textTitle); |
|
35 |
+ |
|
36 |
+ // 단어장 검색(단어로 검색) |
|
37 |
+ List<WordBookVO> getWordBooksByWord(String word); |
|
38 |
+ |
|
33 | 39 |
} |
+++ src/main/java/com/takensoft/ai_lms/lms/word_book/dao/WordDAO.java
... | ... | @@ -0,0 +1,32 @@ |
1 | +package com.takensoft.ai_lms.lms.word_book.dao; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.word_book.vo.WordVO; | |
4 | +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
5 | + | |
6 | +import java.util.List; | |
7 | + | |
8 | +/** | |
9 | + * @author 권민수 | |
10 | + * @since 2024.07.30 | |
11 | + * | |
12 | + * 단어 정보 DAO 클래스 | |
13 | + */ | |
14 | + | |
15 | +@Mapper("wordDAO") | |
16 | +public interface WordDAO { | |
17 | + | |
18 | + // 단어장에 해당하는 모든 단어 목록 조회 | |
19 | + List<WordVO> getWordsByBookId(String wdBookId); | |
20 | + | |
21 | + // 단어 등록 | |
22 | + void insertWord(WordVO word); | |
23 | + | |
24 | + // 단어 수정 | |
25 | + void updateWord(WordVO word); | |
26 | + | |
27 | + // 단어 삭제 | |
28 | + void deleteWord(String wdId); | |
29 | + | |
30 | + // String generateWordId(); | |
31 | + | |
32 | +} |
--- src/main/java/com/takensoft/ai_lms/lms/word_book/service/Impl/WordBookServiceImpl.java
+++ src/main/java/com/takensoft/ai_lms/lms/word_book/service/Impl/WordBookServiceImpl.java
... | ... | @@ -50,4 +50,15 @@ |
50 | 50 |
public void deleteWordBook(String wdBookId) { |
51 | 51 |
wordBookDAO.deleteWordBook(wdBookId); |
52 | 52 |
} |
53 |
+ |
|
54 |
+ @Override |
|
55 |
+ public List<WordBookVO> getWordBooksByTextTitle(String textTitle) { |
|
56 |
+ return wordBookDAO.getWordBooksByTextTitle(textTitle); |
|
57 |
+ } |
|
58 |
+ |
|
59 |
+ @Override |
|
60 |
+ public List<WordBookVO> getWordBooksByWord(String word) { |
|
61 |
+ return wordBookDAO.getWordBooksByWord(word); |
|
62 |
+ } |
|
63 |
+ |
|
53 | 64 |
} |
+++ src/main/java/com/takensoft/ai_lms/lms/word_book/service/Impl/WordServiceImpl.java
... | ... | @@ -0,0 +1,49 @@ |
1 | +package com.takensoft.ai_lms.lms.word_book.service.Impl; | |
2 | + | |
3 | +import com.takensoft.ai_lms.common.idgen.service.IdgenService; | |
4 | +import com.takensoft.ai_lms.lms.word_book.dao.WordDAO; | |
5 | +import com.takensoft.ai_lms.lms.word_book.service.WordService; | |
6 | +import com.takensoft.ai_lms.lms.word_book.vo.WordVO; | |
7 | +import lombok.RequiredArgsConstructor; | |
8 | +import org.springframework.stereotype.Service; | |
9 | + | |
10 | +import java.util.List; | |
11 | + | |
12 | +/** | |
13 | + * @author 권민수 | |
14 | + * @since 2024.07.30 | |
15 | + * | |
16 | + * 단어 정보 관련 서비스 | |
17 | + */ | |
18 | + | |
19 | +@Service | |
20 | +@RequiredArgsConstructor | |
21 | +public class WordServiceImpl implements WordService { | |
22 | + | |
23 | + private final WordDAO wordDAO; | |
24 | + | |
25 | + private final IdgenService wordIdgn; | |
26 | + | |
27 | + @Override | |
28 | + public List<WordVO> getWordsByBookId(String wdBookId) { | |
29 | + return wordDAO.getWordsByBookId(wdBookId); | |
30 | + } | |
31 | + | |
32 | + @Override | |
33 | + public void insertWord(WordVO word) { | |
34 | + String wordId = wordIdgn.getNextStringId(); | |
35 | + word.setWdId(wordId); | |
36 | + wordDAO.insertWord(word); | |
37 | + } | |
38 | + | |
39 | + @Override | |
40 | + public void updateWord(WordVO word) { | |
41 | + wordDAO.updateWord(word); | |
42 | + } | |
43 | + | |
44 | + @Override | |
45 | + public void deleteWord(String wdId) { | |
46 | + wordDAO.deleteWord(wdId); | |
47 | + } | |
48 | + | |
49 | +} |
--- src/main/java/com/takensoft/ai_lms/lms/word_book/service/WordBookService.java
+++ src/main/java/com/takensoft/ai_lms/lms/word_book/service/WordBookService.java
... | ... | @@ -28,4 +28,11 @@ |
28 | 28 |
// 단어장 삭제 |
29 | 29 |
void deleteWordBook(String wdBookId); |
30 | 30 |
|
31 |
+ // 단어장 검색(지문 이름으로 검색) |
|
32 |
+ List<WordBookVO> getWordBooksByTextTitle(String textTitle); |
|
33 |
+ |
|
34 |
+ // 단어장 검색(단어로 검색) |
|
35 |
+ List<WordBookVO> getWordBooksByWord(String word); |
|
36 |
+ |
|
37 |
+ |
|
31 | 38 |
} |
+++ src/main/java/com/takensoft/ai_lms/lms/word_book/service/WordService.java
... | ... | @@ -0,0 +1,28 @@ |
1 | +package com.takensoft.ai_lms.lms.word_book.service; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.word_book.vo.WordVO; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | +/** | |
8 | + * @author 권민수 | |
9 | + * @since 2024.07.30 | |
10 | + * | |
11 | + * 단어 정보 Service 인터페이스 | |
12 | + */ | |
13 | + | |
14 | +public interface WordService { | |
15 | + | |
16 | + // 단어장에 해당하는 모든 단어 목록 조회 | |
17 | + List<WordVO> getWordsByBookId(String wdBookId); | |
18 | + | |
19 | + // 단어 등록 | |
20 | + void insertWord(WordVO word); | |
21 | + | |
22 | + // 단어 수정 | |
23 | + void updateWord(WordVO word); | |
24 | + | |
25 | + // 단어 삭제 | |
26 | + void deleteWord(String wdId); | |
27 | + | |
28 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/word_book/vo/WordVO.java
... | ... | @@ -0,0 +1,23 @@ |
1 | +package com.takensoft.ai_lms.lms.word_book.vo; | |
2 | + | |
3 | +import lombok.Getter; | |
4 | +import lombok.Setter; | |
5 | + | |
6 | +/** | |
7 | + * @author 권민수 | |
8 | + * @since 2024.07.30 | |
9 | + * | |
10 | + * 단어 정보 VO 클래스 | |
11 | + */ | |
12 | + | |
13 | +@Getter | |
14 | +@Setter | |
15 | +public class WordVO { | |
16 | + | |
17 | + private String wdId; | |
18 | + private String wdBookId; | |
19 | + private String wdNm; | |
20 | + private String wdMnng; | |
21 | + private String fileMngId; | |
22 | + | |
23 | +} |
--- src/main/java/com/takensoft/ai_lms/lms/word_book/web/WordBookController.java
+++ src/main/java/com/takensoft/ai_lms/lms/word_book/web/WordBookController.java
... | ... | @@ -24,16 +24,19 @@ |
24 | 24 |
|
25 | 25 |
final private WordBookService wordBookService; |
26 | 26 |
|
27 |
- @GetMapping("/findAll.json") |
|
27 |
+ // 단어장 전체 목록 조회 |
|
28 |
+ @PostMapping("/findAll.json") |
|
28 | 29 |
public List<WordBookVO> getAllWordBooks() { |
29 | 30 |
return wordBookService.getAllWordBooks(); |
30 | 31 |
} |
31 | 32 |
|
33 |
+ // 아이디에 해당하는 단어장 조회 |
|
32 | 34 |
@PostMapping("/find.json") |
33 | 35 |
public WordBookVO getWordBookById(@RequestBody WordBookVO wordBook) { |
34 | 36 |
return wordBookService.getWordBookById(wordBook.getWdBookId()); |
35 | 37 |
} |
36 | 38 |
|
39 |
+ // 단어장 등록 |
|
37 | 40 |
@PostMapping("/insert.json") |
38 | 41 |
public void insertWordBook(@RequestBody Map<String, String> req) { |
39 | 42 |
WordBookVO wordBook = new WordBookVO(); |
... | ... | @@ -43,14 +46,31 @@ |
43 | 46 |
wordBookService.insertWordBook(wordBook); |
44 | 47 |
} |
45 | 48 |
|
46 |
- @PutMapping("/update.json") |
|
49 |
+ // 단어장 수정 |
|
50 |
+ @PostMapping("/update.json") |
|
47 | 51 |
public void updateWordBook(@RequestBody WordBookVO wordBook) { |
48 | 52 |
wordBookService.updateWordBook(wordBook); |
49 | 53 |
} |
50 | 54 |
|
51 |
- @DeleteMapping("/delete.json") |
|
55 |
+ // 단어장 삭제 |
|
56 |
+ @PostMapping("/delete.json") |
|
52 | 57 |
public void deleteWordBook(@RequestBody WordBookVO wordBook) { |
53 | 58 |
wordBookService.deleteWordBook(wordBook.getWdBookId()); |
54 | 59 |
} |
55 | 60 |
|
61 |
+ // 단어장 검색(지문 이름으로 검색) |
|
62 |
+ @PostMapping("/findByTextTitle.json") |
|
63 |
+ public List<WordBookVO> getWordBooksByTextTitle(@RequestBody Map<String, String> request) { |
|
64 |
+ String textTitle = "%" + request.get("textTitle") + "%"; // 부분 검색 허용 |
|
65 |
+ return wordBookService.getWordBooksByTextTitle(textTitle); |
|
66 |
+ } |
|
67 |
+ |
|
68 |
+ // 단어장 검색(단어로 검색) |
|
69 |
+ @PostMapping("/findByWord.json") |
|
70 |
+ public List<WordBookVO> getWordBooksByWord(@RequestBody Map<String, String> request) { |
|
71 |
+ return wordBookService.getWordBooksByWord(request.get("word")); |
|
72 |
+ } |
|
73 |
+ |
|
56 | 74 |
} |
75 |
+ |
|
76 |
+// 추가 사항: 책에 소속된 단어장 리스트 가져오기(보류) |
+++ src/main/java/com/takensoft/ai_lms/lms/word_book/web/WordController.java
... | ... | @@ -0,0 +1,54 @@ |
1 | +package com.takensoft.ai_lms.lms.word_book.web; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.word_book.service.WordService; | |
4 | +import com.takensoft.ai_lms.lms.word_book.vo.WordVO; | |
5 | +import lombok.RequiredArgsConstructor; | |
6 | +import lombok.extern.slf4j.Slf4j; | |
7 | +import org.springframework.web.bind.annotation.PostMapping; | |
8 | +import org.springframework.web.bind.annotation.RequestBody; | |
9 | +import org.springframework.web.bind.annotation.RequestMapping; | |
10 | +import org.springframework.web.bind.annotation.RestController; | |
11 | + | |
12 | +import java.util.List; | |
13 | +import java.util.Map; | |
14 | + | |
15 | +/** | |
16 | + * @author 권민수 | |
17 | + * @since 2024.07.30 | |
18 | + * | |
19 | + * 단어 정보 관련 컨트롤러 클래스 | |
20 | + */ | |
21 | + | |
22 | +@RestController | |
23 | +@RequiredArgsConstructor | |
24 | +@Slf4j | |
25 | +@RequestMapping("/word") | |
26 | +public class WordController { | |
27 | + | |
28 | + private final WordService wordService; | |
29 | + | |
30 | + // 단어장 아이디에 해당하는 단어 목록 조회 | |
31 | + @PostMapping("/getWordsByBookId.json") | |
32 | + public List<WordVO> getWordsByBookId(@RequestBody Map<String, String> request) { | |
33 | + return wordService.getWordsByBookId(request.get("wdBookId")); | |
34 | + } | |
35 | + | |
36 | + // 단어 등록 | |
37 | + @PostMapping("/insert.json") | |
38 | + public void insertWord(@RequestBody WordVO word) { | |
39 | + wordService.insertWord(word); | |
40 | + } | |
41 | + | |
42 | + // 단어 수정 | |
43 | + @PostMapping("/update.json") | |
44 | + public void updateWord(@RequestBody WordVO word) { | |
45 | + wordService.updateWord(word); | |
46 | + } | |
47 | + | |
48 | + // 단어 삭제 | |
49 | + @PostMapping("/delete.json") | |
50 | + public void deleteWord(@RequestBody WordVO word) { | |
51 | + wordService.deleteWord(word.getWdId()); | |
52 | + } | |
53 | + | |
54 | +} |
--- src/main/resources/mybatis/mapper/lms/board-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/board-SQL.xml
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 |
<mapper namespace="com.takensoft.ai_lms.lms.board.dao.BoardDAO"> |
4 | 4 |
|
5 | 5 |
<resultMap id="boardMap" type="BoardVO"> |
6 |
- <result property="bbsId" column="bbs_id"/> |
|
6 |
+ <id property="bbsId" column="bbs_id"/> |
|
7 | 7 |
<result property="bbsTtl" column="bbs_ttl"/> |
8 | 8 |
<result property="bbsCls" column="bbs_cls"/> |
9 | 9 |
<result property="bbsCnt" column="bbs_cnt"/> |
... | ... | @@ -12,6 +12,23 @@ |
12 | 12 |
<result property="sclsId" column="scls_id"/> |
13 | 13 |
</resultMap> |
14 | 14 |
|
15 |
+ <resultMap id="boardResultMap" type="BoardUserVO"> |
|
16 |
+ <id property="userId" column="user_id" /> |
|
17 |
+ <result property="userNm" column="user_nm" /> |
|
18 |
+ <collection property="boardClass" ofType="BoardClassVO"> |
|
19 |
+ <id property="sclsId" column="scls_id" /> |
|
20 |
+ <result property="sclsNm" column="scls_nm" /> |
|
21 |
+ <collection property="board" ofType="BoardVO" > |
|
22 |
+ <id property="bbsId" column="bbs_id"/> |
|
23 |
+ <result property="bbsTtl" column="bbs_ttl"/> |
|
24 |
+ <result property="bbsCls" column="bbs_cls"/> |
|
25 |
+ <result property="bbsCnt" column="bbs_cnt"/> |
|
26 |
+ <result property="bbsTm" column="bbs_tm"/> |
|
27 |
+ <result property="fileMngId" column="file_mng_id"/> |
|
28 |
+ <result property="sclsId" column="scls_id"/> |
|
29 |
+ </collection> |
|
30 |
+ </collection> |
|
31 |
+ </resultMap> |
|
15 | 32 |
|
16 | 33 |
<!-- |
17 | 34 |
작성자 : 박세훈 |
... | ... | @@ -51,11 +68,22 @@ |
51 | 68 |
작성일 : 2024.07.25 |
52 | 69 |
내 용 : 게시글 전체 조회 |
53 | 70 |
--> |
54 |
- <select id="findAllBoard" resultMap="boardMap"> |
|
55 |
- SELECT * |
|
56 |
- FROM board |
|
57 |
- WHERE scls_id = #{sclsId} |
|
58 |
- ORDER BY bbs_id DESC |
|
71 |
+ <select id="findAllBoard" resultMap="boardResultMap"> |
|
72 |
+ SELECT b.bbs_id, |
|
73 |
+ b.bbs_ttl, |
|
74 |
+ b.bbs_cls, |
|
75 |
+ b.bbs_cnt, |
|
76 |
+ b.bbs_tm, |
|
77 |
+ b.file_mng_id, |
|
78 |
+ c.scls_id, |
|
79 |
+ c.scls_nm, |
|
80 |
+ u.user_id, |
|
81 |
+ u.user_nm |
|
82 |
+ FROM board b |
|
83 |
+ LEFT JOIN class c ON b.scls_id = c.scls_id |
|
84 |
+ LEFT JOIN users u ON c.user_id = u.user_id |
|
85 |
+ WHERE b.scls_id = #{sclsId} |
|
86 |
+ ORDER BY b.bbs_id DESC |
|
59 | 87 |
LIMIT #{pageSize} OFFSET #{startIndex} |
60 | 88 |
</select> |
61 | 89 |
|
... | ... | @@ -64,10 +92,21 @@ |
64 | 92 |
작성일 : 2024.07.25 |
65 | 93 |
내 용 : 게시글 상세 조회 |
66 | 94 |
--> |
67 |
- <select id="findByBoardId" parameterType="BoardVO" resultMap="boardMap"> |
|
68 |
- SELECT * |
|
69 |
- FROM board |
|
70 |
- WHERE bbs_id = #{bbsId} |
|
95 |
+ <select id="findByBoardId" resultMap="boardResultMap"> |
|
96 |
+ SELECT b.bbs_id, |
|
97 |
+ b.bbs_ttl, |
|
98 |
+ b.bbs_cls, |
|
99 |
+ b.bbs_cnt, |
|
100 |
+ b.bbs_tm, |
|
101 |
+ b.file_mng_id, |
|
102 |
+ c.scls_id, |
|
103 |
+ c.scls_nm, |
|
104 |
+ u.user_id, |
|
105 |
+ u.user_nm |
|
106 |
+ FROM board b |
|
107 |
+ LEFT JOIN class c ON b.scls_id = c.scls_id |
|
108 |
+ LEFT JOIN users u ON c.user_id = u.user_id |
|
109 |
+ WHERE b.bbs_id = #{bbsId} |
|
71 | 110 |
ORDER BY bbs_id DESC |
72 | 111 |
</select> |
73 | 112 |
|
... | ... | @@ -76,9 +115,20 @@ |
76 | 115 |
작성일 : 2024.07.26 |
77 | 116 |
내 용 : 게시글 검색 |
78 | 117 |
--> |
79 |
- <select id="searchBoard" parameterType="BoardVO" resultMap="boardMap"> |
|
80 |
- SELECT * |
|
81 |
- FROM board |
|
118 |
+ <select id="searchBoard" resultMap="boardResultMap"> |
|
119 |
+ SELECT b.bbs_id, |
|
120 |
+ b.bbs_ttl, |
|
121 |
+ b.bbs_cls, |
|
122 |
+ b.bbs_cnt, |
|
123 |
+ b.bbs_tm, |
|
124 |
+ b.file_mng_id, |
|
125 |
+ c.scls_id, |
|
126 |
+ c.scls_nm, |
|
127 |
+ u.user_id, |
|
128 |
+ u.user_nm |
|
129 |
+ FROM board b |
|
130 |
+ LEFT JOIN class c ON b.scls_id = c.scls_id |
|
131 |
+ LEFT JOIN users u ON c.user_id = u.user_id |
|
82 | 132 |
WHERE 1 = 1 |
83 | 133 |
<if test="option != null and keyword != null"> |
84 | 134 |
<choose> |
... | ... | @@ -122,4 +172,5 @@ |
122 | 172 |
DELETE FROM board WHERE bbs_id = #{bbsId} |
123 | 173 |
</delete> |
124 | 174 |
|
125 |
-</mapper>(파일 끝에 줄바꿈 문자 없음) |
|
175 |
+</mapper> |
|
176 |
+ |
--- src/main/resources/mybatis/mapper/lms/class_book-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/class_book-SQL.xml
... | ... | @@ -14,9 +14,13 @@ |
14 | 14 |
<insert id="registerBook" parameterType="String" > |
15 | 15 |
INSERT INTO class_book( book_id, |
16 | 16 |
scls_id |
17 |
- ) VALUES ( #{bookId}, |
|
18 |
- #{sclsId} |
|
19 |
- ); |
|
17 |
+ ) |
|
18 |
+ VALUES |
|
19 |
+ <foreach collection="list" item="item" separator=","> |
|
20 |
+ (#{item.bookId}, |
|
21 |
+ #{item.sclsId} |
|
22 |
+ ) |
|
23 |
+ </foreach> |
|
20 | 24 |
</insert> |
21 | 25 |
|
22 | 26 |
|
+++ src/main/resources/mybatis/mapper/lms/eval_problem-SQL.xml
... | ... | @@ -0,0 +1,32 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.ai_lms.lms.eval_problem.dao.EvalProblemDAO"> | |
4 | + | |
5 | + <!-- | |
6 | + 작 성 자 : 권지수 | |
7 | + 작 성 일 : 2024.07.29 | |
8 | + 내 용 : 단원 평가 문제 insert | |
9 | + --> | |
10 | + <insert id="insertEvalProblem" parameterType="EvalProblemVO"> | |
11 | + INSERT INTO eval_problem ( | |
12 | + eval_id, | |
13 | + prblm_id | |
14 | + ) VALUES ( | |
15 | + #{evalId}, | |
16 | + #{prblmId} | |
17 | + ) | |
18 | + </insert> | |
19 | + | |
20 | + <!-- | |
21 | + 작 성 자 : 권지수 | |
22 | + 작 성 일 : 2024.07.30 | |
23 | + 내 용 : 특정 단원의 문제 수 조회 | |
24 | + --> | |
25 | + <select id="unitProblemNum" parameterType="EvaluationVO" resultType="int"> | |
26 | + SELECT | |
27 | + COUNT(*) | |
28 | + FROM eval_problem | |
29 | + WHERE eval_id = #{evalId} | |
30 | + </select> | |
31 | + | |
32 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
--- src/main/resources/mybatis/mapper/lms/evaluation-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/evaluation-SQL.xml
... | ... | @@ -2,6 +2,89 @@ |
2 | 2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | 3 |
<mapper namespace="com.takensoft.ai_lms.lms.evaluation.dao.EvaluationDAO"> |
4 | 4 |
|
5 |
+ <!-- |
|
6 |
+ 작 성 자 : 권지수 |
|
7 |
+ 작 성 일 : 2024.07.29 |
|
8 |
+ 내 용 : 단원 평가 정보 insert |
|
9 |
+ --> |
|
10 |
+ <insert id="insertEvaluation" parameterType="EvaluationVO"> |
|
11 |
+ INSERT INTO evaluation ( |
|
12 |
+ eval_id, |
|
13 |
+ eval_type, |
|
14 |
+ unit_id |
|
15 |
+ ) VALUES ( |
|
16 |
+ #{evalId}, |
|
17 |
+ #{evalType}, |
|
18 |
+ #{unitId} |
|
19 |
+ ) |
|
20 |
+ </insert> |
|
21 |
+ |
|
22 |
+ <!-- |
|
23 |
+ 작 성 자 : 권지수 |
|
24 |
+ 작 성 일 : 2024.07.29 |
|
25 |
+ 내 용 : 단원 평가 정보 read |
|
26 |
+ --> |
|
27 |
+ <select id="evaluationInfo" parameterType="EvaluationVO" resultType="EvaluationVO"> |
|
28 |
+ SELECT |
|
29 |
+ eval_id, |
|
30 |
+ eval_type, |
|
31 |
+ unit_id |
|
32 |
+ FROM evaluation |
|
33 |
+ WHERE eval_id = #{evalId} |
|
34 |
+ </select> |
|
35 |
+ |
|
36 |
+ <!-- |
|
37 |
+ 작 성 자 : 권지수 |
|
38 |
+ 작 성 일 : 2024.07.29 |
|
39 |
+ 내 용 : 특정 단원 평가 정보 read |
|
40 |
+ --> |
|
41 |
+ <select id="evaluationUnitList" parameterType="SearchVO" resultType="EvaluationVO"> |
|
42 |
+ SELECT |
|
43 |
+ eval_id, |
|
44 |
+ eval_type, |
|
45 |
+ unit_id |
|
46 |
+ FROM evaluation |
|
47 |
+ WHERE unit_id = #{unitId} |
|
48 |
+ <if test="option != null and keyword != null"> |
|
49 |
+ <choose> |
|
50 |
+ <when test="option == 'eval_type'"> |
|
51 |
+ AND eval_type LIKE CONCAT('%', #{keyword}, '%') |
|
52 |
+ </when> |
|
53 |
+ <when test="option == 'eval_id'"> |
|
54 |
+ AND eval_id = #{keyword} |
|
55 |
+ </when> |
|
56 |
+ <otherwise> |
|
57 |
+ AND (eval_type LIKE CONCAT('%', #{keyword}, '%') |
|
58 |
+ OR eval_id = #{keyword}) |
|
59 |
+ </otherwise> |
|
60 |
+ </choose> |
|
61 |
+ </if> |
|
62 |
+ LIMIT #{pageSize} OFFSET #{startIndex} |
|
63 |
+ </select> |
|
64 |
+ |
|
65 |
+ <!-- |
|
66 |
+ 작 성 자 : 권지수 |
|
67 |
+ 작 성 일 : 2024.07.29 |
|
68 |
+ 내 용 : 단원 평가 정보 update |
|
69 |
+ --> |
|
70 |
+ <update id="updateEvaluation" parameterType="EvaluationVO"> |
|
71 |
+ UPDATE evaluation |
|
72 |
+ SET |
|
73 |
+ eval_id = #{evalId}, |
|
74 |
+ eval_type = #{evalType}, |
|
75 |
+ unit_id = #{unitId} |
|
76 |
+ WHERE eval_id = #{evalId} |
|
77 |
+ </update> |
|
78 |
+ |
|
79 |
+ <!-- |
|
80 |
+ 작 성 자 : 권지수 |
|
81 |
+ 작 성 일 : 2024.07.29 |
|
82 |
+ 내 용 : 단원 평가 정보 delete |
|
83 |
+ --> |
|
84 |
+ <delete id="deleteEvaluation" parameterType="EvaluationVO"> |
|
85 |
+ DELETE FROM evaluation |
|
86 |
+ WHERE eval_id = #{evalId} |
|
87 |
+ </delete> |
|
5 | 88 |
|
6 | 89 |
|
7 | 90 |
</mapper>(파일 끝에 줄바꿈 문자 없음) |
--- src/main/resources/mybatis/mapper/lms/problem-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/problem-SQL.xml
... | ... | @@ -2,6 +2,17 @@ |
2 | 2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | 3 |
<mapper namespace="com.takensoft.ai_lms.lms.problem.dao.ProblemDAO"> |
4 | 4 |
|
5 |
+ <!--resultMap id="problemMap" type="ProblemVO"> |
|
6 |
+ <result property="prblmId" column="prblm_id"/> |
|
7 |
+ <result property="prblmExpln" column="prblm_expln"/> |
|
8 |
+ <result property="prblmScr" column="prblm_scr"/> |
|
9 |
+ <result property="prblmHint" column="prblm_hint"/> |
|
10 |
+ <result property="prblmCmmt" column="prblm_cmmt"/> |
|
11 |
+ <result property="fileMngId" column="file_mng_id"/> |
|
12 |
+ <result property="prblmTypeId" column="prblm_type_id"/> |
|
13 |
+ <result property="prblmCtgryId" column="prblm_ctgry_id"/> |
|
14 |
+ </resultMap--> |
|
15 |
+ |
|
5 | 16 |
<!-- |
6 | 17 |
작 성 자 : 권지수 |
7 | 18 |
작 성 일 : 2024.07.25 |
... | ... | @@ -127,5 +138,85 @@ |
127 | 138 |
WHERE prblm_id = #{prblmId} |
128 | 139 |
</delete> |
129 | 140 |
|
141 |
+ <!-- |
|
142 |
+ 작 성 자 : 권지수 |
|
143 |
+ 작 성 일 : 2024.07.30 |
|
144 |
+ 내 용 : 전체 문제 목록 조회 |
|
145 |
+ --> |
|
146 |
+ <select id="problemList" parameterType="SearchVO" resultType="ProblemVO"> |
|
147 |
+ SELECT |
|
148 |
+ prblm_id, |
|
149 |
+ prblm_expln, |
|
150 |
+ prblm_scr, |
|
151 |
+ prblm_hint, |
|
152 |
+ prblm_cmmt, |
|
153 |
+ file_mng_id, |
|
154 |
+ prblm_type_id, |
|
155 |
+ prblm_ctgry_id |
|
156 |
+ FROM problem |
|
157 |
+ WHERE 1 = 1 |
|
158 |
+ <if test="option != null and keyword != null"> |
|
159 |
+ <choose> |
|
160 |
+ <when test="option == 'prblm_expln'"> |
|
161 |
+ AND prblm_expln LIKE CONCAT('%', #{keyword}, '%') |
|
162 |
+ </when> |
|
163 |
+ <when test="option == 'prblm_type_id'"> |
|
164 |
+ AND prblm_type_id = #{keyword} |
|
165 |
+ </when> |
|
166 |
+ <when test="option == 'prblm_ctgry_id'"> |
|
167 |
+ AND prblm_ctgry_id = #{keyword} |
|
168 |
+ </when> |
|
169 |
+ <otherwise> |
|
170 |
+ AND (prblm_expln LIKE CONCAT('%', #{keyword}, '%') |
|
171 |
+ OR prblm_type_id = #{keyword} |
|
172 |
+ OR prblm_ctgry_id = #{keyword}) |
|
173 |
+ </otherwise> |
|
174 |
+ </choose> |
|
175 |
+ </if> |
|
176 |
+ LIMIT #{pageSize} OFFSET #{startIndex} |
|
177 |
+ |
|
178 |
+ </select> |
|
179 |
+ |
|
180 |
+ <!-- |
|
181 |
+ 작 성 자 : 권지수 |
|
182 |
+ 작 성 일 : 2024.07.25 |
|
183 |
+ 내 용 : 특정 단원 평가의 문제 목록 조회 |
|
184 |
+ --> |
|
185 |
+ <select id="evaluationProblemList" parameterType="SearchVO" resultType="ProblemVO"> |
|
186 |
+ SELECT |
|
187 |
+ p.prblm_id AS prblmId, |
|
188 |
+ p.prblm_expln AS prblmExpln, |
|
189 |
+ p.prblm_scr AS prblmScr, |
|
190 |
+ p.prblm_hint AS prblmHint, |
|
191 |
+ p.prblm_cmmt AS prblmCmmt, |
|
192 |
+ p.file_mng_id AS fileMngId, |
|
193 |
+ p.prblm_type_id AS prblmTypeId, |
|
194 |
+ p.prblm_ctgry_id AS prblmCtgryId |
|
195 |
+ FROM |
|
196 |
+ eval_problem ep |
|
197 |
+ JOIN |
|
198 |
+ problem p ON ep.prblm_id = p.prblm_id |
|
199 |
+ WHERE |
|
200 |
+ ep.eval_id = #{evalId} |
|
201 |
+ <if test="option != null and keyword != null"> |
|
202 |
+ <choose> |
|
203 |
+ <when test="option == 'prblm_expln'"> |
|
204 |
+ AND prblm_expln LIKE CONCAT('%', #{keyword}, '%') |
|
205 |
+ </when> |
|
206 |
+ <when test="option == 'prblm_type_id'"> |
|
207 |
+ AND prblm_type_id = #{keyword} |
|
208 |
+ </when> |
|
209 |
+ <when test="option == 'prblm_ctgry_id'"> |
|
210 |
+ AND prblm_ctgry_id = #{keyword} |
|
211 |
+ </when> |
|
212 |
+ <otherwise> |
|
213 |
+ AND (prblm_expln LIKE CONCAT('%', #{keyword}, '%') |
|
214 |
+ OR prblm_type_id = #{keyword} |
|
215 |
+ OR prblm_ctgry_id = #{keyword}) |
|
216 |
+ </otherwise> |
|
217 |
+ </choose> |
|
218 |
+ </if> |
|
219 |
+ </select> |
|
220 |
+ |
|
130 | 221 |
|
131 | 222 |
</mapper>(파일 끝에 줄바꿈 문자 없음) |
--- src/main/resources/mybatis/mapper/lms/schedule-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/schedule-SQL.xml
... | ... | @@ -43,6 +43,7 @@ |
43 | 43 |
, std_id |
44 | 44 |
|
45 | 45 |
FROM schedule |
46 |
+ WHERE std_id = #{stdId} |
|
46 | 47 |
ORDER BY schdl_dt DESC |
47 | 48 |
</select> |
48 | 49 |
|
... | ... | @@ -53,8 +54,7 @@ |
53 | 54 |
--> |
54 | 55 |
<update id="scheduleUpdate" parameterType="ScheduleVO"> |
55 | 56 |
UPDATE schedule |
56 |
- SET schdl_dt = #{scheduleDt} |
|
57 |
- , schdl_unit = #{scheduleUnit} |
|
57 |
+ SET schdl_unit = #{scheduleUnit} |
|
58 | 58 |
, book_id = #{bookId} |
59 | 59 |
WHERE schdl_id = #{scheduleId} |
60 | 60 |
</update> |
--- src/main/resources/mybatis/mapper/lms/survey-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/survey-SQL.xml
... | ... | @@ -4,12 +4,20 @@ |
4 | 4 |
|
5 | 5 |
|
6 | 6 |
<resultMap id="surveyMap" type="SurveyVO"> |
7 |
- <result property="srvyId" column="srvy_id"/> |
|
7 |
+ <id property="srvyId" column="srvy_id"/> |
|
8 | 8 |
<result property="srvyType" column="srvy_type"/> |
9 | 9 |
<result property="srvyCnt" column="srvy_cnt"/> |
10 |
+ <collection property="surveyDetail" ofType="SurveyDetailVO"> |
|
11 |
+ <id property="srvyDtlId" column="srvy_dtl_id" /> |
|
12 |
+ <result property="srvyDtlCnt" column="srvy_dtl_cnt" /> |
|
13 |
+ </collection> |
|
10 | 14 |
</resultMap> |
11 | 15 |
|
12 |
- |
|
16 |
+ <!-- |
|
17 |
+ 작성자 : 박세훈 |
|
18 |
+ 작성일 : 2024.07.29 |
|
19 |
+ 내 용 : 설문 조사 정보 등록 |
|
20 |
+ --> |
|
13 | 21 |
<insert id="insertSurvey" parameterType="SurveyVO"> |
14 | 22 |
INSERT INTO survey( srvy_id, |
15 | 23 |
srvy_type, |
... | ... | @@ -19,11 +27,62 @@ |
19 | 27 |
#{srvyCnt}); |
20 | 28 |
</insert> |
21 | 29 |
|
30 |
+ |
|
31 |
+ <!-- |
|
32 |
+ 작성자 : 박세훈 |
|
33 |
+ 작성일 : 2024.07.30 |
|
34 |
+ 내 용 : 설문 조사 상세 정보 등록 |
|
35 |
+ --> |
|
36 |
+ |
|
37 |
+ <insert id="insertSurveyDetail" parameterType="java.util.List"> |
|
38 |
+ INSERT INTO survey_detail( srvy_dtl_id, |
|
39 |
+ srvy_dtl_cnt, |
|
40 |
+ srvy_id) |
|
41 |
+ VALUES |
|
42 |
+ <foreach collection="list" item="detail" separator=","> |
|
43 |
+ (#{detail.srvyDtlId}, |
|
44 |
+ #{detail.srvyDtlCnt}, |
|
45 |
+ #{detail.srvyId}) |
|
46 |
+ </foreach> |
|
47 |
+ </insert> |
|
48 |
+ |
|
49 |
+ |
|
50 |
+ |
|
51 |
+ <!-- |
|
52 |
+ 작성자 : 박세훈 |
|
53 |
+ 작성일 : 2024.07.29 |
|
54 |
+ 내 용 : 설문 조사 정보 조회 |
|
55 |
+ --> |
|
22 | 56 |
<select id="surveyList" parameterType="SurveyVO"> |
23 | 57 |
SELECT * |
24 | 58 |
FROM survey |
25 | 59 |
</select> |
26 | 60 |
|
61 |
+ <!-- |
|
62 |
+ 작성자 : 박세훈 |
|
63 |
+ 작성일 : 2024.07.30 |
|
64 |
+ 내 용 : 설문 조사 상세 정보 조회 |
|
65 |
+ --> |
|
66 |
+ |
|
67 |
+ <select id="surveyDetailList" resultMap="surveyMap"> |
|
68 |
+ SELECT s.srvy_id, |
|
69 |
+ s.srvy_cnt, |
|
70 |
+ s.srvy_type, |
|
71 |
+ d.srvy_dtl_cnt, |
|
72 |
+ d.srvy_dtl_id |
|
73 |
+ FROM survey s |
|
74 |
+ LEFT JOIN survey_detail d ON s.srvy_id = d.srvy_id |
|
75 |
+ WHERE s.srvy_id = #{srvyId} |
|
76 |
+ ORDER BY s.srvy_id DESC |
|
77 |
+ </select> |
|
78 |
+ |
|
79 |
+ |
|
80 |
+ |
|
81 |
+ <!-- |
|
82 |
+ 작성자 : 박세훈 |
|
83 |
+ 작성일 : 2024.07.29 |
|
84 |
+ 내 용 : 설문 조사 정보 수정 |
|
85 |
+ --> |
|
27 | 86 |
<update id="updateSurvey" parameterType="SurveyVO"> |
28 | 87 |
UPDATE survey |
29 | 88 |
SET srvy_type = #{srvyType}, |
... | ... | @@ -35,11 +94,21 @@ |
35 | 94 |
|
36 | 95 |
|
37 | 96 |
|
97 |
+ <!-- |
|
98 |
+ 작성자 : 박세훈 |
|
99 |
+ 작성일 : 2024.07.29 |
|
100 |
+ 내 용 : 설문 조사 정보 삭제 |
|
101 |
+ --> |
|
38 | 102 |
<delete id="deleteSurvey" parameterType="String"> |
39 | 103 |
DELETE FROM survey |
40 | 104 |
WHERE srvy_id = #{srvyId} |
41 | 105 |
</delete> |
42 | 106 |
|
107 |
+ <delete id="deleteSurveyDetail" parameterType="String"> |
|
108 |
+ DELETE FROM survey_detail |
|
109 |
+ WHERE srvy_id = #{srvyId} |
|
110 |
+ </delete> |
|
111 |
+ |
|
43 | 112 |
|
44 | 113 |
|
45 | 114 |
|
+++ src/main/resources/mybatis/mapper/lms/unit_learning-SQL.xml
... | ... | @@ -0,0 +1,97 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.ai_lms.lms.unit_learning.dao.UnitLearningDAO"> | |
4 | + | |
5 | + <resultMap id="unitLearningMap" type="UnitLearningVO"> | |
6 | + <result property="unit_id" column="unit_id"/> | |
7 | + <result property="prblm_id" column="prblm_id"/> | |
8 | + <result property="wd_book_id" column="wd_book_id"/> | |
9 | + <result property="text_id" column="text_id"/> | |
10 | + <result property="eval_id" column="eval_id"/> | |
11 | + <result property="seq" column="seq"/> | |
12 | + </resultMap> | |
13 | + | |
14 | + <!-- | |
15 | + 작 성 자 : 구자현 | |
16 | + 작 성 일 : 2024.07.26 | |
17 | + 내 용 : 전체 로드맵 목록 출력 | |
18 | + --> | |
19 | + <select id="getAllUnitLearning" resultMap="unitLearningMap"> | |
20 | + SELECT | |
21 | + unit_id, | |
22 | + prblm_id, | |
23 | + wd_book_id, | |
24 | + text_id, | |
25 | + eval_id, | |
26 | + seq | |
27 | + FROM unit_learning | |
28 | + </select> | |
29 | + | |
30 | + <!-- | |
31 | + 작 성 자 : 구자현 | |
32 | + 작 성 일 : 2024.07.26 | |
33 | + 내 용 : 로드맵의 상세 정보 | |
34 | + --> | |
35 | + <select id="getUnitLearningBySeq" parameterType="int" resultMap="unitLearningMap"> | |
36 | + SELECT | |
37 | + unit_id, | |
38 | + prblm_id, | |
39 | + wd_book_id, | |
40 | + text_id, | |
41 | + eval_id, | |
42 | + seq | |
43 | + FROM unit_learning | |
44 | + WHERE seq = #{seq} | |
45 | + </select> | |
46 | + | |
47 | + <!-- | |
48 | + 작 성 자 : 구자현 | |
49 | + 작 성 일 : 2024.07.26 | |
50 | + 내 용 : 로드맵 등록 | |
51 | + --> | |
52 | + <insert id="insertUnitLearning" parameterType="unitLearningVO"> | |
53 | + INSERT INTO unit_learning | |
54 | + ( | |
55 | + unit_id, | |
56 | + prblm_id, | |
57 | + wd_book_id, | |
58 | + text_id, | |
59 | + eval_id, | |
60 | + seq | |
61 | + ) | |
62 | + VALUES | |
63 | + ( | |
64 | + #{unit_id}, | |
65 | + #{prblm_id}, | |
66 | + #{wd_book_id}, | |
67 | + #{text_id}, | |
68 | + #{eval_id}, | |
69 | + #{seq} | |
70 | + ) | |
71 | + </insert> | |
72 | + | |
73 | + <!-- | |
74 | + 작 성 자 : 구자현 | |
75 | + 작 성 일 : 2024.07.26 | |
76 | + 내 용 : 로드맵 수정 | |
77 | + --> | |
78 | + <update id="updateUnitLearning" parameterType="unitLearningVO"> | |
79 | + UPDATE unit_learning | |
80 | + SET seq = #{seq} | |
81 | + WHERE unit_id = #{unit_id} | |
82 | + AND prblm_id = #{prblm_id} | |
83 | + AND wd_book_id = #{wd_book_id} | |
84 | + AND text_id = #{text_id} | |
85 | + AND eval_id = #{eval_id} | |
86 | + </update> | |
87 | + | |
88 | + <!-- | |
89 | + 작 성 자 : 구자현 | |
90 | + 작 성 일 : 2024.07.26 | |
91 | + 내 용 : 로드맵 삭제 | |
92 | + --> | |
93 | + <delete id="deleteUnitLearning" parameterType="int"> | |
94 | + DELETE FROM unit_learning | |
95 | + WHERE seq = #{seq} | |
96 | + </delete> | |
97 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/resources/mybatis/mapper/lms/word-SQL.xml
... | ... | @@ -0,0 +1,52 @@ |
1 | +<?xml version="1.0" encoding="UTF-8" ?> | |
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
3 | +<mapper namespace="com.takensoft.ai_lms.lms.word_book.dao.WordDAO"> | |
4 | + | |
5 | + <!-- | |
6 | + 작 성 자 : 권민수 | |
7 | + 작 성 일 : 2024.07.30 | |
8 | + 내 용 : 단어 정보 관련 sql 매핑 xml 문서 | |
9 | + --> | |
10 | + | |
11 | + <resultMap id="wordResultMap" type="WordVO"> | |
12 | + <id property="wdId" column="wd_id" /> | |
13 | + <result property="wdBookId" column="wd_book_id" /> | |
14 | + <result property="wdNm" column="wd_nm" /> | |
15 | + <result property="wdMnng" column="wd_mnng" /> | |
16 | + <result property="fileMngId" column="file_mng_id" /> | |
17 | + </resultMap> | |
18 | + | |
19 | + <select id="getWordsByBookId" resultMap="wordResultMap"> | |
20 | + SELECT * | |
21 | + FROM word | |
22 | + WHERE wd_book_id = #{wdBookId} | |
23 | + </select> | |
24 | + | |
25 | + <insert id="insertWord"> | |
26 | + INSERT INTO | |
27 | + word (wd_id, | |
28 | + wd_book_id, | |
29 | + wd_nm, | |
30 | + wd_mnng, | |
31 | + file_mng_id) | |
32 | + VALUES (#{wdId}, | |
33 | + #{wdBookId}, | |
34 | + #{wdNm}, | |
35 | + #{wdMnng}, | |
36 | + #{fileMngId}) | |
37 | + </insert> | |
38 | + | |
39 | + <update id="updateWord"> | |
40 | + UPDATE word | |
41 | + SET wd_nm = #{wdNm}, | |
42 | + wd_mnng = #{wdMnng}, | |
43 | + file_mng_id = #{fileMngId} | |
44 | + WHERE wd_id = #{wdId} | |
45 | + </update> | |
46 | + | |
47 | + <delete id="deleteWord"> | |
48 | + DELETE FROM word | |
49 | + WHERE wd_id = #{wdId} | |
50 | + </delete> | |
51 | + | |
52 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
--- src/main/resources/mybatis/mapper/lms/word_book-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/word_book-SQL.xml
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 |
내 용 : 단어장 정보 관련 sql 매핑 xml 문서 |
9 | 9 |
--> |
10 | 10 |
|
11 |
- <resultMap id="WordBookResultMap" type="com.takensoft.ai_lms.lms.word_book.vo.WordBookVO"> |
|
11 |
+ <resultMap id="WordBookResultMap" type="WordBookVO"> |
|
12 | 12 |
<id property="wdBookId" column="wd_book_id"/> |
13 | 13 |
<result property="wdBookTypeId" column="wd_book_type_id"/> |
14 | 14 |
<result property="textId" column="text_id"/> |
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 |
WHERE wd_book_id = #{wdBookId} |
35 | 35 |
</select> |
36 | 36 |
|
37 |
- <insert id="insertWordBook" parameterType="com.takensoft.ai_lms.lms.word_book.vo.WordBookVO"> |
|
37 |
+ <insert id="insertWordBook" parameterType="WordBookVO"> |
|
38 | 38 |
INSERT INTO |
39 | 39 |
ai_lms.wordbook (wd_book_id, |
40 | 40 |
wd_book_type_id, |
... | ... | @@ -46,7 +46,7 @@ |
46 | 46 |
#{userId}) |
47 | 47 |
</insert> |
48 | 48 |
|
49 |
- <update id="updateWordBook" parameterType="com.takensoft.ai_lms.lms.word_book.vo.WordBookVO"> |
|
49 |
+ <update id="updateWordBook" parameterType="WordBookVO"> |
|
50 | 50 |
UPDATE ai_lms.wordbook |
51 | 51 |
SET wd_book_type_id = #{wdBookTypeId}, |
52 | 52 |
text_id = #{textId}, |
... | ... | @@ -59,4 +59,18 @@ |
59 | 59 |
WHERE wd_book_id = #{wdBookId} |
60 | 60 |
</delete> |
61 | 61 |
|
62 |
+ <select id="getWordBooksByTextTitle" resultType="WordBookVO"> |
|
63 |
+ SELECT wb.* |
|
64 |
+ FROM wordbook wb |
|
65 |
+ JOIN text t ON wb.text_id = t.text_id |
|
66 |
+ WHERE t.text_ttl LIKE #{textTitle} |
|
67 |
+ </select> |
|
68 |
+ |
|
69 |
+ <select id="getWordBooksByWord" resultType="WordBookVO"> |
|
70 |
+ SELECT DISTINCT wb.* |
|
71 |
+ FROM wordbook wb |
|
72 |
+ JOIN word w ON wb.wd_book_id = w.wd_book_id |
|
73 |
+ WHERE w.wd_nm LIKE #{word} |
|
74 |
+ </select> |
|
75 |
+ |
|
62 | 76 |
</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?