1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package com.keao.edu.common.dao;
- import com.keao.edu.common.dal.BaseDAO;
- import com.keao.edu.common.entity.Mapper;
- import com.keao.edu.common.entity.SysMessage;
- import com.keao.edu.common.enums.MessageSendMode;
- import org.apache.ibatis.annotations.Param;
- import java.util.List;
- public interface SysMessageDao extends BaseDAO<Long, SysMessage> {
- public List<SysMessage> queryUserInRecentMinList(@Param("mobile") String mobile, @Param("recentMin") int recentMin, @Param("type") MessageSendMode type);
- /**
- * 根据状态查询最近N分钟的记录
- * @param status 状态值
- * @param recentMin 最近分钟数
- * @return
- */
- public List<SysMessage> queryByStatusAndTime(@Param("status") int status, @Param("recentMin") int recentMin);
- /**
- * 批量插入
- * @param messages
- * @return
- */
- public int batchInsert(List<SysMessage> messages);
- /**
- * 查询消息未读条数
- * @param type
- * @param userId
- * @return
- */
- public List<Mapper> queryCountOfUnread(@Param("type") MessageSendMode type, @Param("userId") Integer userId);
- /**
- * 修改用户所有消息阅读状态
- */
- public int updateStatus(@Param("userId") Integer userId, @Param("status") int status);
- /**
- * 修改单个消息状态
- */
- public int updateOneStatus(@Param("id") Long id, @Param("status") int status);
- }
|