권지수
07-29
240729 권지수 문제 CRUD
@12d024b398a8ea284fd71d4fc330705409d25b76
--- src/main/java/com/takensoft/ai_lms/common/confing/SecurityConfig.java
+++ src/main/java/com/takensoft/ai_lms/common/confing/SecurityConfig.java
... | ... | @@ -64,6 +64,7 @@ |
64 | 64 |
.requestMatchers("/test/**").permitAll() |
65 | 65 |
.requestMatchers("/studentInfo/**").permitAll() // 학생 정보 진입 허용(민수) |
66 | 66 |
.requestMatchers("/board/**").permitAll() // 게시판 정보 진입 허용 |
67 |
+ .requestMatchers("/problem/**").permitAll() // 문제 정보 진입 허용 |
|
67 | 68 |
.anyRequest().authenticated()); // 나머지 경로는 인증 필요 |
68 | 69 |
|
69 | 70 |
// jwt 필터 처리 적용 |
+++ src/main/java/com/takensoft/ai_lms/lms/evaluation/dao/EvaluationDAO.java
... | ... | @@ -0,0 +1,4 @@ |
1 | +package com.takensoft.ai_lms.lms.evaluation.dao; | |
2 | + | |
3 | +public interface EvaluationDAO { | |
4 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/evaluation/service/EvaluationService.java
... | ... | @@ -0,0 +1,4 @@ |
1 | +package com.takensoft.ai_lms.lms.evaluation.service; | |
2 | + | |
3 | +public interface EvaluationService { | |
4 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/evaluation/service/Impl/EvaluationService.java
... | ... | @@ -0,0 +1,4 @@ |
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/vo/EvaluationVO.java
... | ... | @@ -0,0 +1,4 @@ |
1 | +package com.takensoft.ai_lms.lms.evaluation.vo; | |
2 | + | |
3 | +public class EvaluationVO { | |
4 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/evaluation/web/EvaluationController.java
... | ... | @@ -0,0 +1,4 @@ |
1 | +package com.takensoft.ai_lms.lms.evaluation.web; | |
2 | + | |
3 | +public class EvaluationController { | |
4 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/problem/dao/ProblemDAO.java
... | ... | @@ -0,0 +1,75 @@ |
1 | +package com.takensoft.ai_lms.lms.problem.dao; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.problem.vo.ProblemDetailVO; | |
4 | +import com.takensoft.ai_lms.lms.problem.vo.ProblemVO; | |
5 | +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
6 | + | |
7 | +import java.util.List; | |
8 | + | |
9 | +/** | |
10 | + * @author 권지수 | |
11 | + * @since 2024.07.25 | |
12 | + * | |
13 | + * 문제 DAO 클래스 | |
14 | + */ | |
15 | + | |
16 | +@Mapper("problemDAO") | |
17 | +public interface ProblemDAO { | |
18 | + | |
19 | + /** | |
20 | + * @author 권지수 | |
21 | + * @since 2024.07.25 | |
22 | + * | |
23 | + * 문제 데이터 조회 | |
24 | + */ | |
25 | + ProblemVO problemInfo(ProblemVO problemVO) throws Exception; | |
26 | + | |
27 | + /** | |
28 | + * @author 권지수 | |
29 | + * @since 2024.07.25 | |
30 | + * | |
31 | + * 문제 선지 리스트 조회 | |
32 | + */ | |
33 | + List<ProblemDetailVO> problemDetailList(ProblemVO problemVO) throws Exception; | |
34 | + | |
35 | + /** | |
36 | + * @author 권지수 | |
37 | + * @since 2024.07.26 | |
38 | + * | |
39 | + * 문제 정보 입력 | |
40 | + */ | |
41 | + int insertProblem(ProblemVO problemVO) throws Exception; | |
42 | + | |
43 | + /** | |
44 | + * @author 권지수 | |
45 | + * @since 2024.07.26 | |
46 | + * | |
47 | + * 문제 상세 정보 입력 | |
48 | + */ | |
49 | + int insertProblemDetail(ProblemDetailVO problemDetailVO) throws Exception; | |
50 | + | |
51 | + /** | |
52 | + * @author 권지수 | |
53 | + * @since 2024.07.26 | |
54 | + * | |
55 | + * 문제 정보 수정 | |
56 | + */ | |
57 | + int updateProblem(ProblemVO problemVO) throws Exception; | |
58 | + | |
59 | + /** | |
60 | + * @author 권지수 | |
61 | + * @since 2024.07.26 | |
62 | + * | |
63 | + * 문제 상세 정보 수정 | |
64 | + */ | |
65 | + int updateProblemDetail(ProblemDetailVO problemDetailVO) throws Exception; | |
66 | + | |
67 | + /** | |
68 | + * @author 권지수 | |
69 | + * @since 2024.07.26 | |
70 | + * | |
71 | + * 문제 정보 삭제 | |
72 | + */ | |
73 | + int deleteProblem(ProblemVO problemVO) throws Exception; | |
74 | + | |
75 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/problem/dao/ProblemDetailDAO.java
... | ... | @@ -0,0 +1,14 @@ |
1 | +package com.takensoft.ai_lms.lms.problem.dao; | |
2 | + | |
3 | +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
4 | + | |
5 | +/** | |
6 | + * @author 권지수 | |
7 | + * @since 2024.07.26 | |
8 | + * | |
9 | + * 문제 상세정보 DAO 클래스 | |
10 | + */ | |
11 | + | |
12 | +@Mapper("problemDetailDAO") | |
13 | +public interface ProblemDetailDAO { | |
14 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/problem/service/Impl/ProblemServiceImpl.java
... | ... | @@ -0,0 +1,109 @@ |
1 | +package com.takensoft.ai_lms.lms.problem.service.Impl; | |
2 | + | |
3 | +import com.takensoft.ai_lms.common.idgen.service.IdgenService; | |
4 | +import com.takensoft.ai_lms.lms.problem.dao.ProblemDAO; | |
5 | +import com.takensoft.ai_lms.lms.problem.service.ProblemService; | |
6 | +import com.takensoft.ai_lms.lms.problem.vo.ProblemDetailVO; | |
7 | +import com.takensoft.ai_lms.lms.problem.vo.ProblemVO; | |
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.25 | |
17 | + * | |
18 | + * 문제 ServiceImpl 클래스 | |
19 | + */ | |
20 | + | |
21 | +@Service("problemService") | |
22 | +@RequiredArgsConstructor | |
23 | +public class ProblemServiceImpl extends EgovAbstractServiceImpl implements ProblemService { | |
24 | + | |
25 | + private final ProblemDAO problemDAO; | |
26 | + private final IdgenService problemIdgn; | |
27 | + private final IdgenService problemDtlIdgn; | |
28 | + | |
29 | + | |
30 | + /** | |
31 | + * @author 권지수 | |
32 | + * @since 2024.07.25 | |
33 | + * | |
34 | + * 문제 데이터 조회 | |
35 | + */ | |
36 | + @Override | |
37 | + public ProblemVO problemInfo(ProblemVO problemVO) throws Exception { | |
38 | + return problemDAO.problemInfo(problemVO); | |
39 | + } | |
40 | + | |
41 | + /** | |
42 | + * @author 권지수 | |
43 | + * @since 2024.07.25 | |
44 | + * | |
45 | + * 문제 선지 리스트 조회 | |
46 | + */ | |
47 | + @Override | |
48 | + public List<ProblemDetailVO> problemDetailList(ProblemVO problemVO) throws Exception { | |
49 | + return problemDAO.problemDetailList(problemVO); | |
50 | + } | |
51 | + | |
52 | + /** | |
53 | + * @author 권지수 | |
54 | + * @since 2024.07.26 | |
55 | + * | |
56 | + * 문제 정보 입력 | |
57 | + */ | |
58 | + @Override | |
59 | + public int insertProblem(ProblemVO problemVO) throws Exception { | |
60 | + String problemId = problemIdgn.getNextStringId(); | |
61 | + problemVO.setPrblmId(problemId); | |
62 | + | |
63 | + return problemDAO.insertProblem(problemVO); | |
64 | + } | |
65 | + | |
66 | + /** | |
67 | + * @author 권지수 | |
68 | + * @since 2024.07.26 | |
69 | + * | |
70 | + * 문제 상세 정보 입력 | |
71 | + */ | |
72 | + @Override | |
73 | + public int insertProblemDetail(ProblemDetailVO problemDetailVO) throws Exception { | |
74 | + String problemDtlId = problemDtlIdgn.getNextStringId(); | |
75 | + problemDetailVO.setPrblmDtlId(problemDtlId); | |
76 | + | |
77 | + return problemDAO.insertProblemDetail(problemDetailVO); | |
78 | + } | |
79 | + | |
80 | + /** | |
81 | + * @author 권지수 | |
82 | + * @since 2024.07.26 | |
83 | + * | |
84 | + * 문제 정보 수정 | |
85 | + */ | |
86 | + public int updateProblem(ProblemVO problemVO) throws Exception { | |
87 | + return problemDAO.updateProblem(problemVO); | |
88 | + } | |
89 | + | |
90 | + /** | |
91 | + * @author 권지수 | |
92 | + * @since 2024.07.26 | |
93 | + * | |
94 | + * 문제 상세 정보 수정 | |
95 | + */ | |
96 | + public int updateProblemDetail(ProblemDetailVO problemDetailVO) throws Exception { | |
97 | + return problemDAO.updateProblemDetail(problemDetailVO); | |
98 | + } | |
99 | + | |
100 | + /** | |
101 | + * @author 권지수 | |
102 | + * @since 2024.07.26 | |
103 | + * | |
104 | + * 문제 정보 삭제 | |
105 | + */ | |
106 | + public int deleteProblem(ProblemVO problemVO) throws Exception { | |
107 | + return problemDAO.deleteProblem(problemVO); | |
108 | + } | |
109 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/problem/service/ProblemService.java
... | ... | @@ -0,0 +1,73 @@ |
1 | +package com.takensoft.ai_lms.lms.problem.service; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.problem.vo.ProblemDetailVO; | |
4 | +import com.takensoft.ai_lms.lms.problem.vo.ProblemVO; | |
5 | + | |
6 | +import java.util.HashMap; | |
7 | +import java.util.List; | |
8 | + | |
9 | +/** | |
10 | + * @author 권지수 | |
11 | + * @since 2024.07.25 | |
12 | + * | |
13 | + * 문제 Service 클래스 | |
14 | + */ | |
15 | + | |
16 | +public interface ProblemService { | |
17 | + | |
18 | + /** | |
19 | + * @author 권지수 | |
20 | + * @since 2024.07.25 | |
21 | + * | |
22 | + * 문제 데이터 조회 | |
23 | + */ | |
24 | + ProblemVO problemInfo(ProblemVO problemVO) throws Exception; | |
25 | + | |
26 | + /** | |
27 | + * @author 권지수 | |
28 | + * @since 2024.07.25 | |
29 | + * | |
30 | + * 문제 선지 리스트 조회 | |
31 | + */ | |
32 | + List<ProblemDetailVO> problemDetailList(ProblemVO problemVO) throws Exception; | |
33 | + | |
34 | + /** | |
35 | + * @author 권지수 | |
36 | + * @since 2024.07.26 | |
37 | + * | |
38 | + * 문제 정보 입력 | |
39 | + */ | |
40 | + int insertProblem(ProblemVO problemVO) throws Exception; | |
41 | + | |
42 | + /** | |
43 | + * @author 권지수 | |
44 | + * @since 2024.07.26 | |
45 | + * | |
46 | + * 문제 상세 정보 입력 | |
47 | + */ | |
48 | + int insertProblemDetail(ProblemDetailVO problemDetailVO) throws Exception; | |
49 | + | |
50 | + /** | |
51 | + * @author 권지수 | |
52 | + * @since 2024.07.26 | |
53 | + * | |
54 | + * 문제 정보 수정 | |
55 | + */ | |
56 | + int updateProblem(ProblemVO problemVO) throws Exception; | |
57 | + | |
58 | + /** | |
59 | + * @author 권지수 | |
60 | + * @since 2024.07.26 | |
61 | + * | |
62 | + * 문제 상세 정보 수정 | |
63 | + */ | |
64 | + int updateProblemDetail(ProblemDetailVO problemDetailVO) throws Exception; | |
65 | + | |
66 | + /** | |
67 | + * @author 권지수 | |
68 | + * @since 2024.07.26 | |
69 | + * | |
70 | + * 문제 정보 삭제 | |
71 | + */ | |
72 | + int deleteProblem(ProblemVO problemVO) throws Exception; | |
73 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/problem/vo/ProblemDetailVO.java
... | ... | @@ -0,0 +1,23 @@ |
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 ProblemDetailVO { | |
13 | + // 문제 상세 아이디 | |
14 | + private String prblmDtlId; | |
15 | + // 문제 아이디 | |
16 | + private String prblmId; | |
17 | + // 문제 상세 텍스트 | |
18 | + private String prblmDtlExpln; | |
19 | + // 정답 여부 | |
20 | + private String prblmYn; | |
21 | + // 파일 관리 아이디 | |
22 | + private String fileMngId; | |
23 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/problem/vo/ProblemVO.java
... | ... | @@ -0,0 +1,29 @@ |
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 ProblemVO { | |
13 | + // 문제 아이디 | |
14 | + private String prblmId; | |
15 | + // 문제 내용 | |
16 | + private String prblmExpln; | |
17 | + // 문제 점수 | |
18 | + private int prblmScr; | |
19 | + // 문제 힌트 | |
20 | + private String prblmHint; | |
21 | + // 문제 해설 | |
22 | + private String prblmCmmt; | |
23 | + // 파일 관리 아이디 | |
24 | + private String fileMngId; | |
25 | + // 유형 아이디 | |
26 | + private String prblmTypeId; | |
27 | + // 카테고리 아이디 | |
28 | + private String prblmCtgryId; | |
29 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/problem/web/ProblemController.java
... | ... | @@ -0,0 +1,139 @@ |
1 | +package com.takensoft.ai_lms.lms.problem.web; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.auth.vo.UserVO; | |
4 | +import com.takensoft.ai_lms.lms.problem.service.ProblemService; | |
5 | +import com.takensoft.ai_lms.lms.problem.vo.ProblemDetailVO; | |
6 | +import com.takensoft.ai_lms.lms.problem.vo.ProblemVO; | |
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.HashMap; | |
17 | +import java.util.List; | |
18 | + | |
19 | +/** | |
20 | + * @author 권지수 | |
21 | + * @since 2024.07.25 | |
22 | + * | |
23 | + * 문제 Controller 클래스 | |
24 | + */ | |
25 | + | |
26 | +@RestController | |
27 | +@RequiredArgsConstructor | |
28 | +@Slf4j | |
29 | +@RequestMapping(value = "/problem") | |
30 | +public class ProblemController { | |
31 | + | |
32 | + private final ProblemService problemService; | |
33 | + | |
34 | + /** | |
35 | + * @author 권지수 | |
36 | + * @since 2024.07.25 | |
37 | + * | |
38 | + * 문제 정보 조회 | |
39 | + */ | |
40 | + @PostMapping(path = "/problemInfo.json") | |
41 | + public ResponseEntity<?> problemInfo(@RequestBody ProblemVO problemVO) throws Exception { | |
42 | + HashMap<String, Object> result = new HashMap<>(); | |
43 | + | |
44 | + result.put("problem", problemService.problemInfo(problemVO)); | |
45 | + result.put("problemDetail", problemService.problemDetailList(problemVO)); | |
46 | + | |
47 | + return new ResponseEntity<>(result, HttpStatus.OK); | |
48 | + } | |
49 | + | |
50 | + /** | |
51 | + * @author 권지수 | |
52 | + * @since 2024.07.26 | |
53 | + * | |
54 | + * 문제 정보 입력 | |
55 | + */ | |
56 | + @PostMapping(path = "/insertProblem.json") | |
57 | + public ResponseEntity<?> insertProblem(@RequestBody ProblemVO problemVO) throws Exception { | |
58 | + int result = problemService.insertProblem(problemVO); | |
59 | + | |
60 | + return new ResponseEntity<>(result, HttpStatus.OK); | |
61 | + } | |
62 | + | |
63 | + /** | |
64 | + * @author 권지수 | |
65 | + * @since 2024.07.26 | |
66 | + * | |
67 | + * 문제 상세 정보 입력 | |
68 | + */ | |
69 | +// @PostMapping(path = "/insertProblemDetail.json") | |
70 | +// public ResponseEntity<?> insertProblemDetail(@RequestBody ProblemDetailVO problemDetailVO) throws Exception { | |
71 | +// int result = problemService.insertProblemDetail(problemDetailVO); | |
72 | +// | |
73 | +// return new ResponseEntity<>(result, HttpStatus.OK); | |
74 | +// } | |
75 | + | |
76 | + /** | |
77 | + * @author 권지수 | |
78 | + * @since 2024.07.26 | |
79 | + * | |
80 | + * 문제 상세 정보 입력 (리스트) | |
81 | + */ | |
82 | + @PostMapping(path = "/insertProblemDetail.json") | |
83 | + public ResponseEntity<?> insertProblemDetail(@RequestBody List<ProblemDetailVO> problemDetailVOList) throws Exception { | |
84 | + int result = 0; | |
85 | + | |
86 | + for(ProblemDetailVO problemDetailVO: problemDetailVOList) { | |
87 | + problemService.insertProblemDetail(problemDetailVO); | |
88 | + result++; | |
89 | + } | |
90 | + | |
91 | + //String result = | |
92 | + | |
93 | + return new ResponseEntity<>(result, HttpStatus.OK); | |
94 | + } | |
95 | + | |
96 | + /** | |
97 | + * @author 권지수 | |
98 | + * @since 2024.07.26 | |
99 | + * | |
100 | + * 문제 정보 수정 | |
101 | + */ | |
102 | + @PostMapping(path = "/updateProblem.json") | |
103 | + public ResponseEntity<?> updateProblem(@RequestBody ProblemVO problemVO) throws Exception { | |
104 | + int result = problemService.updateProblem(problemVO); | |
105 | + | |
106 | + return new ResponseEntity<>(result, HttpStatus.OK); | |
107 | + } | |
108 | + | |
109 | + /** | |
110 | + * @author 권지수 | |
111 | + * @since 2024.07.26 | |
112 | + * | |
113 | + * 문제 상세 정보 수정 (리스트) | |
114 | + */ | |
115 | + @PostMapping(path = "/updateProblemDetail.json") | |
116 | + public ResponseEntity<?> updateProblemDetail(@RequestBody List<ProblemDetailVO> problemDetailVOList) throws Exception { | |
117 | + int result = 0; | |
118 | + | |
119 | + for(ProblemDetailVO problemDetailVO: problemDetailVOList) { | |
120 | + problemService.updateProblemDetail(problemDetailVO); | |
121 | + result++; | |
122 | + } | |
123 | + | |
124 | + return new ResponseEntity<>(result, HttpStatus.OK); | |
125 | + } | |
126 | + | |
127 | + /** | |
128 | + * @author 권지수 | |
129 | + * @since 2024.07.26 | |
130 | + * | |
131 | + * 문제 정보 삭제 | |
132 | + */ | |
133 | + @PostMapping(path = "/deleteProblem.json") | |
134 | + public ResponseEntity<?> deleteProblem(@RequestBody ProblemVO problemVO) throws Exception { | |
135 | + int result = problemService.deleteProblem(problemVO); | |
136 | + | |
137 | + return new ResponseEntity<>(result, HttpStatus.OK); | |
138 | + } | |
139 | +} |
+++ src/main/resources/mybatis/mapper/lms/evaluation-SQL.xml
... | ... | @@ -0,0 +1,7 @@ |
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.evaluation.dao.EvaluationDAO"> | |
4 | + | |
5 | + | |
6 | + | |
7 | +</mapper>(파일 끝에 줄바꿈 문자 없음) |
+++ src/main/resources/mybatis/mapper/lms/problem-SQL.xml
... | ... | @@ -0,0 +1,131 @@ |
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.problem.dao.ProblemDAO"> | |
4 | + | |
5 | + <!-- | |
6 | + 작 성 자 : 권지수 | |
7 | + 작 성 일 : 2024.07.25 | |
8 | + 내 용 : 문제 정보 read | |
9 | + --> | |
10 | + <select id="problemInfo" parameterType="ProblemVO" resultType="ProblemVO"> | |
11 | + SELECT | |
12 | + prblm_id, | |
13 | + prblm_expln, | |
14 | + prblm_scr, | |
15 | + prblm_hint, | |
16 | + prblm_cmmt, | |
17 | + file_mng_id, | |
18 | + prblm_type_id, | |
19 | + prblm_ctgry_id | |
20 | + FROM problem | |
21 | + WHERE prblm_id = #{prblmId} | |
22 | + </select> | |
23 | + | |
24 | + <!-- | |
25 | + 작 성 자 : 권지수 | |
26 | + 작 성 일 : 2024.07.25 | |
27 | + 내 용 : 문제 선지 리스트 | |
28 | + --> | |
29 | + <select id="problemDetailList" parameterType="ProblemDetailVO" resultType="ProblemDetailVO"> | |
30 | + SELECT | |
31 | + prblm_dtl_id, | |
32 | + prblm_id, | |
33 | + prblm_dtl_expln, | |
34 | + prblm_yn, | |
35 | + file_mng_id | |
36 | + FROM problem_detail | |
37 | + WHERE prblm_id = #{prblmId} | |
38 | + </select> | |
39 | + | |
40 | + <!-- | |
41 | + 작 성 자 : 권지수 | |
42 | + 작 성 일 : 2024.07.26 | |
43 | + 내 용 : 문제 정보 insert | |
44 | + --> | |
45 | + <insert id="insertProblem" parameterType="ProblemVO"> | |
46 | + INSERT INTO problem ( | |
47 | + prblm_id, | |
48 | + prblm_expln, | |
49 | + prblm_scr, | |
50 | + prblm_hint, | |
51 | + prblm_cmmt, | |
52 | + file_mng_id, | |
53 | + prblm_type_id, | |
54 | + prblm_ctgry_id | |
55 | + ) VALUES ( | |
56 | + #{prblmId}, | |
57 | + #{prblmExpln}, | |
58 | + #{prblmScr}, | |
59 | + #{prblmHint}, | |
60 | + #{prblmCmmt}, | |
61 | + #{fileMngId}, | |
62 | + #{prblmTypeId}, | |
63 | + #{prblmCtgryId} | |
64 | + ) | |
65 | + </insert> | |
66 | + | |
67 | + <!-- | |
68 | + 작 성 자 : 권지수 | |
69 | + 작 성 일 : 2024.07.26 | |
70 | + 내 용 : 문제 상세 정보 insert | |
71 | + --> | |
72 | + <insert id="insertProblemDetail" parameterType="ProblemDetailVO"> | |
73 | + INSERT INTO problem_detail ( | |
74 | + prblm_dtl_id, | |
75 | + prblm_id, | |
76 | + prblm_dtl_expln, | |
77 | + prblm_yn, | |
78 | + file_mng_id | |
79 | + ) VALUES ( | |
80 | + #{prblmDtlId}, | |
81 | + #{prblmId}, | |
82 | + #{prblmDtlExpln}, | |
83 | + #{prblmYn}, | |
84 | + #{fileMngId} | |
85 | + ) | |
86 | + </insert> | |
87 | + | |
88 | + <!-- | |
89 | + 작 성 자 : 권지수 | |
90 | + 작 성 일 : 2024.07.26 | |
91 | + 내 용 : 문제 정보 update | |
92 | + --> | |
93 | + <update id="updateProblem" parameterType="ProblemVO"> | |
94 | + UPDATE problem | |
95 | + SET | |
96 | + prblm_expln = #{prblmExpln}, | |
97 | + prblm_scr = #{prblmScr}, | |
98 | + prblm_hint = #{prblmHint}, | |
99 | + prblm_cmmt = #{prblmCmmt}, | |
100 | + file_mng_id = #{fileMngId}, | |
101 | + prblm_type_id = #{prblmTypeId}, | |
102 | + prblm_ctgry_id = #{prblmCtgryId} | |
103 | + WHERE prblm_id = #{prblmId} | |
104 | + </update> | |
105 | + | |
106 | + <!-- | |
107 | + 작 성 자 : 권지수 | |
108 | + 작 성 일 : 2024.07.26 | |
109 | + 내 용 : 문제 상세 정보 update | |
110 | + --> | |
111 | + <update id="updateProblemDetail" parameterType="ProblemDetailVO"> | |
112 | + UPDATE problem_detail | |
113 | + SET | |
114 | + prblm_dtl_expln = #{prblmDtlExpln}, | |
115 | + prblm_yn = #{prblmYn}, | |
116 | + file_mng_id = #{fileMngId} | |
117 | + WHERE prblm_dtl_id = #{prblmDtlId} | |
118 | + </update> | |
119 | + | |
120 | + <!-- | |
121 | + 작 성 자 : 권지수 | |
122 | + 작 성 일 : 2024.07.26 | |
123 | + 내 용 : 문제 정보 delete | |
124 | + --> | |
125 | + <delete id="deleteProblem" parameterType="problemVO"> | |
126 | + DELETE FROM problem | |
127 | + WHERE prblm_id = #{prblmId} | |
128 | + </delete> | |
129 | + | |
130 | + | |
131 | +</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?