package com.yida.data.user.feign;

import com.yida.data.common.core.common.ResultBean;
import com.yida.data.common.core.entity.constant.FebsServerConstant;
import com.yida.data.common.core.entity.user.EduUserDeviceFactory;
import com.yida.data.user.fallback.RemoteUserDeviceFactoryServiceFallback;
import com.yida.data.user.vo.UserDeviceInfoVO;

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;

@FeignClient(value = FebsServerConstant.EDU_USER, contextId = "userDeviceFactoryService",
        fallbackFactory = RemoteUserDeviceFactoryServiceFallback.class)
public interface RemoteUserDeviceFactoryService {

    @PostMapping("/in/userDeviceFactory/batchSave")
    ResultBean batchSaveUserDeviceFactory(@RequestBody List<EduUserDeviceFactory> userDeviceFactoryList);

    /**
     * 通过考勤设备方学生的唯一标识查询系统内用户信息
     */
    @GetMapping("/in/userDeviceFactory/getUserInfoByDevciceFactory")
    ResultBean<UserDeviceInfoVO> getUserInfoByDevciceFactory(@RequestParam("flag") String flag,
                                                             @RequestParam("type") String type);
}
