DeviceClient.java
1.05 KB
package cn.com.glsx.stdinterface.api;
import cn.com.glsx.stdinterface.dto.DeviceDto;
import cn.com.glsx.stdinterface.factory.DeviceFallbackFactory;
import com.glsx.plat.core.web.R;
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.Collection;
import java.util.List;
/**
* Vehicle feign
*
* @author yangll
*/
@FeignClient(name = "ne-shield-standard-interfaces", path = "/nesi/device", fallbackFactory = DeviceFallbackFactory.class, decode404 = true)
public interface DeviceClient {
/**
* 通过设备号获取车设备数据
*
* @param sn 设备号
* @return
*/
@GetMapping(value = "/getDeviceBySn")
R<DeviceDto> getDeviceBySn(@RequestParam String sn);
@PostMapping(value = "/selectBySns")
R<List<DeviceDto>> selectBySns(@RequestBody Collection<String> sns);
}