package com.qnfhq.modules.c2c.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.qnfhq.common.utils.Result;
import com.qnfhq.modules.c2c.dto.C2cMsgContentDTO;
import com.qnfhq.modules.c2c.entity.C2cMsgContentEntity;

/**
 * 聊天消息表
 *
 * @author yelz 30262728@qq.com
 * @since 1.0.0 2025-11-25
 */
public interface C2cMsgContentService extends IService<C2cMsgContentEntity> {

    /**
     * 保存普通消息
     * @param dto
     * @return
     * @throws Exception
     */
    Result saveMsg(C2cMsgContentDTO dto) throws Exception;

    /**
     * 保存C2c订单消息
     * @param dto
     * @return
     * @throws Exception
     */
    Result saveC2cOrderMsg(C2cMsgContentDTO dto) throws Exception;

    /**
     * 发送创建c2c订单消息
     * @param buyId
     * @param sellId
     * @param orderId
     * @param orderNo
     */
    void sendOrderCreateMsg(Long buyId, Long sellId, Long orderId,String orderNo) throws Exception;


    /**
     * 发送取消c2c订单消息
     * @param buyId
     * @param sellId
     * @param orderId
     * @param orderNo
     */
    void sendOrderCancelMsg(Long buyId, Long sellId, Long orderId,String orderNo);


    /**
     * 订单支付成功消息
     * @param buyId
     * @param sellId
     * @param orderId
     * @param orderNo
     */
    void sendOrderPayMsg(Long buyId, Long sellId, Long orderId,String orderNo);


    /**
     * 订单完成消息
     * @param buyId
     * @param sellId
     * @param orderId
     * @param orderNo
     */
    void sendOrderCompleteMsg(Long buyId, Long sellId, Long orderId,String orderNo);
}