Commit 819be5cb authored by neo's avatar neo

[DEL] delete permission service interface

parent a6b39d64
package pwc.taxtech.atms.controller;
import java.util.List;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -11,11 +10,11 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiOperation;
import pwc.taxtech.atms.dto.navtree.DevTreeDto;
import pwc.taxtech.atms.dto.navtree.RolePermissionDisplayDto;
import pwc.taxtech.atms.service.PermissionService;
import pwc.taxtech.atms.service.impl.PermissionServiceImpl;
import java.util.List;
@RestController
@RequestMapping("/api/v1/permission/")
......@@ -24,26 +23,29 @@ public class PermissionController {
private static Logger logger = LoggerFactory.getLogger(PermissionController.class);
@Autowired
private PermissionService permissionService;
private PermissionServiceImpl permissionService;
@ApiOperation(value = "Active or Deactive the specific area.")
@RequestMapping(value = "getIvhTreePermissionsByRoleID", method = RequestMethod.GET)
public @ResponseBody RolePermissionDisplayDto getIvhTreePermissionsByRoleId(@RequestParam String roleID,
@RequestParam String serviceType) {
public @ResponseBody
RolePermissionDisplayDto getIvhTreePermissionsByRoleId(@RequestParam String roleID,
@RequestParam String serviceType) {
logger.info("getIvhTreePermissionsByRoleId: roleId={}, serviceType={}.", roleID, serviceType);
return permissionService.getIvhTreePermissionsByRoleId(roleID, serviceType);
}
@ApiOperation(value = "通过传入的角色Id列表获取树形结构权限")
@RequestMapping(value = "getIvhTreePermissionsByRoleIDList", method = RequestMethod.POST)
public @ResponseBody List<DevTreeDto> getIvhTreePermissionsByRoleIdList(@RequestBody List<String> roleIdList,
@RequestParam String serviceType) {
public @ResponseBody
List<DevTreeDto> getIvhTreePermissionsByRoleIdList(@RequestBody List<String> roleIdList,
@RequestParam String serviceType) {
return permissionService.getIvhTreePermissionsByRoleIdList(roleIdList, serviceType);
}
@ApiOperation(value = "获取所有权限树形结构列表")
@RequestMapping(value = "getAllPermissions", method = RequestMethod.GET)
public @ResponseBody List<DevTreeDto> getAllPermissions(@RequestParam String serviceType) {
public @ResponseBody
List<DevTreeDto> getAllPermissions(@RequestParam String serviceType) {
return permissionService.getAllPermissions(serviceType);
}
}
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.dto.navtree.DevTreeDto;
import pwc.taxtech.atms.dto.navtree.RolePermissionDisplayDto;
public interface PermissionService {
RolePermissionDisplayDto getIvhTreePermissionsByRoleId(String roleId, String serviceType);
@SuppressWarnings("rawtypes")
List<DevTreeDto> getIvhTreePermissionsByRoleIdList(List<String> roleIdList, String serviceType);
@SuppressWarnings("rawtypes")
List<DevTreeDto> getAllPermissions(String serviceType);
}
......@@ -45,7 +45,6 @@ import pwc.taxtech.atms.entity.*;
import pwc.taxtech.atms.entity.UserRoleExample.Criteria;
import pwc.taxtech.atms.exception.ApplicationException;
import pwc.taxtech.atms.service.OrganizationService;
import pwc.taxtech.atms.service.PermissionService;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -58,7 +57,7 @@ import java.util.stream.Collectors;
public class UserRoleServiceImpl extends AbstractService {
@Autowired
private PermissionService permissionService;
private PermissionServiceImpl permissionService;
@Autowired
private OrganizationService organizationService;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment