![](/assets/images/project_default_logo.png)
--- src/main/java/com/takensoft/ai_lms/common/confing/SecurityConfig.java
+++ src/main/java/com/takensoft/ai_lms/common/confing/SecurityConfig.java
... | ... | @@ -70,6 +70,7 @@ |
70 | 70 |
.requestMatchers("/file/**").permitAll() // 파일 정보 진입 허용 |
71 | 71 |
.requestMatchers("/classes/**").permitAll() // 반 정보 진입 허용 |
72 | 72 |
.requestMatchers("/classBook/**").permitAll() // 반 - 책 정보 진입 허용 |
73 |
+ .requestMatchers("/unitLearning/**").permitAll() // 로드맵 정보 진입 허용 |
|
73 | 74 |
.requestMatchers("/unit/**").permitAll() |
74 | 75 |
.requestMatchers("/photo/**").permitAll() |
75 | 76 |
.requestMatchers("/wordbook/**").permitAll() |
--- 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 |
}(No newline at end of file) |
+++ 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/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>(No newline at end of file) |
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?