You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
44 lines
1.4 KiB
5 years ago
|
package com.epmet.controller;
|
||
|
|
||
|
import com.epmet.commons.tools.utils.Result;
|
||
|
import com.epmet.dto.RoleDTO;
|
||
|
import com.epmet.dto.result.GovStaffRoleResultDTO;
|
||
|
import com.epmet.dto.result.GovStaffRoleTemplateDTO;
|
||
|
import com.epmet.service.GovStaffRoleService;
|
||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||
|
import org.springframework.web.bind.annotation.RestController;
|
||
|
|
||
|
import java.util.List;
|
||
|
|
||
|
@RequestMapping("govstaffrole")
|
||
|
@RestController
|
||
|
public class GovStaffRoleController {
|
||
|
|
||
|
@Autowired
|
||
|
private GovStaffRoleService govStaffRoleService;
|
||
|
|
||
|
/**
|
||
|
* 根据客户ID查询该客户的角色列表
|
||
|
* @param customerId
|
||
|
* @return
|
||
|
*/
|
||
|
@PostMapping("rolesbycustomer/{customerId}")
|
||
|
public Result listGovStaffRolesByCustomer(@PathVariable("customerId") String customerId) {
|
||
|
List<GovStaffRoleResultDTO> roleEntities = govStaffRoleService.listRolesByCustomer(customerId);
|
||
|
return new Result().ok(roleEntities);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 查询角色模板列表
|
||
|
* @return
|
||
|
*/
|
||
|
@PostMapping("roletemplates")
|
||
|
public Result listGovStaffRoleTemplates() {
|
||
|
List<GovStaffRoleTemplateDTO> roleTemplates = govStaffRoleService.listRoleTemplates();
|
||
|
return new Result().ok(roleTemplates);
|
||
|
}
|
||
|
}
|