package com.kede.common.dao; import com.kede.common.model.ChatMsgUser; import com.kede.wechat.bo.ChatMsgUserBo; import org.apache.ibatis.annotations.Param; import java.util.List; /** * 微信会话存储对象名称(ChatMsgUser)表数据库访问层 * * @author makejava * @since 2025-06-17 14:44:32 */ public interface ChatMsgUserMapper { /** * 通过ID查询单条数据 * * @param id 主键 * @return 实例对象 */ ChatMsgUser selectById(Integer id); /** * 查询指定行数据 * * @param chatMsgUser 查询条件 * @return 对象列表 */ List findChatMsgUserList(ChatMsgUser chatMsgUser); /** * 统计总行数 * * @param chatMsgUser 查询条件 * @return 总行数 */ int findChatMsgUserCount(ChatMsgUser chatMsgUser); /** * 新增数据 * * @param chatMsgUser 实例对象 * @return 影响行数 */ int insert(ChatMsgUser chatMsgUser); /** * 批量新增数据(MyBatis原生foreach方法) * * @param entities List 实例对象列表 * @return 影响行数 */ int insertBatch(@Param("entities") List entities); /** * 批量新增或按主键更新数据(MyBatis原生foreach方法) * * @param entities List 实例对象列表 * @return 影响行数 * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 */ int insertOrUpdateBatch(@Param("entities") List entities); /** * 修改数据 * * @param chatMsgUser 实例对象 * @return 影响行数 */ int update(ChatMsgUser chatMsgUser); /** * 通过主键删除数据 * * @param id 主键 * @return 影响行数 */ int deleteById(Integer id); ChatMsgUser selectByUserId(String userId); List getUserList(@Param("type")Integer type); List selectMyIdByUser(String userId); List selectMyIdByRoom(String userId); }