|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.tuoheng.admin.controller; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.tuoheng.admin.request.dept.AddDeptRequest; |
|
|
|
import com.tuoheng.admin.request.dept.EditDeptRequest; |
|
|
|
import com.tuoheng.admin.service.dept.IDeptService; |
|
|
@@ -8,6 +9,8 @@ import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
/** |
|
|
|
* 部门前端控制器 |
|
|
|
* |
|
|
@@ -54,8 +57,10 @@ public class DeptController { |
|
|
|
* 修改部门 |
|
|
|
*/ |
|
|
|
@PutMapping |
|
|
|
public JsonResult update(@RequestBody EditDeptRequest oldEditDeptRequest, @RequestBody EditDeptRequest newEditDeptRequest) { |
|
|
|
public JsonResult update(@RequestBody Map<String, Object> param) { |
|
|
|
log.info("进入修改部门接口"); |
|
|
|
EditDeptRequest oldEditDeptRequest = JSON.parseObject(JSON.toJSONString(param.get("oldEditDeptRequest")), EditDeptRequest.class); |
|
|
|
EditDeptRequest newEditDeptRequest = JSON.parseObject(JSON.toJSONString(param.get("newEditDeptRequest")), EditDeptRequest.class); |
|
|
|
return deptService.update(oldEditDeptRequest, newEditDeptRequest); |
|
|
|
} |
|
|
|
|