| | |
| | | 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; |
| | |
| | | * 获取部门列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "获取部门列表", tags = {"管理后台-部门管理", "门店后台-部门管理"}) |
| | | @ApiOperation(value = "获取部门列表", tags = {"管理后台-部门管理"}) |
| | | public AjaxResult list(SysDept dept) { |
| | | List<SysDept> depts = deptService.selectDeptList(dept); |
| | | return success(depts); |
| | |
| | | * 新增部门 |
| | | */ |
| | | @Log(title = "部门管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "添加部门", tags = {"管理后台-部门管理", "门店后台-部门管理"}) |
| | | @ApiOperation(value = "添加部门", tags = {"管理后台-部门管理"}) |
| | | @PostMapping |
| | | public AjaxResult add(@Validated @RequestBody SysDept dept) { |
| | | if (!deptService.checkDeptNameUnique(dept)) { |
| | |
| | | * 修改部门 |
| | | */ |
| | | @Log(title = "部门管理", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "编辑部门", tags = {"管理后台-部门管理", "门店后台-部门管理"}) |
| | | @ApiOperation(value = "编辑部门", tags = {"管理后台-部门管理"}) |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody SysDept dept) { |
| | | Long deptId = dept.getDeptId(); |
| | |
| | | * 删除部门 |
| | | */ |
| | | @Log(title = "部门管理", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除部门", tags = {"管理后台-部门管理", "门店后台-部门管理"}) |
| | | @ApiOperation(value = "删除部门", tags = {"管理后台-部门管理"}) |
| | | @DeleteMapping("/{deptId}") |
| | | public AjaxResult remove(@PathVariable Long deptId) |
| | | { |