package com.huiju.estateagents.sample.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.huiju.estateagents.base.ResponseBean;
import com.huiju.estateagents.sample.entity.TaNotice;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 开屏通知  服务类
 * </p>
 *
 * @author fxf
 * @since 2020-03-18
 */
public interface ITaNoticeService extends IService<TaNotice> {

    /**
     * 条件查询开屏通知列表
     *
     * @param pageNum
     * @param pageSize
     * @param title
     * @param targetType
     * @param targetName
     * @param status
     * @param type
     * @return
     */
    ResponseBean listNoticeByCondition(Integer pageNum, Integer pageSize, String title, String targetType, String targetName,
                                       Integer status, String type);

    ResponseBean listNoticeByConditionForAdmin(Integer pageNum, Integer pageSize, String type);

    /**
     * 批量删除
     *
     * @param taNoticeList
     * @return
     */
    ResponseBean batchDelete(List<TaNotice> taNoticeList);

    /**
     * 自动下架已过期的开屏通知
     *
     * @return
     */
    Integer updateStatusByInvalidTime();
}
