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
package jnpf.permission;
 
import jnpf.permission.entity.UserEntity;
import jnpf.permission.entity.UserRelationEntity;
import jnpf.permission.fallback.UserRelationApiFallback;
import jnpf.permission.model.permission.PermissionModel;
import jnpf.permission.model.userrelation.UserRelationSynModel;
import jnpf.utils.FeignName;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
 
import java.util.Collection;
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 = UserRelationApiFallback.class, path = "/UserRelation")
public interface UserRelationApi {
 
    /**
     * 获取用户关系列表
     *
     * @return
     */
    @GetMapping("/getList/{userId}")
    List<UserRelationEntity> getList(@PathVariable("userId") String userId);
 
    /**
     * 获取用户关系列表
     *
     * @return
     */
    @GetMapping("/getList")
    List<UserRelationEntity> getList(@RequestParam("userId") String userId, @RequestParam("objectType") String objectType);
 
    /**
     * 获取用户关系列表
     *
     * @return
     */
    @PostMapping("/getListByUserIdAll")
    List<UserRelationEntity> getListByUserIdAll(@RequestBody List<String> id);
 
    /**
     * 获取用户关系列表
     *
     * @return
     */
    @PostMapping("/getListByObjectIdAll")
    List<UserRelationEntity> getListByObjectIdAll(@RequestBody List<String> id);
 
    /**
     * 根据用户主键获取列表
     *
     * @param userId 用户主键
     * @return
     */
    @GetMapping("/getListByUserId")
    List<UserRelationEntity> getListByUserId(@RequestParam("userId") String userId);
 
    @GetMapping("/getListByUserIdAndObjType")
    List<UserRelationEntity> getListByUserIdAndObjType(@RequestParam("userId") String userId,
                                                       @RequestParam("objectType") String objectType);
 
    @GetMapping("/getUserPosAndRole")
    List<String> getUserPosAndRole(@RequestParam("userId") String userId,
                                                       @RequestParam("objectType") String objectType,
                                                       @RequestParam("tenantId") String tenantId);
 
    @PostMapping("/getUserProgeny")
    List<UserEntity> getUserProgeny(@RequestBody List<String> idList,@RequestParam("enableMark") String enableMark);
    @PostMapping("/getUserAndSub")
    List<UserEntity> getUserAndSub(@RequestBody List<String> idList,@RequestParam("enableMark") String enableMark);
    @GetMapping("/getObjectVoList/{objectType}")
    List<PermissionModel> getObjectVoList(@PathVariable("objectType")String objectType);
    @GetMapping("/getOrgListByUserId")
    List<UserRelationEntity> getOrgListByUserId(@RequestParam("id") String id,@RequestParam("organize")  String organize);
 
    @PostMapping("/create")
    void save(@RequestBody UserRelationEntity userRelationEntity);
 
    @PostMapping("/removeOrgRelation")
    void removeOrgRelation(@RequestBody List<UserRelationEntity> userRelationEntities, @RequestParam("sysObjId") String sysObjId);
}