mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
实现HTTP服务架构
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include "common/Fields.h"
|
||||
#include "app/Config.h"
|
||||
|
||||
class Station;
|
||||
class Device;
|
||||
@@ -13,6 +14,14 @@ class MyPolicy;
|
||||
|
||||
using VecPairSS = std::vector<std::pair<std::string, std::string>>;
|
||||
|
||||
struct User
|
||||
{
|
||||
std::string userId;
|
||||
std::string account;
|
||||
std::string token;
|
||||
int64_t loginTime {};
|
||||
};
|
||||
|
||||
struct DeviceType
|
||||
{
|
||||
int typeId {};
|
||||
@@ -50,13 +59,11 @@ public:
|
||||
void init();
|
||||
void initFromDB();
|
||||
|
||||
|
||||
|
||||
// 读取统计数据: 今日统计数据,累计统计数据
|
||||
void loadStatData();
|
||||
|
||||
void initUser();
|
||||
|
||||
std::string userLogin(std::string userId, std::string account);
|
||||
User getUser(std::string token);
|
||||
|
||||
std::shared_ptr<Station> getStation(int stationId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user