package com.qnfhq.modules.c2c.service;

import com.qnfhq.common.page.PageData;
import com.qnfhq.common.service.BaseService;
import com.qnfhq.modules.c2c.entity.C2cMsgContentEntity;
import com.qnfhq.modules.c2c.entity.C2cMsgRelationEntity;

import java.util.Map;

/**
 * 用户消息关联表
 *
 * @author yelz 30262728@qq.com
 * @since 1.0.0 2025-11-25
 */
public interface C2cMsgRelationService extends BaseService<C2cMsgRelationEntity> {
    /**
     * 查询用户聊天列表
     * @param params
     * @return
     */
    PageData<C2cMsgRelationEntity> selectChatPage(Map<String, Object> params);

    /**
     * 保存消息关联
     * @param msgEntity
     */
    void saveMsgRelation(C2cMsgContentEntity msgEntity) throws Exception;

    /**
     * 存发件人的发件箱
     * @param msgEntity
     * @throws Exception
     */
    void saveSenderMsg(C2cMsgContentEntity msgEntity) throws Exception;

    /**
     *  存收件人的收件箱
     * @param msgEntity
     * @throws Exception
     */
    void saveRecipientMsg(C2cMsgContentEntity msgEntity) throws Exception;
}