package com.fs.gtPush.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fs.gtPush.domain.UniPushLog;
import com.fs.gtPush.param.UniPushLogParam;
import com.fs.gtPush.vo.UniPushLogAppVo;
import com.fs.gtPush.vo.UniPushLogLastAndReadStatusVo;

import java.util.List;

/**
 * uni推送消息记录Service接口
 *
 * @author fs
 * @date 2025-03-12
 */
public interface UniPushLogService extends IService<UniPushLog>{
    /**
     * 查询uni推送消息记录
     *
     * @param id uni推送消息记录主键
     * @return uni推送消息记录
     */
    UniPushLog selectUniPushLogById(String id);

    /**
     * 查询uni推送消息记录列表
     *
     * @param uniPushLog uni推送消息记录
     * @return uni推送消息记录集合
     */
    List<UniPushLog> selectUniPushLogList(UniPushLogParam uniPushLog);

    /**
     * 新增uni推送消息记录
     *
     * @param uniPushLog uni推送消息记录
     * @return 结果
     */
    int insertUniPushLog(UniPushLog uniPushLog);

    /**
     * 修改uni推送消息记录
     *
     * @param uniPushLog uni推送消息记录
     * @return 结果
     */
    int updateUniPushLog(UniPushLog uniPushLog);

    /**
     * 批量删除uni推送消息记录
     *
     * @param ids 需要删除的uni推送消息记录主键集合
     * @return 结果
     */
    int deleteUniPushLogByIds(String[] ids);

    /**
     * 删除uni推送消息记录信息
     *
     * @param id uni推送消息记录主键
     * @return 结果
     */
    int deleteUniPushLogById(String id);

    /**
     * 查询uni推送消息记录最新记录,且是否含有未读消息
     * @param userId
     * @return
     */
    UniPushLogLastAndReadStatusVo getLastAndReadStatus(Long userId);

    Integer setIsRead(List<Long> logIds,Long userId);

    List<UniPushLogAppVo> selectUniPushLogListApp(UniPushLogParam uniPushLog);

    void insertLogBatch(List<UniPushLog> uniPushLogs);


}
