From c007f0ca1785db093d48f4846cda82fe8e955765 Mon Sep 17 00:00:00 2001
From: kimi <kimi42345@gmail.com>
Date: 星期三, 27 五月 2020 09:59:29 +0800
Subject: [PATCH] merage

---
 src/main/java/com/highdatas/mdm/controller/MenuMappingController.java |   41 +++++++++++++++++++++++++++++++++--------
 1 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/src/main/java/com/highdatas/mdm/controller/MenuMappingController.java b/src/main/java/com/highdatas/mdm/controller/MenuMappingController.java
index 2529a56..56632db 100644
--- a/src/main/java/com/highdatas/mdm/controller/MenuMappingController.java
+++ b/src/main/java/com/highdatas/mdm/controller/MenuMappingController.java
@@ -45,13 +45,24 @@
     ISysMenuService menuService;
     @Autowired
     NoticeClient noticeClient;
-
+    /**
+     *
+     * @description: 閫氳繃id鑾峰彇menumapping
+     * @param id menumapping id
+     * @return: menumapping鏁版嵁
+     *
+     */
     @RequestMapping(value = "/get/{id}",  method = RequestMethod.GET)
     public Result<MenuMapping> get(@PathVariable String id, HttpServletRequest request) {
         return menuMappingService.getMapping(request.getSession(),id);
     }
 
-
+    /**
+     *
+     * @description: 淇濆瓨涓婚鐨勮缁嗕俊鎭�
+     * @return: 鏄惁淇濆瓨鎴愬姛
+     *
+     */
     @RequestMapping(value = "/add", method = RequestMethod.POST)
     public Result<Object> insert(@RequestBody MenuMapping menuMapping, HttpServletRequest request) {
         String menuId = menuMapping.getMenuId();
@@ -68,20 +79,29 @@
 
     }
 
+    /**
+     *
+     * @description: 淇濆瓨涓婚鐨勮缁嗕俊鎭�
+     * @return: 鏄惁淇濆瓨鎴愬姛
+     *
+     */
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     public Result<Object> update(@RequestBody MenuMapping menuMapping, HttpServletRequest request) {
         menuMapping.setUpdateTime(new Date());
         String menuId = menuMapping.getMenuId();
         SysMenu menu = menuService.selectById(menuId);
         String preParentId = menu.getParentId();
-        menu.setName(menuMapping.getName()).updateById();
+
         String themeId = menuMapping.getThemeId();
-//        if (!preParentId.equalsIgnoreCase(themeId)) {
-////            menu.setParentId(themeId);
-////            menu.updateById();
-////        }
+        if (!preParentId.equalsIgnoreCase(themeId)) {
+            menu.setParentId(themeId);
+            menu.updateById();
+        }
         boolean updated = menuMapping.updateById();
         if (updated) {
+
+
+
             TUser user = DbUtils.getUser(request);
             if (menu != null) {
                 LinkedHashSet<String> parentIdSet = new LinkedHashSet<>();
@@ -104,7 +124,12 @@
             return Result.error(CodeMsg.UPDATE_ERROR);
         }
     }
-
+    /**
+     *
+     * @description: 閫氳繃涓婚鍒犻櫎涓婚璇︾粏淇℃伅
+     * @return: 鏄惁鍒犻櫎menumapping
+     *
+     */
     @RequestMapping(value = "/delete/{menuid}", method = RequestMethod.GET)
     public Result<Object> delete(@PathVariable String menuid) throws Exception {
         boolean deleted = menuMappingService.deleteById(menuid);

--
Gitblit v1.8.0