package com.inspect.metadata.mqutil;

import com.inspect.base.core.web.domain.AjaxResult;
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;

@FeignClient("inspect-main")
public interface FeignMsgClient {
    @PostMapping({"/partrolresult/sendMessage"})
    AjaxResult sendMessageToMainService(@RequestParam("type") String type, @RequestBody String messageBody);

    @PostMapping({"/client/upData"})
    AjaxResult sendMessageToUpperSystem(@RequestParam("type") String type, @RequestParam("msg") String msg);

    @GetMapping({"/partrolresult/taskAndstatus"})
    AjaxResult getMessageByEqpBookId(@RequestParam("eqpbookId") String eqpBookId);

    @GetMapping({"/partrolresult/productionAndstatus"})
    AjaxResult getMessageByDeviceId(@RequestParam("deviceId") String deviceId);

    @PostMapping({"/notify/alarm"})
    AjaxResult sendAbnormalMessageToTask(@RequestParam("type") String type, @RequestParam("msg") String msg);
}
