Browse Source

政府端-接口添加token参数

master
sunyuchao 5 years ago
parent
commit
c3ced08293
  1. 14
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java
  2. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/DepartmentController.java

14
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java

@ -17,6 +17,8 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.form.*;
@ -52,7 +54,7 @@ public class AgencyController {
* @Description 添加组织
*/
@PostMapping("addagency")
public Result<AddAgencyResultDTO> addAgency(@RequestBody AddAgencyFormDTO formDTO) {
public Result<AddAgencyResultDTO> addAgency(@LoginUser TokenDto tokenDTO, @RequestBody AddAgencyFormDTO formDTO) {
return agencyService.addAgency(formDTO);
}
@ -63,7 +65,7 @@ public class AgencyController {
* @Description 组织名称编辑
*/
@PostMapping("editagency")
public Result editAgency(@RequestBody EditAgencyFormDTO formDTO) {
public Result editAgency(@LoginUser TokenDto tokenDTO, @RequestBody EditAgencyFormDTO formDTO) {
return agencyService.editAgency(formDTO);
}
@ -74,7 +76,7 @@ public class AgencyController {
* @Description 删除组织机关
*/
@PostMapping("removeagency")
public Result removeAgency(@RequestBody RemoveAgencyFormDTO formDTO) {
public Result removeAgency(@LoginUser TokenDto tokenDTO, @RequestBody RemoveAgencyFormDTO formDTO) {
return agencyService.removeAgency(formDTO);
}
@ -85,7 +87,7 @@ public class AgencyController {
* @Description 组织首页-获取组织机构信息
*/
@PostMapping("agencydetail")
public Result<AgencysResultDTO> agencyDetail(@RequestBody AgencydetailFormDTO formDTO) {
public Result<AgencysResultDTO> agencyDetail(@LoginUser TokenDto tokenDTO, @RequestBody AgencydetailFormDTO formDTO) {
return agencyService.agencyDetail(formDTO);
}
@ -96,7 +98,7 @@ public class AgencyController {
* @Description 组织首页-下级机关列表
*/
@PostMapping("subagencylist")
public Result<SubAgencyResultDTO> subAgencyList(@RequestBody SubAgencyFormDTO formDTO) {
public Result<SubAgencyResultDTO> subAgencyList(@LoginUser TokenDto tokenDTO, @RequestBody SubAgencyFormDTO formDTO) {
return agencyService.subAgencyList(formDTO);
}
@ -107,7 +109,7 @@ public class AgencyController {
* @Description 获取组织列表
*/
@PostMapping("agencylist")
public Result<List<AgencyListResultDTO>> agencyList(@RequestBody AgencyListFormDTO formDTO) {
public Result<List<AgencyListResultDTO>> agencyList(@LoginUser TokenDto tokenDTO, @RequestBody AgencyListFormDTO formDTO) {
return agencyService.agencyList(formDTO);
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/DepartmentController.java

@ -47,7 +47,7 @@ public class DepartmentController {
* @Description 添加部门
*/
@PostMapping("adddepartment")
public Result<AddDepartmentResultDTO> addDepartment(@RequestBody AddDepartmentFormDTO formDTO) {
public Result<AddDepartmentResultDTO> addDepartment(@LoginUser TokenDto tokenDTO, @RequestBody AddDepartmentFormDTO formDTO) {
return departmentService.addDepartment(formDTO);
}
@ -58,7 +58,7 @@ public class DepartmentController {
* @Description 部门信息修改
*/
@PostMapping("editdepartment")
public Result editDepartment(@RequestBody EditDepartmentFormDTO formDTO) {
public Result editDepartment(@LoginUser TokenDto tokenDTO, @RequestBody EditDepartmentFormDTO formDTO) {
return departmentService.editDepartment(formDTO);
}
@ -69,7 +69,7 @@ public class DepartmentController {
* @Description 删除部门
*/
@PostMapping("removedepartment")
public Result removeDepartment(@RequestBody RemoveDepartmentFormDTO formDTO) {
public Result removeDepartment(@LoginUser TokenDto tokenDTO, @RequestBody RemoveDepartmentFormDTO formDTO) {
return departmentService.removeDepartment(formDTO);
}
@ -80,7 +80,7 @@ public class DepartmentController {
* @Description 获取部门详情
*/
@PostMapping("departmentdetail")
public Result<DepartmentDetailResultDTO> departmentDetail(@RequestBody DepartmentdetailFormDTO formDTO) {
public Result<DepartmentDetailResultDTO> departmentDetail(@LoginUser TokenDto tokenDTO, @RequestBody DepartmentdetailFormDTO formDTO) {
return departmentService.departmentDetail(formDTO);
}
@ -91,7 +91,7 @@ public class DepartmentController {
* @Description 组织首页-获取机关下部门列表
*/
@PostMapping("departmentinagencylist")
public Result<DepartmentInAgencyResultDTO> departmentInAgencyList(@RequestBody DepartmentInAgencyFormDTO formDTO) {
public Result<DepartmentInAgencyResultDTO> departmentInAgencyList(@LoginUser TokenDto tokenDTO, @RequestBody DepartmentInAgencyFormDTO formDTO) {
return departmentService.departmentInAgencyList(formDTO);
}
@ -102,7 +102,7 @@ public class DepartmentController {
* @Description 获取机构下部门列表
*/
@PostMapping("departmentlist")
public Result<List<DepartmentListResultDTO>> departmentList(@RequestBody DepartmentListFormDTO formDTO) {
public Result<List<DepartmentListResultDTO>> departmentList(@LoginUser TokenDto tokenDTO, @RequestBody DepartmentListFormDTO formDTO) {
return departmentService.departmentList(formDTO);
}
}
Loading…
Cancel
Save