You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
650 B

This file contains ambiguous Unicode characters!

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"UserDAO.h"
class UserDAO;
//业务层
class UserService
{
private:
std::unique_ptr<UserDAO> userDAO_;
public:
UserService(std::unique_ptr<UserDAO> _userDAO); //构造函数
// UserService(const UserDAO& _userDAO); //构造函数
~UserService(); //析构函数
int HandleSignUp(const std::string& name,const std::string& email,const std::string& passwd); //处理注册业务返回userId(0表失败)
int HandleLogIn(const std::string& email,const std::string& passwd); //处理登录业务返回userId(0表失败)
};