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);
|
}
|