| | |
| | | |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.annotion.BussinessLog; |
| | | import com.stylefeng.guns.core.common.annotion.Permission; |
| | | import com.stylefeng.guns.core.common.constant.dictmap.DeptDict; |
| | | import com.stylefeng.guns.core.common.constant.factory.ConstantFactory; |
| | | import com.stylefeng.guns.core.common.exception.BizExceptionEnum; |
| | |
| | | /** |
| | | * 跳转到修改部门 |
| | | */ |
| | | @Permission |
| | | @RequestMapping("/dept_update/{deptId}") |
| | | public String deptUpdate(@PathVariable Integer deptId, Model model) { |
| | | Dept dept = deptService.selectById(deptId); |
| | |
| | | */ |
| | | @BussinessLog(value = "添加部门", key = "simplename", dict = DeptDict.class) |
| | | @RequestMapping(value = "/add") |
| | | @Permission |
| | | @ResponseBody |
| | | public Object add(Dept dept) { |
| | | if (ToolUtil.isOneEmpty(dept, dept.getSimplename())) { |
| | |
| | | * 获取所有部门列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @Permission |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | List<Map<String, Object>> list = this.deptService.list(condition); |
| | |
| | | * 部门详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{deptId}") |
| | | @Permission |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("deptId") Integer deptId) { |
| | | return deptService.selectById(deptId); |
| | |
| | | */ |
| | | @BussinessLog(value = "修改部门", key = "simplename", dict = DeptDict.class) |
| | | @RequestMapping(value = "/update") |
| | | @Permission |
| | | @ResponseBody |
| | | public Object update(Dept dept) { |
| | | if (ToolUtil.isEmpty(dept) || dept.getId() == null) { |
| | |
| | | */ |
| | | @BussinessLog(value = "删除部门", key = "deptId", dict = DeptDict.class) |
| | | @RequestMapping(value = "/delete") |
| | | @Permission |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer deptId) { |
| | | |