Browse Source

提交修改部门接口代码

tags/v1.0.0^2
wanjing 2 years 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

package com.tuoheng.admin.controller; package com.tuoheng.admin.controller;


import com.alibaba.fastjson.JSON;
import com.tuoheng.admin.request.dept.AddDeptRequest; import com.tuoheng.admin.request.dept.AddDeptRequest;
import com.tuoheng.admin.request.dept.EditDeptRequest; import com.tuoheng.admin.request.dept.EditDeptRequest;
import com.tuoheng.admin.service.dept.IDeptService; import com.tuoheng.admin.service.dept.IDeptService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;


import java.util.Map;

/** /**
* 部门前端控制器 * 部门前端控制器
* *
* 修改部门 * 修改部门
*/ */
@PutMapping @PutMapping
public JsonResult update(@RequestBody EditDeptRequest oldEditDeptRequest, @RequestBody EditDeptRequest newEditDeptRequest) {
public JsonResult update(@RequestBody Map<String, Object> param) {
log.info("进入修改部门接口"); 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); return deptService.update(oldEditDeptRequest, newEditDeptRequest);
} }



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

*/ */
private List<RoadSectionDto> roadSectionDtoList; private List<RoadSectionDto> roadSectionDtoList;



} }

Loading…
Cancel
Save