Pu Zhibing
2025-04-07 4109495b9c51a4bbd8b0a7c3c69093909d2e33e1
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysDeptController.java
@@ -1,6 +1,5 @@
package com.ruoyi.system.controller;
import com.ruoyi.common.core.constant.UserConstants;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -33,7 +32,7 @@
     * 获取部门列表
     */
    @GetMapping("/list")
    @ApiOperation(value = "获取部门列表", tags = {"管理后台-部门管理", "门店后台-部门管理"})
    @ApiOperation(value = "获取部门列表", tags = {"管理后台-部门管理"})
    public AjaxResult list(SysDept dept) {
        List<SysDept> depts = deptService.selectDeptList(dept);
        return success(depts);
@@ -63,7 +62,7 @@
     * 新增部门
     */
    @Log(title = "部门管理", businessType = BusinessType.INSERT)
    @ApiOperation(value = "添加部门", tags = {"管理后台-部门管理", "门店后台-部门管理"})
    @ApiOperation(value = "添加部门", tags = {"管理后台-部门管理"})
    @PostMapping
    public AjaxResult add(@Validated @RequestBody SysDept dept) {
        if (!deptService.checkDeptNameUnique(dept)) {
@@ -77,7 +76,7 @@
     * 修改部门
     */
    @Log(title = "部门管理", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "编辑部门", tags = {"管理后台-部门管理", "门店后台-部门管理"})
    @ApiOperation(value = "编辑部门", tags = {"管理后台-部门管理"})
    @PutMapping
    public AjaxResult edit(@Validated @RequestBody SysDept dept) {
        Long deptId = dept.getDeptId();
@@ -101,7 +100,7 @@
     * 删除部门
     */
    @Log(title = "部门管理", businessType = BusinessType.DELETE)
    @ApiOperation(value = "删除部门", tags = {"管理后台-部门管理", "门店后台-部门管理"})
    @ApiOperation(value = "删除部门", tags = {"管理后台-部门管理"})
    @DeleteMapping("/{deptId}")
    public AjaxResult remove(@PathVariable Long deptId)
    {