From 96ee07e0bce8d0be34d07c06abc4f79d160752a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Tue, 11 Jan 2022 17:46:51 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=EC=97=90=EC=84=9C?= =?UTF-8?q?=20=EC=9E=90=EB=A3=8C=EB=93=B1=EB=A1=9D=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8F=99=EC=8B=9C=20=EB=B6=84=EB=A5=98=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=20=EC=84=A0=ED=83=9D.=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EB=AC=BC=20=EB=B3=B4=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8F=84=EB=A1=9D.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BoardController.java | 4 +-- .../resources/mybatisMapper/BoardMapper.xml | 6 ++--- src/main/resources/static/js/admin/userMgt.js | 2 -- .../resources/static/js/board/contentList.js | 21 --------------- .../resources/static/js/board/contentWrite.js | 7 +++++ src/main/resources/static/js/common.js | 26 ++++++++++++++++++- .../templates/board/contentList.html | 3 +++ .../templates/board/contentWrite.html | 1 + .../templates/fragments/leftMenu.html | 2 +- 9 files changed, 41 insertions(+), 31 deletions(-) diff --git a/src/main/java/com/dbnt/kcgfilemanager/controller/BoardController.java b/src/main/java/com/dbnt/kcgfilemanager/controller/BoardController.java index 8532d6a..4344193 100644 --- a/src/main/java/com/dbnt/kcgfilemanager/controller/BoardController.java +++ b/src/main/java/com/dbnt/kcgfilemanager/controller/BoardController.java @@ -48,7 +48,7 @@ public class BoardController { } @GetMapping("/contentWrite") - public ModelAndView contentWrite(@AuthenticationPrincipal UserInfo loginUser, Board content) { + public ModelAndView contentWrite(@AuthenticationPrincipal UserInfo loginUser, Board content, Integer categorySeq) { ModelAndView mav = new ModelAndView("board/contentWrite"); if(content.getContentSeq() == null) { mav.addObject("type", "new"); @@ -58,7 +58,7 @@ public class BoardController { mav.addObject("type", "modify"); mav.addObject("content", boardService.selectContentModifyInfo(content.getContentSeq())); } - + mav.addObject("categorySeq", categorySeq); mav.addObject("userRole", loginUser.getUserRole()); CategoryRole categoryRole = new CategoryRole(); categoryRole.setUserSeq(loginUser.getUserSeq()); diff --git a/src/main/resources/mybatisMapper/BoardMapper.xml b/src/main/resources/mybatisMapper/BoardMapper.xml index a622d7f..ca0bdc5 100644 --- a/src/main/resources/mybatisMapper/BoardMapper.xml +++ b/src/main/resources/mybatisMapper/BoardMapper.xml @@ -27,7 +27,7 @@ INNER JOIN CONTENT_POSITION D ON A.CATEGORY_SEQ = D.CATEGORY_SEQ - + WHERE A.STATUS != 'D' AND A.STATUS = #{status} @@ -71,7 +71,6 @@ WHERE ORIGINAL_NAME LIKE CONCAT('%', #{originalName}, '%') ) - ORDER BY A.VIEW_CNT DESC @@ -96,7 +95,7 @@ INNER JOIN CONTENT_POSITION D ON A.CATEGORY_SEQ = D.CATEGORY_SEQ - + WHERE A.STATUS != 'D' AND A.STATUS = #{status} @@ -140,7 +139,6 @@ WHERE ORIGINAL_NAME LIKE CONCAT('%', #{originalName}, '%') ) -