package com.qmth.sop.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.sop.business.bean.result.SysMessageCountResult;
import com.qmth.sop.business.bean.result.SysMessageResult;
import com.qmth.sop.business.bean.result.SysMessageWorkResult;
import com.qmth.sop.business.entity.SysMessage;
import com.qmth.sop.business.entity.SysNotice;
import com.qmth.sop.business.entity.TSJobRemind;
import com.qmth.sop.common.enums.MessageTypeEnum;

import java.util.List;
import java.util.Map;

/**
 * 系统消息 服务类
 *
 * @author: shudonghui
 * @date: 2023-08-07 13:53:29
 * @version: 1.0
 * @email: shudonghui@qmth.com.cn
 * @Company: www.qmth.com.cn
 */
public interface SysMessageService extends IService<SysMessage> {

    /**
     * 查询列表
     *
     * @param iPage
     * @return
     */
    IPage<SysMessageResult> query(IPage<Map> iPage, Long noticeId, String city, Long supplierId, Boolean status);

    List<SysMessageResult> query(Long noticeId, String city, Long supplierId, Boolean status);


    SysMessageCountResult count(long noticeId);

    void deleteByNoticeId(long id);

    void publishByNotice(SysNotice sysNotice);

    /**
     * 保存消息
     *
     * @param sysMessageList
     */
    void saveSysMessage(List<SysMessage> sysMessageList);

    boolean read(long id);


    long countByTypes(MessageTypeEnum[] types);

    IPage<SysMessageWorkResult> pageByTypes(IPage<Map> iPage, MessageTypeEnum[] types, Boolean status, Long serviceId, String custom, String query, Long startTime, Long endTime);
}