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 roleEntities = govStaffRoleService.listRolesByCustomer(customerId); return new Result().ok(roleEntities); } /** * 查询角色模板列表 * @return */ @PostMapping("roletemplates") public Result listGovStaffRoleTemplates() { List roleTemplates = govStaffRoleService.listRoleTemplates(); return new Result().ok(roleTemplates); } }