package com.ruoyi.yunxin.client;

import com.dtflys.forest.annotation.*;
import com.ruoyi.yunxin.convertor.CustomFormConvertor;
import com.ruoyi.yunxin.interceptor.GlodonTokenInterceptor;
import com.ruoyi.yunxin.req.SendAttachMsgReq;
import com.ruoyi.yunxin.req.SendBatchAttachMsgReq;
import com.ruoyi.yunxin.req.SendBatchMsgReq;
import com.ruoyi.yunxin.req.SendMsgReq;
import com.ruoyi.yunxin.resp.SendMsgResp;
import com.ruoyi.yunxin.resp.YxCommonR;
import com.ruoyi.yunxin.resp.YxDataR;

@BaseRequest(baseURL = "${baseUrl}", interceptor = GlodonTokenInterceptor.class)
public interface ImMessageClient {

    /**
     * 发送消息
     * @param req
     * @return
     */
    @Post(url = "/nimserver/msg/sendMsg.action")
    @BodyType(type = "form", encoder = CustomFormConvertor.class)
    YxDataR<SendMsgResp> sendMsg(@Body SendMsgReq req);

    @Post(url = "/nimserver/msg/sendBatchMsg.action")
    YxDataR<YxCommonR> sendBatchMsg(@Body SendBatchMsgReq req);

    /**
     * 发送自定义系统消息
     * @param req
     * @return
     */
    @Post(url = "/nimserver/msg/sendAttachMsg.action")
    YxDataR<YxCommonR> sendAttachMsg(@Body SendAttachMsgReq req);

    @Post(url = "/nimserver/msg/sendBatchAttachMsg.action")
    YxDataR<YxCommonR> sendBatchAttachMsg(@Body SendBatchAttachMsgReq req);


}
