mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
30 lines
776 B
C
30 lines
776 B
C
|
|
#include "database/DaoEntity.h"
|
|||
|
|
|
|||
|
|
class DAO
|
|||
|
|
{
|
|||
|
|
public:
|
|||
|
|
static std::shared_ptr<DaoEntity> get(std::string tableName="");
|
|||
|
|
|
|||
|
|
static bool login(std::shared_ptr<DaoEntity> dao, std::string account, std::string passwd, std::string& err);
|
|||
|
|
|
|||
|
|
static bool writeSystemLog(std::shared_ptr<DaoEntity> dao, int type, std::string userId, std::string account, std::string text);
|
|||
|
|
|
|||
|
|
|
|||
|
|
// =======================================================================
|
|||
|
|
// 用户管理数据操作
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 查询用户
|
|||
|
|
*/
|
|||
|
|
static bool queryUser(std::vector<DataFields>& res);
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 新增用户
|
|||
|
|
*/
|
|||
|
|
static int insertUser(DataFields& fields);
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* 修改用户信息
|
|||
|
|
*/
|
|||
|
|
static int updateUserById(std::string id, DataFields& fields);
|
|||
|
|
};
|