From afa0dbb4f54e7244835dd67ec33c3e545f122f71 Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期五, 17 一月 2025 16:40:43 +0800 Subject: [PATCH] bug修改 --- ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/sys/SysDeptController.java | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/sys/SysDeptController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/sys/SysDeptController.java index f0c63cd..64f6b50 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/sys/SysDeptController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/sys/SysDeptController.java @@ -1,17 +1,5 @@ package com.ruoyi.system.controller.sys; -import java.util.List; -import org.apache.commons.lang3.ArrayUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; import com.ruoyi.common.core.constant.UserConstants; import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.core.web.controller.BaseController; @@ -22,6 +10,12 @@ import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.system.api.domain.poji.sys.SysDept; import com.ruoyi.system.service.sys.ISysDeptService; +import org.apache.commons.lang3.ArrayUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; /** * 部门信息 @@ -34,6 +28,8 @@ { @Autowired private ISysDeptService deptService; + + /** * 获取部门列表 @@ -73,7 +69,7 @@ * 新增部门 */ @RequiresPermissions("system:dept:add") - @Log(title = "部门管理", businessType = BusinessType.INSERT) + @Log(title = "部门管理", businessType = BusinessType.INSERT,operContent = "新增部门") @PostMapping public AjaxResult add(@Validated @RequestBody SysDept dept) { @@ -81,6 +77,8 @@ { return error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在"); } + dept.setParentId(100L); + dept.setOrderNum(1); dept.setCreateBy(SecurityUtils.getUsername()); return toAjax(deptService.insertDept(dept)); } @@ -89,7 +87,7 @@ * 修改部门 */ @RequiresPermissions("system:dept:edit") - @Log(title = "部门管理", businessType = BusinessType.UPDATE) + @Log(title = "部门管理", businessType = BusinessType.UPDATE,operContent = "修改部门") @PutMapping public AjaxResult edit(@Validated @RequestBody SysDept dept) { @@ -115,7 +113,7 @@ * 删除部门 */ @RequiresPermissions("system:dept:remove") - @Log(title = "部门管理", businessType = BusinessType.DELETE) + @Log(title = "部门管理", businessType = BusinessType.DELETE,operContent = "删除部门") @DeleteMapping("/{deptId}") public AjaxResult remove(@PathVariable Long deptId) { @@ -130,4 +128,6 @@ deptService.checkDeptDataScope(deptId); return toAjax(deptService.deleteDeptById(deptId)); } + + } -- Gitblit v1.7.1