From bfbe92016f8c6be9435412beead5bef0a997eed0 Mon Sep 17 00:00:00 2001 From: khj0414 Date: Fri, 10 Jan 2025 10:55:38 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9A=A9=EC=96=B4=EC=A7=91=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/common/worddictController.java | 11 ++ .../localhost/mapper/worddictyMapper.java | 2 + .../localhost/service/worddictyService.java | 6 +- src/main/resources/mapper/worddictyMapper.xml | 135 +++++++++++++++++- 4 files changed, 151 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/company/localhost/controller/common/worddictController.java b/src/main/java/io/company/localhost/controller/common/worddictController.java index 25e84f3..b8f2b84 100644 --- a/src/main/java/io/company/localhost/controller/common/worddictController.java +++ b/src/main/java/io/company/localhost/controller/common/worddictController.java @@ -70,6 +70,17 @@ public class worddictController { List WordCategoryList = commoncodservice.getWordCategory(); return ApiResponse.ok(WordCategoryList); } + /** + * 용어집 상세 조회 + * @param WRDDICSEQ 용어 번호 + * @return + */ + @Member + @ParameterCheck + @GetMapping("getWordDetail") + public ApiResponse getWordDetail(@ReqMap MapDto map) { + return ApiResponse.ok( worddictyservice.getWordDetail(map)); + } /** * 용어집 카테고리 등록 * @param CMNCODNAM 용어집 등록 카테고리 이름 diff --git a/src/main/java/io/company/localhost/mapper/worddictyMapper.java b/src/main/java/io/company/localhost/mapper/worddictyMapper.java index f373ebf..77ee375 100644 --- a/src/main/java/io/company/localhost/mapper/worddictyMapper.java +++ b/src/main/java/io/company/localhost/mapper/worddictyMapper.java @@ -29,6 +29,8 @@ public interface worddictyMapper { Long updateWord(MapDto map); + MapDto getWordDetail(MapDto map); + diff --git a/src/main/java/io/company/localhost/service/worddictyService.java b/src/main/java/io/company/localhost/service/worddictyService.java index 826c0f9..ad8a8fc 100644 --- a/src/main/java/io/company/localhost/service/worddictyService.java +++ b/src/main/java/io/company/localhost/service/worddictyService.java @@ -32,7 +32,7 @@ public class worddictyService { private final worddictyMapper worddictymapper; public PageInfo getWordList(MapDto map) { - int page = map.getString("page") != null ? Integer.parseInt(map.getString("page")) : 1; + int page = map.getString("page") != null ? Integer.parseInt(map.getString("page")) : 1; PageHelper.startPage(page, 10); return PageUtil.redefineNavigation(new PageInfo<>(worddictymapper.getWordList(map),10)); } @@ -45,6 +45,10 @@ public class worddictyService { return worddictymapper.updateWord(map); } + public MapDto getWordDetail(MapDto map) { + return worddictymapper.getWordDetail(map); + } + diff --git a/src/main/resources/mapper/worddictyMapper.xml b/src/main/resources/mapper/worddictyMapper.xml index bfa6335..25645ea 100644 --- a/src/main/resources/mapper/worddictyMapper.xml +++ b/src/main/resources/mapper/worddictyMapper.xml @@ -5,6 +5,7 @@ select w.* ,DATE_FORMAT(w.WRDDICRDT,'%y.%m.%d %H:%i') AS formatWRDDICRDT + ,DATE_FORMAT(w.WRDDICUDT,'%y.%m.%d %H:%i') AS formatWRDDICRDT ,c.CMNCODNAM category from worddicty w @@ -21,8 +22,131 @@ - and w.WRDDICTTL like CONCAT(#{indexKeyword}, '%') - + + + + and w.WRDDICTTL BETWEEN '가' AND '깋' + + + and w.WRDDICTTL BETWEEN '나' AND '닣' + + + and w.WRDDICTTL BETWEEN '다' AND '딷' + + + and w.WRDDICTTL BETWEEN '라' AND '릿' + + + and w.WRDDICTTL BETWEEN '마' AND '맇' + + + and w.WRDDICTTL BETWEEN '바' AND '빟' + + + and w.WRDDICTTL BETWEEN '사' AND '싷' + + + and w.WRDDICTTL BETWEEN '아' AND '잏' + + + and w.WRDDICTTL BETWEEN '자' AND '짛' + + + and w.WRDDICTTL BETWEEN '차' AND '칳' + + + and w.WRDDICTTL BETWEEN '카' AND '킿' + + + and w.WRDDICTTL BETWEEN '타' AND '틷' + + + and w.WRDDICTTL BETWEEN '파' AND '핗' + + + and w.WRDDICTTL BETWEEN '하' AND '힣' + + + + and w.WRDDICTTL like "a%" + + + and w.WRDDICTTL like "b%" + + + and w.WRDDICTTL like "c%" + + + and w.WRDDICTTL like "d%" + + + and w.WRDDICTTL like "e%" + + + and w.WRDDICTTL like "f%" + + + and w.WRDDICTTL like "g%" + + + and w.WRDDICTTL like "h%" + + + and w.WRDDICTTL like "i%" + + + and w.WRDDICTTL like "j%" + + + and w.WRDDICTTL like "k%" + + + and w.WRDDICTTL like "l%" + + + and w.WRDDICTTL like "m%" + + + and w.WRDDICTTL like "n%" + + + and w.WRDDICTTL like "o%" + + + and w.WRDDICTTL like "p%" + + + and w.WRDDICTTL like "q%" + + + and w.WRDDICTTL like "r%" + + + and w.WRDDICTTL like "s%" + + + and w.WRDDICTTL like "t%" + + + and w.WRDDICTTL like "u%" + + + and w.WRDDICTTL like "v%" + + + and w.WRDDICTTL like "w%" + + + and w.WRDDICTTL like "x%" + + + and w.WRDDICTTL like "y%" + + + and w.WRDDICTTL like "z%" + + + and w.WRDDICCAT = #{category} @@ -72,4 +196,11 @@ where WRDDICSEQ = #{WRDDICSEQ} +