package com.manage.dao;

import com.manage.entity.Power_Notice;
import com.manage.entity.Power_Sys_Dict;
import com.manage.vo.Power_NoticeVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface Power_NoticeMapper {
    int deleteByPrimaryKey(Integer noticeId);

    int insert(Power_Notice record);

    int insertSelective(Power_Notice record);

    Power_Notice selectByPrimaryKey(Integer noticeId);

    int updateByPrimaryKeySelective(Power_Notice record);

    int updateByPrimaryKey(Power_Notice record);

    List<Power_Notice> selectAllByUserIdOrRoleIdAndSysIdOrSysFlag(@Param("userId") Integer userId,@Param("roleId")Integer roleId,@Param("sysId")Integer sysId,@Param("sysFlag")String sysFlag);

    Power_Notice checkTypeSysFlagOrTypeSysName(@Param("noticeTypeFlag") String noticeTypeFlag,@Param("noticeTypeName")String noticeTypeName);

    List<Power_Notice> selectNoticeTypeList(Power_NoticeVo powerNotice);

    List<Power_Notice> selectSysByAdmin(@Param("roleId")Integer roleId,@Param("userId")Integer userId,@Param("record")Power_NoticeVo record);

    List<Power_Notice> selectSysByNotAdmin(@Param("userId")Integer userId,@Param("isRoleManage")Integer isRoleManage);

    List<Power_Notice> selectNoticeListByParentId(@Param("record") Power_NoticeVo record,@Param("userId")Integer userId);

    List<Power_Notice> selectAll(@Param("roleId")Integer roleId,@Param("userId")Integer userId,@Param("record") Power_NoticeVo record);
    List<Power_NoticeVo> selectALlByPower(@Param("roleId")Integer roleId,@Param("userId")Integer userId,@Param("record")Power_NoticeVo record);
    List<Power_NoticeVo> selectALlByPowerWithExport(@Param("roleId")Integer roleId,@Param("userId")Integer userId,@Param("record")Power_NoticeVo record);
    List<Power_NoticeVo> getTotal(@Param("roleId")Integer roleId,@Param("userId")Integer userId,@Param("record")Power_NoticeVo record);
    List<Power_NoticeVo> selectAllByIds(@Param("noticeIds")String noticeIds);

    /**
     * 按用户id查询未读通知数量
     * */
    int getUnReadCount(@Param("userId")Integer userId);

    void simpleInsert(List<Power_Notice> list);
}