package com.sonic.frog.service;


import com.sonic.frog.enums.MessageTypeEnum;
import com.sonic.frog.event.inner.payload.AiImInfoPayload;
import com.sonic.frog.event.inner.payload.AiUserStatPayload;
import com.sonic.frog.event.inner.payload.CalcHeartbeatLevelPayload;
import com.sonic.frog.event.outer.payload.AiChatPayload;

import java.math.BigDecimal;

/**
 * 发送消息到im的mq
 */
public interface CommonSendMqService {

    /**
     * @param payload
     */
    void aiImInfoSendMq(AiImInfoPayload payload);


    /**
     * 计算心动等级发送mq
     *
     * @param payload
     */
    void calHeartbeatLevelSendMq(CalcHeartbeatLevelPayload payload);

    /**
     * 发送AI聊天的MQ消息
     *
     * @param fromUserId
     * @param toUserId
     * @param content
     */
    void sendAiChatMq(Long fromUserId, Long toUserId, String content, MessageTypeEnum messageType, String attach, AiChatPayload.SourceType sourceType);

    /**
     * 发送心动分计算MQ消息
     *
     * @param fromUserId
     * @param toUserId
     */
    void calcHeartbeatScoreMq(Long fromUserId, Long toUserId);

    /**
     * 发送心动分榜单计算MQ消息
     *
     * @param aiId
     * @param userId
     * @param oldHeartbeatVal
     * @param newHeartbeatVal
     */
    void calcHeartbeatRankMq(Long aiId, Long userId, BigDecimal oldHeartbeatVal, BigDecimal newHeartbeatVal);

    /**
     * 发送扣减心动值MQ消息
     *
     * @param userId
     */
    void subtractHeartbeatValMq(Long userId);

    /**
     * Ai数据统计MQ消息
     *
     * @param aiId
     * @param type
     * @param coinNum
     */
    void aiUserStatMq(Long aiId, AiUserStatPayload.Type type, Long coinNum);

    /**
     * ai创建，编辑，删除发送MQ消息
     *
     * @param aiId
     */
    void aiChangeMq(Long aiId, Boolean isDialoguePrologueChange, Boolean isCreate);
}
