ny
昨天 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
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);
}