DeviceLocationClient.java 1.2 KB
package cn.com.glsx.stdinterface.api;


import cn.com.glsx.stdinterface.dto.DeviceLocationDto;
import cn.com.glsx.stdinterface.factory.DeviceLocationFallbackFactory;
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.ResponseBody;

import java.util.Collection;
import java.util.List;

/**
 * 设备上点表调用Feign
 *
 * @author yll
 */
@FeignClient(name = "ne-shield-standard-interfaces", path = "/nesi/devicelocation", fallbackFactory = DeviceLocationFallbackFactory.class, decode404 = true)
public interface DeviceLocationClient {

    /**
     * 插入或者更新设备上点数据
     *
     * @param deviceLocationDtos 设备上点集合
     * @return
     */
    @PostMapping(value = "/dropLibrary")
    @ResponseBody
    R dropLibrary(@RequestBody Collection<DeviceLocationDto> deviceLocationDtos);

    /**
     * 获取E盾中的所有设备号集合
     */
    @GetMapping(value = "getAllSn")
    @ResponseBody
    R<List<String>> getAllSn();
}