package cn.reghao.tnb.content.app.chat.db.mapper;

import cn.reghao.jutil.jdk.web.db.BaseMapper;
import cn.reghao.tnb.content.app.chat.model.dto.ChatUserInfo;
import cn.reghao.tnb.content.app.chat.model.dto.group.GroupDetailRet;
import cn.reghao.tnb.content.app.chat.model.dto.group.GroupInfoRet;
import cn.reghao.tnb.content.app.chat.model.po.GroupInfo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author reghao
 * @date 2022-04-21 20:52:07
 */
@Mapper
public interface GroupInfoMapper extends BaseMapper<GroupInfo> {
    void updateGroupInfo(GroupInfo groupInfo);

    GroupInfo findByGroupId(long groupId);
    GroupDetailRet findDetailByGroupId(long groupId);
    List<GroupInfoRet> findGroupsByUserId(long userId);
    ChatUserInfo findDialogGroupInfo(long groupId);
}
