实现HTTP服务架构

This commit is contained in:
lixiaoyuan
2025-08-31 14:38:53 +08:00
parent 4af4e670d2
commit e0b64a20c4
46 changed files with 1436 additions and 545 deletions

View File

@@ -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);