mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
新增http、mqtt运行库,实现mqtt功能, 新增spdlog
This commit is contained in:
32
src/database/Dao1.h
Normal file
32
src/database/Dao1.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "database/DaoEntity.h"
|
||||
|
||||
#include "app/errcode.h"
|
||||
|
||||
class DAO1
|
||||
{
|
||||
public:
|
||||
static std::shared_ptr<DaoEntity> get(std::string tableName="");
|
||||
|
||||
static Errcode login(std::shared_ptr<DaoEntity> dao, std::string account, std::string passwd, Fields& res);
|
||||
|
||||
static bool writeSystemLog(std::shared_ptr<DaoEntity> dao, int type, std::string userId, std::string account, std::string text);
|
||||
|
||||
|
||||
// =======================================================================
|
||||
// 用户管理数据操作
|
||||
|
||||
/**
|
||||
* 查询用户
|
||||
*/
|
||||
static bool queryUser(std::vector<Fields>& res);
|
||||
|
||||
/**
|
||||
* 新增用户
|
||||
*/
|
||||
static int insertUser(Fields& fields);
|
||||
|
||||
/**
|
||||
* 修改用户信息
|
||||
*/
|
||||
static int updateUserById(std::string id, Fields& fields);
|
||||
};
|
||||
Reference in New Issue
Block a user