Kaynağa Gözat

update UserPageController & MenuPageController

reghao 6 ay önce
ebeveyn
işleme
a33e40508d

+ 0 - 14
mgr/src/main/java/cn/reghao/devops/mgr/admin/controller/MenuPageController.java

@@ -124,18 +124,4 @@ public class MenuPageController {
         List<MenuTree> list = menuService.getDirMenus();
         return WebResult.success(list);
     }
-
-    @ApiOperation(value = "对同一 pid 组内的资源进行排序", notes = "N")
-    @PreAuthorize("hasRole('ROLE_ADMIN')")
-    @GetMapping(value = "/sorted/{pid}/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
-    @ResponseBody
-    public String sortList(@PathVariable(value = "pid") int pid,
-                           @PathVariable(value = "id", required = false) Menu menu) {
-        /*Map<Integer, String> map = menuService.getSortedChildGroupByPid(pid);
-        // 排除当前 menu
-        if (menu != null) {
-            map.remove(menu.getPos());
-        }*/
-        return WebResult.failWithMsg("接口未实现");
-    }
 }

+ 35 - 37
mgr/src/main/java/cn/reghao/devops/mgr/admin/controller/UserPageController.java

@@ -12,7 +12,7 @@ import cn.reghao.devops.mgr.admin.service.AccountSessionService;
 import cn.reghao.devops.mgr.admin.service.RoleService;
 import cn.reghao.devops.mgr.admin.service.UserContext;
 import cn.reghao.jutil.jdk.result.Result;
-import cn.reghao.jutil.jdk.result.WebResult;
+import cn.reghao.jutil.web.WebResult;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.data.domain.Page;
@@ -56,12 +56,6 @@ public class UserPageController {
         return "/admin/user/userinfo";
     }
 
-    @ApiOperation(value = "修改个人密码页面", notes = "N")
-    @GetMapping("/passwd/edit")
-    public String editPasswdPage(Model model) {
-        return "/admin/user/userpasswd";
-    }
-
     @ApiOperation(value = "用户列表页面", notes = "N")
     @PreAuthorize("hasRole('ROLE_ADMIN')")
     @GetMapping
@@ -134,28 +128,6 @@ public class UserPageController {
         return "/admin/user/role";
     }
 
-    @ApiOperation(value = "修改个人头像", notes = "N")
-    @PostMapping(value = "/avatar", produces = MediaType.APPLICATION_JSON_VALUE)
-    @ResponseBody
-    public String userAvatar(MultipartFile file) {
-        return WebResult.failWithMsg("接口未实现");
-    }
-
-    @ApiOperation(value = "修改个人信息", notes = "N")
-    @PostMapping(value = "/update", produces = MediaType.APPLICATION_JSON_VALUE)
-    @ResponseBody
-    public String editUserInfo(@Validated AccountProfile accountProfile) {
-        accountService.updateAccountProfile(accountProfile);
-        return WebResult.success();
-    }
-
-    @ApiOperation(value = "修改个人密码", notes = "N")
-    @PostMapping(value = "/passwd/update", produces = MediaType.APPLICATION_JSON_VALUE)
-    @ResponseBody
-    public String editPasswd(UpdatePasswordDto updatePasswordDto) {
-        return WebResult.failWithMsg("接口未实现");
-    }
-
     @ApiOperation(value = "创建用户", notes = "N")
     @PreAuthorize("hasRole('ROLE_ADMIN')")
     @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE)
@@ -165,14 +137,6 @@ public class UserPageController {
         return WebResult.result(result);
     }
 
-    @ApiOperation(value = "批量创建用户", notes = "N")
-    @PreAuthorize("hasRole('ROLE_ADMIN')")
-    @PostMapping(value = "/batch", produces = MediaType.APPLICATION_JSON_VALUE)
-    @ResponseBody
-    public String batchAdd(MultipartFile file) {
-        return WebResult.failWithMsg("接口未实现");
-    }
-
     @ApiOperation(value = "删除用户", notes = "N")
     @PreAuthorize("hasRole('ROLE_ADMIN')")
     @DeleteMapping(value = "/delete/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
@@ -208,4 +172,38 @@ public class UserPageController {
         //userIds.forEach(userId -> accountService.updateAccountStatus(userId, enable));
         return WebResult.failWithMsg("接口未实现");
     }
+
+    // *****************************************************************************************************************
+    // TODO 待删除
+    // *****************************************************************************************************************
+    @ApiOperation(value = "修改个人密码页面", notes = "N")
+    @GetMapping("/passwd/edit")
+    @Deprecated
+    public String editPasswdPage(Model model) {
+        return "/admin/user/userpasswd";
+    }
+
+    @ApiOperation(value = "修改个人头像", notes = "N")
+    @PostMapping(value = "/avatar", produces = MediaType.APPLICATION_JSON_VALUE)
+    @ResponseBody
+    @Deprecated
+    public String userAvatar(MultipartFile file) {
+        return WebResult.failWithMsg("接口未实现");
+    }
+
+    @ApiOperation(value = "修改个人信息", notes = "N")
+    @PostMapping(value = "/update", produces = MediaType.APPLICATION_JSON_VALUE)
+    @ResponseBody
+    @Deprecated
+    public String editUserInfo(@Validated AccountProfile accountProfile) {
+        return WebResult.failWithMsg("接口未实现");
+    }
+
+    @ApiOperation(value = "修改个人密码", notes = "N")
+    @PostMapping(value = "/passwd/update", produces = MediaType.APPLICATION_JSON_VALUE)
+    @ResponseBody
+    @Deprecated
+    public String editPasswd(UpdatePasswordDto updatePasswordDto) {
+        return WebResult.failWithMsg("接口未实现");
+    }
 }

+ 0 - 10
mgr/src/main/resources/templates/admin/menu/edit.html

@@ -33,16 +33,6 @@
             </div>
             <i th:class="'icon-show '+${menu.icon}" style="line-height: 38px;"></i>
         </div>
-        <!--<div class="layui-form-item">
-            <label class="layui-form-label required">排序</label>
-            <div class="layui-input-inline">
-                <label>
-                    <select class="select-pos" name="pos" lay-verify="pos"
-                            th:attr="data-url=@{/rbac/menu/sorted}, data-id=${menu.id}, data-pos=${menu.pos}"></select>
-                </label>
-            </div>
-            <div class="layui-input-info">(之后)</div>
-        </div>-->
         <div class="layui-form-item timo-finally">
             <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
             <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>

+ 0 - 4
mgr/src/main/resources/templates/admin/user/index.html

@@ -30,10 +30,6 @@
                                 data-size="auto">
                             <i class="fa fa-plus"></i> 添加
                         </button>
-                        <!--<button class="layui-btn upload-file" data-title=""
-                                name="file[]" th:attr="up-url=@{/rbac/user/batch}" data-size="auto">
-                            <i class="fa fa-plus"></i> 批量添加
-                        </button>-->
                     </div>
                 </div>
             </div>