| | |
| | | * 获取部门列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "获取部门列表", tags = {"管理后台-部门管理", "门店后台-部门管理"}) |
| | | @ApiOperation(value = "获取部门列表", tags = {"管理后台-部门管理"}) |
| | | public AjaxResult list(SysDept dept) { |
| | | List<SysDept> depts = deptService.selectDeptList(dept); |
| | | return success(depts); |
| | |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody SysDept dept) { |
| | | Long deptId = dept.getDeptId(); |
| | | deptService.checkDeptDataScope(deptId); |
| | | deptService.checkDeptDataScope(deptId);//检查是否有权限修改 |
| | | if (!deptService.checkDeptNameUnique(dept)) { |
| | | return error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在"); |
| | | } |