Files
IM/MS/works/db/UserFriendsDB.h
dongl 61ff6fe46b 修改了 添加好友的代码
发现了获取验证码的bug delete sri后 无报错不发数据包
还有填写验证码 错误 session删除了
2023-06-16 20:37:27 +08:00

35 lines
998 B
C++

//
// Created by dongl on 23-5-4.
//
#ifndef IM2_USERFRIENDSDB_H
#define IM2_USERFRIENDSDB_H
#include <optional>
#include "DB.h"
#include "po/po.h"
#include "document.h"
class UserFriendsDB : public DB {
public:
// 查询添加类型
char select_add_type(uint64_t account);
// 查询用户 搜索好友
std::optional<PoUser> select_user(uint64_t account);
bool select_friend(uint64_t account, uint64_t friend_key);
// 查询全部好友 好友列表
std::optional<std::string> select_friends_all(uint64_t account);
std::optional<rapidjson::Document> select_friends_all_json(uint64_t account);
// 查询好友信息
std::optional<rapidjson::Document> select_friends_info(uint64_t account, uint64_t friends);
// 添加待审核好友列表
void insert_friends_to_be_added(uint64_t account, uint64_t friends);
// 添加好友
std::tuple<bool, std::string> add_friends(uint64_t source, uint64_t target);
};
#endif //IM2_USERFRIENDSDB_H