package com.bonus.zlpt.equip.api;

import com.bonus.zlpt.common.core.constant.ServiceNameConstants;
import com.bonus.zlpt.common.core.web.domain.AjaxResult;
import com.bonus.zlpt.equip.api.domain.TypeInfo;
import com.bonus.zlpt.equip.api.factory.DevInfoServiceApiFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletResponse;

@FeignClient(contextId = "remoteDevInfoService", value = ServiceNameConstants.EQUIP_SERVICE, fallbackFactory = DevInfoServiceApiFallbackFactory.class)
public interface RemoteDevInfoService
{
    /**
     * 设备查询
     * @param maId
     * @return
     */
    @GetMapping(value = "/dev/getInfo/{maId}")
    public AjaxResult getInfo(@PathVariable("maId") Long maId);

    /**
     * 添加设备
     * @param typeInfo
     * @param typeInfo
     */
    @PostMapping("/dev")
    void add(@RequestBody TypeInfo typeInfo);


}
