package jnpf.permission;
|
|
import jnpf.database.model.superQuery.SuperJsonModel;
|
import jnpf.model.login.UserSystemVO;
|
import jnpf.permission.entity.AuthorizeEntity;
|
import jnpf.permission.fallback.AuthorizeApiFallback;
|
import jnpf.permission.model.authorize.AuthorizeVO;
|
import jnpf.utils.FeignName;
|
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* 获取权限信息Api
|
*
|
* @author JNPF开发平台组
|
* @version V3.1.0
|
* @copyright 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
* @date 2021-03-24
|
*/
|
@FeignClient(name = FeignName.PERMISSION_SERVER_NAME, fallback = AuthorizeApiFallback.class, path = "/Authority")
|
public interface AuthorizeApi {
|
|
/**
|
* 根据对象Id获取列表
|
*
|
* @param objectId 对象主键
|
* @return
|
*/
|
@PostMapping("/GetListByObjectId")
|
List<AuthorizeEntity> getListByObjectId(@RequestBody List<String> objectId);
|
|
/**
|
* 根据对象Id获取列表
|
*
|
* @param objectId 对象主键
|
* @return
|
*/
|
@PostMapping("/GetListByObjectIdTenant")
|
List<AuthorizeEntity> GetListByObjectIdTenant(@RequestBody List<String> objectId, @RequestParam("tenantId") String tenantId);
|
|
/**
|
* 根据对象Id获取列表
|
*
|
* @param objectId 对象主键
|
* @return
|
*/
|
@GetMapping("/GetListByObjectId/{objectId}/{type}")
|
List<AuthorizeEntity> getListByObjectId(@PathVariable("objectId") String objectId, @PathVariable("type") String type);
|
|
/**
|
* 将查出来的某个对象删除
|
*
|
* @param id
|
* @return
|
*/
|
@DeleteMapping("/remove")
|
void remove(@RequestParam("id") String id);
|
|
/**
|
* 获取权限集合
|
*
|
* @param singletonOrg
|
* @return
|
*/
|
@GetMapping("/getAuthorize")
|
AuthorizeVO getAuthorize(@RequestParam("singletonOrg") boolean singletonOrg,
|
@RequestParam(value = "currentSystemCode", required = false) String currentSystemCode,
|
@RequestParam(value = "isBackend", required = false) Integer isBackend);
|
|
/**
|
* 通过Item获取权限列表
|
*
|
* @param itemType
|
* @param itemId
|
* @return
|
*/
|
@GetMapping("/getAuthorizeByItem")
|
List<AuthorizeEntity> getAuthorizeByItem(@RequestParam(value = "itemType", required = false) String itemType,
|
@RequestParam(value = "itemId", required = false) String itemId);
|
|
@GetMapping("/getAuthorizeByUser")
|
AuthorizeVO getAuthorizeByUser(@RequestParam("singletonOrg") boolean singletonOrg);
|
|
@GetMapping("/removeAuthByUserOrMenu")
|
void removeAuthByUserOrMenu(@RequestParam(value = "userIds", required = false) List<String> userIds, @RequestParam(value = "menuIds", required = false) List<String> menuIds);
|
|
@GetMapping("/getListByObjectAndItemIdAndType")
|
List<AuthorizeEntity> getListByObjectAndItemIdAndType(@RequestParam(value = "itemId", required = false) String itemId,
|
@RequestParam(value = "itemType", required = false) String itemType);
|
|
@GetMapping("/getListByRoleIdsAndItemType")
|
List<AuthorizeEntity> getListByRoleIdsAndItemType(@RequestParam(value = "roleIds") List<String> roleIds, @RequestParam(value = "itemType") String itemType);
|
|
@GetMapping("/getConditionSql")
|
List<SuperJsonModel> getConditionSql(@RequestParam(value = "moduleId") String moduleId, @RequestParam(value = "systemCode") String systemCode);
|
}
|