This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#pragma once
#include"User.h"
#include"MYSQLConnectionPool.h"
class MYSQLConnectionPool;
class DBConnection;
using spDBPool=std::shared_ptr<MYSQLConnectionPool>;
class UserDAO
{
private:
spDBPool mysqlPool_; //共享的mysql连接池
public:
UserDAO(spDBPool _mysqlPool); //构造函数
~UserDAO(); //析构函数
int CreateUser(User& _user); //创建用户,返回userId(0表失败)
int LogIn(const std::string& _email,const std::string& _passwd); //登录,返回userId(0表失败)
bool exist(int userId); //根据userId判断用户是否存在
};