package shop.alien.second.feign;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(url = "${feign.alienStore.url}", name = "alien-store")
public interface AlienStoreFeign {

    @GetMapping("/message/getMessageList")
    JSONObject getMessageList(@RequestParam(value = "receiverId") String receiverId,
                              @RequestParam(value = "friendType") int friendType,
                              @RequestParam(value = "search") String search);

//    /**
//     *
//     * @param messageReceiverId  消息接收者
//     * @param senderId           发送人
//     * @param receiverId         接收人
//     * @param category           消息类别(message-聊一聊消息  notice-通知)
//     * @param type               消息类型  1-文本  2-图片 3-链接分享  4-二手交易(确认/拒绝/取消)  5-二手交易签到提醒  6-二手交易已签到
//     * @param text               消息内容
//     * @param messageId          消息表存入的主键id
//     */
//    @GetMapping("/websocket/sendMsgToClientByPhoneId")
//    JSONObject sendMsgToClientByPhoneId(@RequestParam(value = "messageReceiverId") String messageReceiverId,
//                                        @RequestParam(value = "senderId") String senderId,
//                                        @RequestParam(value = "receiverId") String receiverId,
//                                        @RequestParam(value = "category") String category,
//                                        @RequestParam(value = "type") String type,
//                                        @RequestParam(value = "text") String text,
//                                        @RequestParam(value = "messageId") Integer messageId);

    @GetMapping("/websocket/sendMsgToClientByPhoneId")
    JSONObject sendMsgToClientByPhoneId(
                                        @RequestParam(value = "messageReceiverId") String messageReceiverId,
                                        @RequestParam(value = "webSocketVoStr") String webSocketVoStr);

}
