BatteryClient.java
1.04 KB
package cn.com.glsx.stdinterface.api;
import cn.com.glsx.stdinterface.dto.DevicePowerDTO;
import cn.com.glsx.stdinterface.factory.FreqRecordFallbackFactory;
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.RequestParam;
/**
* @author xiangyanlin
* @date 2022/4/12
*/
@FeignClient(name = "ne-shield-standard-interfaces", path = "/nesi/battery", fallbackFactory = FreqRecordFallbackFactory.class, decode404 = true)
public interface BatteryClient {
/**
* 保存电量信息
*
* @param devicePowerDTO
*/
@PostMapping(value = "/save")
R saveBatteryInfo(DevicePowerDTO devicePowerDTO);
/**
* 根据设备sn获取{当前绑定中的}设备电量
* @param sn 设备号
* @return 设备电量
*/
@GetMapping("/queryOneBySn")
R<DevicePowerDTO> getDevicePowerBySn(@RequestParam("sn") String sn);
}