package cn.ey.biz.module.system.api.user;

import cn.ey.biz.common.pojo.R;
import cn.ey.biz.module.system.enums.ApiConstants;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = ApiConstants.NAME)
@Api(tags = "RPC 服务 - 用户中心")
public interface UserGroupApi {

    String PREFIX = ApiConstants.PREFIX + "/user/group";

    @GetMapping(PREFIX + "/memberOf")
    @ApiOperation("通过用户查询用户组")
    @ApiImplicitParam(name = "identity", value = "用户标识", example = "Adams@Contoso.com", required = true, dataTypeClass = String.class)
    R<List<String>> getAadMemberOfGroups(@RequestParam("identity") String identity);

}
