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

import cn.ey.biz.common.pojo.R;
import cn.ey.biz.module.system.api.hrm.dto.HrmSimpleInfoRespDTO;
import cn.ey.biz.module.system.api.hrm.dto.HrmUserInfoDTO;
import cn.ey.biz.module.system.enums.ApiConstants;
import io.swagger.annotations.Api;
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 javax.validation.Valid;

@FeignClient(name = ApiConstants.NAME)
@Api(tags = "人力资源 - 用户相关")
public interface HrmApi {

    String PREFIX = ApiConstants.PREFIX + "/hrm";

    @GetMapping(PREFIX + "/get-hrm-simpleInfo")
    @ApiOperation("人员信息")
    R<HrmSimpleInfoRespDTO> getHrmSimpleInfo(@RequestParam("userid")@Valid String userid);

    @GetMapping(PREFIX + "/get-weaver-user")
    @ApiOperation("根据code获取泛微用户")
    R<HrmUserInfoDTO> getWeaverUser(@RequestParam("userCode")@Valid String userCode,
                                    @RequestParam("sysCode") String sysCode);

}
