无关风月
2025-01-22 99367ea1c11a68b420936e7f7db5fa7367da4f44
xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/controller/SysDeptController.java
@@ -70,6 +70,8 @@
     */
    @PostMapping("/add")
    @ApiOperation("部门添加")
    @Log(title = "【部门管理】添加", businessType = BusinessType.INSERT)
    public AjaxResult add(@Validated @RequestBody SysDept dto)
    {
        dto.setCreateTime(LocalDateTime.now());
@@ -89,6 +91,8 @@
     */
    @PostMapping("/edit")
    @ApiOperation("部门修改")
    @Log(title = "【部门管理】修改", businessType = BusinessType.UPDATE)
    public R edit(@Validated @RequestBody SysDept dept)
    {
        if (!deptService.checkDeptNameUnique1(dept)){
@@ -104,6 +108,8 @@
    private ISysUserService userService;
    @ApiOperation(value = "禁用启用")
    @PutMapping("/changeStatus")
    @Log(title = "【部门管理】修改状态", businessType = BusinessType.UPDATE)
    public AjaxResult changeStatus(@RequestBody SysDeptUpdateStatusDTO dto)
    {
        SysDept user = new SysDept();
@@ -122,6 +128,8 @@
     */
    @DeleteMapping("/{deptId}")
    @ApiOperation("删除部门")
    @Log(title = "【部门管理】删除", businessType = BusinessType.DELETE)
    public AjaxResult remove(@PathVariable Long deptId)
    {
        return toAjax(deptService.deleteDeptById(deptId));