package net.northking.cctp.executePlan.feign;

import com.hzbank.testteam.autotest.dependencies.baseDefineDependency.vo.ResponseVO;
import com.hzbank.testteam.autotest.dependencies.monsterDependency.dto.TestGroupDTO;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.northking.cctp.common.feign.FeignCctpConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;
import java.util.Map;

@FeignClient(contextId = "apiMonsterCommonService", value = "monster-common", path = "/monster-common/api", configuration = {FeignCctpConfig.class})
public interface ApiMonsterCommonService {

    /**
     * 查询用户
     *
     * @param loginNoList userNameList
     * @return 是否成功
     */
    @RequestMapping(value = "/user/queryUserInfoByLoginNo", method = RequestMethod.POST)
    ResponseVO<Map<String, String>> queryUserInfoByLoginNo(@RequestBody List<String> loginNoList);

    /**
     * 根据用户Ids获取测试小组信息, 包括小组成员信息
     *
     * @param userIds
     * @return
     */
    @ApiOperation(value = "获取测试小组信息", notes = "获取测试小组信息，包括小组成员信息")
    @RequestMapping(value = "/test-group/getTestGroup", method = RequestMethod.POST)
    List<TestGroupDTO> getTestGroup(@ApiParam("用户id集合") @RequestBody(required = false) List<Long> userIds);
}
