Browse Source

提交修改部门接口代码

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
9187bd0069
2 changed files with 6 additions and 2 deletions
  1. +6
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/DeptController.java
  2. +0
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/dept/EditDeptRequest.java

+ 6
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/controller/DeptController.java View File

@@ -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);
}


+ 0
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/request/dept/EditDeptRequest.java View File

@@ -40,5 +40,4 @@ public class EditDeptRequest {
*/
private List<RoadSectionDto> roadSectionDtoList;


}

Loading…
Cancel
Save