
Merge branch 'master' of http://210.180.118.83/sjbang/lms_back
@bd5e457fafc7971584f7c1691890d8fb9a87e629
--- 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,7 @@ |
74 | 74 |
.requestMatchers("/unit/**").permitAll() |
75 | 75 |
.requestMatchers("/photo/**").permitAll() |
76 | 76 |
.requestMatchers("/wordbook/**").permitAll() |
77 |
+ .requestMatchers("/survey/**").permitAll() |
|
77 | 78 |
.anyRequest().authenticated()); // 나머지 경로는 인증 필요 |
78 | 79 |
|
79 | 80 |
// jwt 필터 처리 적용 |
--- src/main/java/com/takensoft/ai_lms/common/idgen/context/ContextIdgen.java
+++ src/main/java/com/takensoft/ai_lms/common/idgen/context/ContextIdgen.java
... | ... | @@ -216,6 +216,17 @@ |
216 | 216 |
idgenServiceImpl.setTblNm("PHOTO_ID"); |
217 | 217 |
return idgenServiceImpl; |
218 | 218 |
} |
219 |
- |
|
219 |
+ |
|
220 |
+ // 설문 조사 정보 |
|
221 |
+ @Bean(name = "surveyIdgn") |
|
222 |
+ public IdgenService survey() { |
|
223 |
+ IdgenService idgenServiceImpl = new IdgenService(); |
|
224 |
+ idgenServiceImpl.setCipers(15); |
|
225 |
+ idgenServiceImpl.setFillChar('0'); |
|
226 |
+ idgenServiceImpl.setPrefix("SURVEY_"); |
|
227 |
+ idgenServiceImpl.setTblNm("SURVEY_ID"); |
|
228 |
+ return idgenServiceImpl; |
|
229 |
+ } |
|
230 |
+ |
|
220 | 231 |
|
221 | 232 |
}(No newline at end of file) |
--- 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
... | ... | @@ -69,7 +69,7 @@ |
69 | 69 |
* |
70 | 70 |
* 반 교재 삭제 |
71 | 71 |
*/ |
72 |
- @DeleteMapping("/deleteClassBook.json") |
|
72 |
+ @DeleteMapping("/delete.json") |
|
73 | 73 |
public String deleteClassBook(@RequestBody ClassBookVO classBookVO) throws Exception { |
74 | 74 |
try { |
75 | 75 |
int result = classBookService.deleteClassBook(classBookVO); |
--- src/main/java/com/takensoft/ai_lms/lms/photo/service/Impl/PhotoServiceImpl.java
+++ src/main/java/com/takensoft/ai_lms/lms/photo/service/Impl/PhotoServiceImpl.java
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 |
} |
26 | 26 |
|
27 | 27 |
@Override |
28 |
- public int insertphoto(PhotoVO photoVO) throws Exception { |
|
28 |
+ public int insertPhoto(PhotoVO photoVO) throws Exception { |
|
29 | 29 |
String photoId = photoIdgn.getNextStringId(); |
30 | 30 |
photoVO.setPhotoId(photoId); |
31 | 31 |
int result = photoDAO.insertPhoto(photoVO); |
... | ... | @@ -33,13 +33,13 @@ |
33 | 33 |
} |
34 | 34 |
|
35 | 35 |
@Override |
36 |
- public int updatephoto(PhotoVO photoVO) throws Exception { |
|
36 |
+ public int updatePhoto(PhotoVO photoVO) throws Exception { |
|
37 | 37 |
int result = photoDAO.updatePhoto(photoVO); |
38 | 38 |
return result; |
39 | 39 |
} |
40 | 40 |
|
41 | 41 |
@Override |
42 |
- public int deletephoto(PhotoVO photoVO) throws Exception { |
|
42 |
+ public int deletePhoto(PhotoVO photoVO) throws Exception { |
|
43 | 43 |
int result = photoDAO.deletePhoto(photoVO); |
44 | 44 |
return result; |
45 | 45 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/photo/service/PhotoService.java
+++ src/main/java/com/takensoft/ai_lms/lms/photo/service/PhotoService.java
... | ... | @@ -8,11 +8,11 @@ |
8 | 8 |
|
9 | 9 |
List<PhotoVO> photoList () throws Exception; |
10 | 10 |
|
11 |
- int insertphoto(PhotoVO photoVO) throws Exception; |
|
11 |
+ int insertPhoto(PhotoVO photoVO) throws Exception; |
|
12 | 12 |
|
13 |
- int updatephoto(PhotoVO photoVO) throws Exception; |
|
13 |
+ int updatePhoto(PhotoVO photoVO) throws Exception; |
|
14 | 14 |
|
15 |
- int deletephoto(PhotoVO photoVO) throws Exception; |
|
15 |
+ int deletePhoto(PhotoVO photoVO) throws Exception; |
|
16 | 16 |
|
17 | 17 |
List<PhotoVO> photoDetail (PhotoVO photoVO) throws Exception; |
18 | 18 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/photo/web/PhotoController.java
+++ src/main/java/com/takensoft/ai_lms/lms/photo/web/PhotoController.java
... | ... | @@ -30,19 +30,19 @@ |
30 | 30 |
|
31 | 31 |
@PostMapping(path = "/insertPhoto.json") |
32 | 32 |
public ResponseEntity<?> insertUnit(@RequestBody PhotoVO photoVO) throws Exception { |
33 |
- int result = photoService.insertphoto(photoVO); |
|
33 |
+ int result = photoService.insertPhoto(photoVO); |
|
34 | 34 |
return new ResponseEntity<>(result, HttpStatus.OK); |
35 | 35 |
} |
36 | 36 |
|
37 | 37 |
@PostMapping(path = "/updatePhoto.json") |
38 | 38 |
public ResponseEntity<?> updateUnit(@RequestBody PhotoVO photoVO) throws Exception { |
39 |
- int result = photoService.updatephoto(photoVO); |
|
39 |
+ int result = photoService.updatePhoto(photoVO); |
|
40 | 40 |
return new ResponseEntity<>(result, HttpStatus.OK); |
41 | 41 |
} |
42 | 42 |
|
43 | 43 |
@PostMapping(path = "/deletePhoto.json") |
44 | 44 |
public ResponseEntity<?> deleteUnit(@RequestBody PhotoVO photoVO) throws Exception { |
45 |
- int result = photoService.deletephoto(photoVO); |
|
45 |
+ int result = photoService.deletePhoto(photoVO); |
|
46 | 46 |
return new ResponseEntity<>(result, HttpStatus.OK); |
47 | 47 |
} |
48 | 48 |
|
--- src/main/java/com/takensoft/ai_lms/lms/photoMng/dao/PhotoMngDAO.java
+++ src/main/java/com/takensoft/ai_lms/lms/photoMng/dao/PhotoMngDAO.java
... | ... | @@ -1,8 +1,19 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.photoMng.dao; |
2 | 2 |
|
3 |
+import com.takensoft.ai_lms.lms.photoMng.vo.PhotoMngVO; |
|
3 | 4 |
import org.egovframe.rte.psl.dataaccess.mapper.Mapper; |
5 |
+ |
|
6 |
+import java.util.List; |
|
4 | 7 |
|
5 | 8 |
@Mapper("photoMngDAO") |
6 | 9 |
public interface PhotoMngDAO { |
10 |
+ List<PhotoMngVO> photoMngList () throws Exception; |
|
7 | 11 |
|
12 |
+ int insertPhotoMng(PhotoMngVO photoMngVO) throws Exception; |
|
13 |
+ |
|
14 |
+ int updatePhotoMng(PhotoMngVO photoMngVO) throws Exception; |
|
15 |
+ |
|
16 |
+ int deletePhotoMng(PhotoMngVO photoMngVO) throws Exception; |
|
17 |
+ |
|
18 |
+ List<PhotoMngVO> photoMngDetail (PhotoMngVO photoMngVO) throws Exception; |
|
8 | 19 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/photoMng/service/Impl/PhotoMngServiceImpl.java
+++ src/main/java/com/takensoft/ai_lms/lms/photoMng/service/Impl/PhotoMngServiceImpl.java
... | ... | @@ -1,4 +1,49 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.photoMng.service.Impl; |
2 | 2 |
|
3 |
-public class PhotoMngServiceImpl { |
|
3 |
+import com.takensoft.ai_lms.common.idgen.service.IdgenService; |
|
4 |
+import com.takensoft.ai_lms.lms.photoMng.dao.PhotoMngDAO; |
|
5 |
+import com.takensoft.ai_lms.lms.photoMng.service.PhotoMngService; |
|
6 |
+import com.takensoft.ai_lms.lms.photoMng.vo.PhotoMngVO; |
|
7 |
+import lombok.RequiredArgsConstructor; |
|
8 |
+import org.egovframe.rte.fdl.cmmn.EgovAbstractServiceImpl; |
|
9 |
+import org.springframework.stereotype.Service; |
|
10 |
+ |
|
11 |
+import java.util.List; |
|
12 |
+ |
|
13 |
+@Service("photoMngService") |
|
14 |
+@RequiredArgsConstructor |
|
15 |
+public class PhotoMngServiceImpl extends EgovAbstractServiceImpl implements PhotoMngService { |
|
16 |
+ |
|
17 |
+ private final PhotoMngDAO photoMngDAO; |
|
18 |
+ private final IdgenService photoMngIdgn; |
|
19 |
+ |
|
20 |
+ @Override |
|
21 |
+ public List<PhotoMngVO> photoMngList() throws Exception { |
|
22 |
+ return photoMngDAO.photoMngList(); |
|
23 |
+ } |
|
24 |
+ |
|
25 |
+ @Override |
|
26 |
+ public int insertPhotoMng(PhotoMngVO photoMngVO) throws Exception { |
|
27 |
+ String photoMngId = photoMngIdgn.getNextStringId(); |
|
28 |
+ photoMngVO.setPhotoMngId(photoMngId); |
|
29 |
+ int result = photoMngDAO.insertPhotoMng(photoMngVO); |
|
30 |
+ return result; |
|
31 |
+ } |
|
32 |
+ |
|
33 |
+ @Override |
|
34 |
+ public int updatePhotoMng(PhotoMngVO photoMngVO) throws Exception { |
|
35 |
+ int result = photoMngDAO.updatePhotoMng(photoMngVO); |
|
36 |
+ return result; |
|
37 |
+ } |
|
38 |
+ |
|
39 |
+ @Override |
|
40 |
+ public int deletePhotoMng(PhotoMngVO photoMngVO) throws Exception { |
|
41 |
+ int result = photoMngDAO.deletePhotoMng(photoMngVO); |
|
42 |
+ return result; |
|
43 |
+ } |
|
44 |
+ |
|
45 |
+ @Override |
|
46 |
+ public List<PhotoMngVO> photoMngDetail(PhotoMngVO photoMngVO) throws Exception { |
|
47 |
+ return photoMngDAO.photoMngDetail(photoMngVO); |
|
48 |
+ } |
|
4 | 49 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/photoMng/service/PhotoMngService.java
+++ src/main/java/com/takensoft/ai_lms/lms/photoMng/service/PhotoMngService.java
... | ... | @@ -1,4 +1,18 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.photoMng.service; |
2 | 2 |
|
3 |
+import com.takensoft.ai_lms.lms.photoMng.vo.PhotoMngVO; |
|
4 |
+ |
|
5 |
+import java.util.List; |
|
6 |
+ |
|
3 | 7 |
public interface PhotoMngService { |
8 |
+ |
|
9 |
+ List<PhotoMngVO> photoMngList () throws Exception; |
|
10 |
+ |
|
11 |
+ int insertPhotoMng(PhotoMngVO photoMngVO) throws Exception; |
|
12 |
+ |
|
13 |
+ int updatePhotoMng(PhotoMngVO photoMngVO) throws Exception; |
|
14 |
+ |
|
15 |
+ int deletePhotoMng(PhotoMngVO photoMngVO) throws Exception; |
|
16 |
+ |
|
17 |
+ List<PhotoMngVO> photoMngDetail (PhotoMngVO photoMngVO) throws Exception; |
|
4 | 18 |
} |
--- src/main/java/com/takensoft/ai_lms/lms/photoMng/web/PhotoMngController.java
+++ src/main/java/com/takensoft/ai_lms/lms/photoMng/web/PhotoMngController.java
... | ... | @@ -1,4 +1,56 @@ |
1 | 1 |
package com.takensoft.ai_lms.lms.photoMng.web; |
2 | 2 |
|
3 |
+import com.takensoft.ai_lms.lms.photo.service.PhotoService; |
|
4 |
+import com.takensoft.ai_lms.lms.photo.vo.PhotoVO; |
|
5 |
+import com.takensoft.ai_lms.lms.photoMng.service.PhotoMngService; |
|
6 |
+import com.takensoft.ai_lms.lms.photoMng.vo.PhotoMngVO; |
|
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 |
+@RestController |
|
19 |
+@RequiredArgsConstructor |
|
20 |
+@Slf4j |
|
21 |
+@RequestMapping(value="/photoMng") |
|
3 | 22 |
public class PhotoMngController { |
23 |
+ |
|
24 |
+ private final PhotoMngService photoMngService; |
|
25 |
+ |
|
26 |
+ |
|
27 |
+ @PostMapping(path = "/photoMngList.json") |
|
28 |
+ public ResponseEntity<?> photoMngList() throws Exception { |
|
29 |
+ List<PhotoMngVO> result = photoMngService.photoMngList(); |
|
30 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
31 |
+ } |
|
32 |
+ |
|
33 |
+ @PostMapping(path = "/insertPhotoMng.json") |
|
34 |
+ public ResponseEntity<?> insertPhotoMng(@RequestBody PhotoMngVO photoMngVO) throws Exception { |
|
35 |
+ int result = photoMngService.insertPhotoMng(photoMngVO); |
|
36 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
37 |
+ } |
|
38 |
+ |
|
39 |
+ @PostMapping(path = "/updatePhotoMng.json") |
|
40 |
+ public ResponseEntity<?> updatePhotoMng(@RequestBody PhotoMngVO photoMngVO) throws Exception { |
|
41 |
+ int result = photoMngService.updatePhotoMng(photoMngVO); |
|
42 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
43 |
+ } |
|
44 |
+ |
|
45 |
+ @PostMapping(path = "/deletePhotoMng.json") |
|
46 |
+ public ResponseEntity<?> deletePhotoMng(@RequestBody PhotoMngVO photoMngVO) throws Exception { |
|
47 |
+ int result = photoMngService.deletePhotoMng(photoMngVO); |
|
48 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
49 |
+ } |
|
50 |
+ |
|
51 |
+ @PostMapping(path = "/photoMngDetail.json") |
|
52 |
+ public ResponseEntity<?> photoMngDetail(@RequestBody PhotoMngVO photoMngVO) throws Exception { |
|
53 |
+ List<PhotoMngVO> result = photoMngService.photoMngDetail(photoMngVO); |
|
54 |
+ return new ResponseEntity<>(result, HttpStatus.OK); |
|
55 |
+ } |
|
4 | 56 |
} |
+++ src/main/java/com/takensoft/ai_lms/lms/survey/dao/SurveyDAO.java
... | ... | @@ -0,0 +1,30 @@ |
1 | +package com.takensoft.ai_lms.lms.survey.dao; | |
2 | + | |
3 | + | |
4 | +import com.takensoft.ai_lms.lms.survey.vo.SurveyVO; | |
5 | +import org.egovframe.rte.psl.dataaccess.mapper.Mapper; | |
6 | + | |
7 | +import java.util.List; | |
8 | + | |
9 | + | |
10 | +/** | |
11 | + * @author : 박세훈 | |
12 | + * since : 2024.07.29 | |
13 | + * | |
14 | + * 설문 조사 관련 Mapper | |
15 | + */ | |
16 | +@Mapper("surveyDAO") | |
17 | +public interface SurveyDAO { | |
18 | + | |
19 | + // 설문 조사 등록 | |
20 | + int insertSurvey(SurveyVO surveyVO) throws Exception; | |
21 | + | |
22 | + // 설문 조사 조회 | |
23 | + List<SurveyVO> surveyList(SurveyVO surveyVO) throws Exception; | |
24 | + | |
25 | + // 설문 조사 수정 | |
26 | + int updateSurvey(SurveyVO surveyVO) throws Exception; | |
27 | + | |
28 | + // 설문 조사 삭제 | |
29 | + int deleteSurvey(String srvyId) throws Exception; | |
30 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/survey/service/Impl/SurveyServiceImpl.java
... | ... | @@ -0,0 +1,54 @@ |
1 | +package com.takensoft.ai_lms.lms.survey.service.Impl; | |
2 | + | |
3 | + | |
4 | +import com.takensoft.ai_lms.common.idgen.service.IdgenService; | |
5 | +import com.takensoft.ai_lms.lms.survey.dao.SurveyDAO; | |
6 | +import com.takensoft.ai_lms.lms.survey.service.SurveyService; | |
7 | +import com.takensoft.ai_lms.lms.survey.vo.SurveyVO; | |
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 | +/** | |
16 | + * @author : 박세훈 | |
17 | + * since : 2024.07.29 | |
18 | + * | |
19 | + * 설문 조사 관련 ServiceImpl | |
20 | + */ | |
21 | +@Service("surveyService") | |
22 | +@RequiredArgsConstructor | |
23 | +public class SurveyServiceImpl extends EgovAbstractServiceImpl implements SurveyService { | |
24 | + | |
25 | + private final SurveyDAO surveyDAO; | |
26 | + | |
27 | + private final IdgenService surveyIdgn; | |
28 | + | |
29 | + // 설문 조사 등록 | |
30 | + @Override | |
31 | + public int insertSurvey(SurveyVO surveyVO) throws Exception{ | |
32 | + String srvyId = surveyIdgn.getNextStringId(); | |
33 | + surveyVO.setSrvyId(srvyId); | |
34 | + return surveyDAO.insertSurvey(surveyVO); | |
35 | + } | |
36 | + | |
37 | + // 설문 조사 조회 | |
38 | + @Override | |
39 | + public List<SurveyVO> surveyList(SurveyVO surveyVO) throws Exception { | |
40 | + return surveyDAO.surveyList(surveyVO); | |
41 | + } | |
42 | + | |
43 | + // 설문 조사 수정 | |
44 | + @Override | |
45 | + public int updateSurvey(SurveyVO surveyVO) throws Exception { | |
46 | + return surveyDAO.updateSurvey(surveyVO); | |
47 | + } | |
48 | + | |
49 | + // 설문 조사 삭제 | |
50 | + @Override | |
51 | + public int deleteSurvey(String srvyId) throws Exception { | |
52 | + return surveyDAO.deleteSurvey(srvyId); | |
53 | + } | |
54 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/survey/service/SurveyService.java
... | ... | @@ -0,0 +1,28 @@ |
1 | +package com.takensoft.ai_lms.lms.survey.service; | |
2 | + | |
3 | +import com.takensoft.ai_lms.lms.survey.vo.SurveyVO; | |
4 | + | |
5 | +import java.util.List; | |
6 | + | |
7 | + | |
8 | +/** | |
9 | + * @author : 박세훈 | |
10 | + * since : 2024.07.29 | |
11 | + * | |
12 | + * 설문 조사 관련 Service | |
13 | + */ | |
14 | + | |
15 | +public interface SurveyService { | |
16 | + | |
17 | + // 설문 조사 등록 | |
18 | + int insertSurvey(SurveyVO surveyVO) throws Exception; | |
19 | + | |
20 | + // 설문 조사 조회 | |
21 | + List<SurveyVO> surveyList(SurveyVO surveyVO) throws Exception; | |
22 | + | |
23 | + // 설문 조사 수정 | |
24 | + int updateSurvey(SurveyVO surveyVO) throws Exception; | |
25 | + | |
26 | + // 설문 조사 삭제 | |
27 | + int deleteSurvey(String srvyId) throws Exception; | |
28 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/survey/vo/SurveyVO.java
... | ... | @@ -0,0 +1,30 @@ |
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 | +/** | |
11 | + * @author : 박세훈 | |
12 | + * since : 2024.07.29 | |
13 | + * | |
14 | + * 설문 조사 관련 VO | |
15 | + */ | |
16 | +@Getter | |
17 | +@Setter | |
18 | +@AllArgsConstructor | |
19 | +@NoArgsConstructor | |
20 | +public class SurveyVO { | |
21 | + | |
22 | + // 설문 조사 아이디 | |
23 | + private String srvyId; | |
24 | + | |
25 | + // 설문 조사 종류 | |
26 | + private String srvyType; | |
27 | + | |
28 | + // 설문 내용 | |
29 | + private String srvyCnt; | |
30 | +} |
+++ src/main/java/com/takensoft/ai_lms/lms/survey/web/SurveyController.java
... | ... | @@ -0,0 +1,77 @@ |
1 | +package com.takensoft.ai_lms.lms.survey.web; | |
2 | + | |
3 | + | |
4 | +import com.takensoft.ai_lms.lms.survey.service.SurveyService; | |
5 | +import com.takensoft.ai_lms.lms.survey.vo.SurveyVO; | |
6 | +import lombok.RequiredArgsConstructor; | |
7 | +import org.springframework.web.bind.annotation.*; | |
8 | + | |
9 | +import java.util.List; | |
10 | +import java.util.Map; | |
11 | + | |
12 | +/** | |
13 | + * @author : 박세훈 | |
14 | + * since : 2024.07.29 | |
15 | + * | |
16 | + * 설문 조사 관련 Controller | |
17 | + */ | |
18 | + | |
19 | +@RestController | |
20 | +@RequestMapping(value = "/survey") | |
21 | +@RequiredArgsConstructor | |
22 | +public class SurveyController { | |
23 | + | |
24 | + private final SurveyService surveyService; | |
25 | + | |
26 | + @PostMapping("/insert.json") | |
27 | + public String insertSurvey(@RequestBody SurveyVO surveyVO) throws Exception { | |
28 | + try { | |
29 | + int result = surveyService.insertSurvey(surveyVO); | |
30 | + if (result > 0) { | |
31 | + return "success"; | |
32 | + } else { | |
33 | + return "fail"; | |
34 | + } | |
35 | + } catch (Exception e ) { | |
36 | + return "Error"; | |
37 | + } | |
38 | + } | |
39 | + | |
40 | + @GetMapping("/list.json") | |
41 | + public List<SurveyVO> surveyList(SurveyVO surveyVO) throws Exception { | |
42 | + return surveyService.surveyList(surveyVO); | |
43 | + } | |
44 | + | |
45 | + | |
46 | + @PutMapping("/update.json") | |
47 | + public String updateSurvey (@RequestBody SurveyVO surveyVO) throws Exception { | |
48 | + try { | |
49 | + int result = surveyService.updateSurvey(surveyVO); | |
50 | + if (result > 0) { | |
51 | + return "success"; | |
52 | + } else { | |
53 | + return "fail"; | |
54 | + } | |
55 | + }catch (Exception e) { | |
56 | + return "Error"; | |
57 | + } | |
58 | + } | |
59 | + | |
60 | + | |
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 | + } | |
74 | + } | |
75 | + | |
76 | + | |
77 | +} |
--- src/main/java/com/takensoft/ai_lms/lms/unit/web/UnitController.java
+++ src/main/java/com/takensoft/ai_lms/lms/unit/web/UnitController.java
... | ... | @@ -22,12 +22,7 @@ |
22 | 22 |
|
23 | 23 |
private final UnitService unitService; |
24 | 24 |
|
25 |
- /** |
|
26 |
- * @author 박민혁 |
|
27 |
- * @since 2024.07.06 |
|
28 |
- * |
|
29 |
- * 테스트용 데이터 조회 |
|
30 |
- */ |
|
25 |
+ |
|
31 | 26 |
@PostMapping(path = "/unitList.json") |
32 | 27 |
public ResponseEntity<?> unitList() throws Exception { |
33 | 28 |
List<UnitVO> result = unitService.unitList(); |
--- 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
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 |
import org.springframework.web.bind.annotation.*; |
8 | 8 |
|
9 | 9 |
import java.util.List; |
10 |
+import java.util.Map; |
|
10 | 11 |
|
11 | 12 |
/** |
12 | 13 |
* @author 권민수 |
... | ... | @@ -34,7 +35,11 @@ |
34 | 35 |
} |
35 | 36 |
|
36 | 37 |
@PostMapping("/insert.json") |
37 |
- public void insertWordBook(@RequestBody WordBookVO wordBook) { |
|
38 |
+ public void insertWordBook(@RequestBody Map<String, String> req) { |
|
39 |
+ WordBookVO wordBook = new WordBookVO(); |
|
40 |
+ wordBook.setWdBookTypeId(req.get("wdBookTypeId")); |
|
41 |
+ wordBook.setTextId(req.get("textId")); |
|
42 |
+ wordBook.setUserId(req.get("userId")); |
|
38 | 43 |
wordBookService.insertWordBook(wordBook); |
39 | 44 |
} |
40 | 45 |
|
--- src/main/resources/mybatis/mapper/lms/photo-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/photo-SQL.xml
... | ... | @@ -1,12 +1,7 @@ |
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
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.photo.dao.PhotoDAO"> |
4 |
- <!-- |
|
5 |
- 작 성 자 : 박민혁 |
|
6 |
- 작 성 일 : 2024.07.25 |
|
7 |
- 내 용 : 경로 생성을 위해 만들어 놓은 xml, |
|
8 |
- CRUD를 이용하는데 삭제하거나 수정해서 사용해주세요 |
|
9 |
- --> |
|
4 |
+ |
|
10 | 5 |
|
11 | 6 |
<resultMap id="photoMap" type="photoVO"> |
12 | 7 |
<result property="photoId" column="photo_id"/> |
+++ src/main/resources/mybatis/mapper/lms/photoMng-SQL.xml
... | ... | @@ -0,0 +1,48 @@ |
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.photoMng.dao.PhotoMngDAO"> | |
4 | + | |
5 | + | |
6 | + <resultMap id="photoMngMap" type="photoMngVO"> | |
7 | + <result property="photoMngId" column="photo_mng_id"/> | |
8 | + <result property="sclsId" column="scls_id"/> | |
9 | + | |
10 | + </resultMap> | |
11 | + | |
12 | + <select id="photoMngList" resultType="com.takensoft.ai_lms.lms.photoMng.vo.PhotoMngVO"> | |
13 | + SELECT photo_mng_id | |
14 | + , scls_id | |
15 | + FROM photo_manage | |
16 | + </select> | |
17 | + | |
18 | + <insert id="insertPhotoMng" parameterType="PhotoMngVO"> | |
19 | + INSERT INTO photo_manage ( | |
20 | + photo_mng_id | |
21 | + , scls_id | |
22 | + ) VALUES ( | |
23 | + #{photoMngId} | |
24 | + , #{sclsId} | |
25 | + ) | |
26 | + </insert> | |
27 | + | |
28 | + <update id="updatePhotoMng" parameterType="PhotoMngVO"> | |
29 | + UPDATE photo_manage | |
30 | + SET photo_mng_id = #{photoMngId} | |
31 | + , scls_id = #{sclsId} | |
32 | + WHERE photo_mng_id = #{photoMngId} | |
33 | + </update> | |
34 | + | |
35 | + <delete id="deletePhotoMng" parameterType="PhotoMngVO"> | |
36 | + DELETE | |
37 | + FROM photo_manage | |
38 | + WHERE photo_mng_id = #{photoMngId} | |
39 | + </delete> | |
40 | + | |
41 | + <select id="photoDetail" parameterType="PhotoMngVO" resultType="com.takensoft.ai_lms.lms.photoMng.vo.PhotoMngVO"> | |
42 | + SELECT photo_mng_id | |
43 | + , scls_id | |
44 | + WHERE photo_mng_id = #{photoMngId} | |
45 | + FROM photo_manage | |
46 | + </select> | |
47 | + | |
48 | +</mapper>(No newline at end of file) |
+++ src/main/resources/mybatis/mapper/lms/survey-SQL.xml
... | ... | @@ -0,0 +1,46 @@ |
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.survey.dao.SurveyDAO"> | |
4 | + | |
5 | + | |
6 | + <resultMap id="surveyMap" type="SurveyVO"> | |
7 | + <result property="srvyId" column="srvy_id"/> | |
8 | + <result property="srvyType" column="srvy_type"/> | |
9 | + <result property="srvyCnt" column="srvy_cnt"/> | |
10 | + </resultMap> | |
11 | + | |
12 | + | |
13 | + <insert id="insertSurvey" parameterType="SurveyVO"> | |
14 | + INSERT INTO survey( srvy_id, | |
15 | + srvy_type, | |
16 | + srvy_cnt) | |
17 | + VALUES (#{srvyId}, | |
18 | + #{srvyType}, | |
19 | + #{srvyCnt}); | |
20 | + </insert> | |
21 | + | |
22 | + <select id="surveyList" parameterType="SurveyVO"> | |
23 | + SELECT * | |
24 | + FROM survey | |
25 | + </select> | |
26 | + | |
27 | + <update id="updateSurvey" parameterType="SurveyVO"> | |
28 | + UPDATE survey | |
29 | + SET srvy_type = #{srvyType}, | |
30 | + srvy_cnt = #{srvyCnt} | |
31 | + WHERE | |
32 | + srvy_id = #{srvyId} | |
33 | + </update> | |
34 | + | |
35 | + | |
36 | + | |
37 | + | |
38 | + <delete id="deleteSurvey" parameterType="String"> | |
39 | + DELETE FROM survey | |
40 | + WHERE srvy_id = #{srvyId} | |
41 | + </delete> | |
42 | + | |
43 | + | |
44 | + | |
45 | + | |
46 | +</mapper>(No newline at end of file) |
--- src/main/resources/mybatis/mapper/lms/unit-SQL.xml
+++ src/main/resources/mybatis/mapper/lms/unit-SQL.xml
... | ... | @@ -1,12 +1,6 @@ |
1 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
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.unit.dao.UnitDAO"> |
4 |
- <!-- |
|
5 |
- 작 성 자 : 박민혁 |
|
6 |
- 작 성 일 : 2024.07.25 |
|
7 |
- 내 용 : 경로 생성을 위해 만들어 놓은 xml, |
|
8 |
- CRUD를 이용하는데 삭제하거나 수정해서 사용해주세요 |
|
9 |
- --> |
|
10 | 4 |
|
11 | 5 |
<resultMap id="unitMap" type="UnitVO"> |
12 | 6 |
<result property="unitId" column="unit_id"/> |
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?