package com.njcn.supervision.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.supervision.api.fallback.UserLedgerOldFeignClientFallbackFactory;
import com.njcn.supervision.pojo.param.user.UserReportParam;
import com.njcn.supervision.pojo.vo.user.NewUserReportVO;
import com.njcn.supervision.pojo.vo.user.UserLedgerVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * 流程实例 Api 接口
 *
 */
@FeignClient(value = ServerInfo.SUPERVISION, path = "/userReport", fallbackFactory = UserLedgerOldFeignClientFallbackFactory.class)
public interface UserLedgerOldFeignClient {


    @PostMapping("/selectUserList")
    HttpResult<List<UserLedgerVO>> selectUserList(@RequestBody UserReportParam userReportParam);

    @GetMapping("/selectUserInfo")
    HttpResult<UserLedgerVO> selectUserInfo(@RequestParam("id") String id);

    @PostMapping(value = "/bindUserStation")
    HttpResult<List<UserLedgerVO>> bindUserStation(@RequestParam("userId")String userId,@RequestParam("stationId")String stationId);

    @PostMapping("/getUserReportByIds")
    HttpResult<List<NewUserReportVO>> getUserReportByIds(@RequestBody List<String> ids);
}
