package com.xhpc.common.api;

import com.xhpc.common.api.factory.WebSocketFallbackFactory;
import com.xhpc.common.core.constant.ServiceNameConstants;
import com.xhpc.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author yuyang
 * @date 2021/9/10 15:13
 * @Version 1.0
 */
@FeignClient(contextId ="webSocketService",value = ServiceNameConstants.XHPC_WXMA, fallbackFactory = WebSocketFallbackFactory.class)
public interface WebSocketService {

    /**
     * 发送实时数据接口
     * @param userId  接收用户
     * @param message 接收信息
     * @return
     */
    @GetMapping("/orderWebSocket/getMessage")
    R getMessage(@RequestParam(value = "userId") String userId, @RequestParam(value = "message") String message);
}
