package com.njcn.csdevice.api;

import com.njcn.common.pojo.constant.ServerInfo;
import com.njcn.common.pojo.response.HttpResult;
import com.njcn.csdevice.api.fallback.CsUpgradeLogsClientFallbackFactory;
import com.njcn.csdevice.pojo.po.CsUpgradeLogs;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author caozehui
 * @data 2026-04-23
 */
@FeignClient(value = ServerInfo.CS_DEVICE_BOOT, path = "/csUpgradeLogs", fallbackFactory = CsUpgradeLogsClientFallbackFactory.class,contextId = "csUpgradeLogs")
public interface CsUpgradeLogsFeignClient {
    @PostMapping("/add")
    HttpResult add(@RequestBody CsUpgradeLogs csUpgradeLogs);

    @PostMapping("/update")
    @ApiOperation("修改升级日志")
    HttpResult<Boolean> update(@RequestParam("devId") String devId, @RequestParam("code") String code, @RequestParam("result") Integer result);

}
