package com.yonge.cooleshow.cms.dal.dao;

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

import com.yonge.cooleshow.cms.dal.entity.HelpCenterContent;
import com.yonge.toolset.mybatis.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

public interface HelpCenterContentDao extends BaseDAO<Long, HelpCenterContent> {

    public int updateContentByCatalog(Map<String, Object> map);

    public int deleteContentByCatalog(Long catalogId);

    void status(Long id);

    /**
     * 发送公告到老师
     *
     * @param helpCenterContent
     */
    void noticeReleaseToTeacher(@Param("param") HelpCenterContent helpCenterContent);

    /**
     * 发送公告到学生
     *
     * @param helpCenterContent
     */
    void noticeReleaseToStudent(@Param("param") HelpCenterContent helpCenterContent);

    /**
     * 查询将要发布的公告 (0 ~ 当前时间 + 5 min 的未发布的公告) 循环发布
     *
     * @return
     */
    List<HelpCenterContent> selectNeedReleaseNotice();

    /**
     * 查看状态为启用的公告
     *
     * @param status
     * @param catalogType
     * @return
     */
    Integer selectByNoticeStatus(@Param("status") Integer status, @Param("catalogType") String catalogType);
}