完成系统管理web端功能,实现系统管理服务端接口,实现登录功能

This commit is contained in:
lixiaoyuan
2025-07-18 09:08:09 +08:00
parent 4a198a7271
commit 7b3f32f334
31 changed files with 1384 additions and 325 deletions

View File

@@ -0,0 +1,39 @@
#pragma once
#include <memory>
#include <string>
#include "common/DataFields.h"
class CommEntity
{
public:
CommEntity() {}
CommEntity(std::string type) : type(type) {}
void setType(std::string type) { this->type = type; }
// 启动通讯连接
virtual int start() { return 0; };
// 关闭通讯连接
virtual void close() { isCloseRequest_ = true; };
std::string id() { return id_; }
bool isAlive() { return isAlive_; }
bool isConnected() { return isConnected_; }
public:
std::string id_;
bool isAlive_ = false;
bool isConnected_ = false;
bool isCloseRequest_ = false;
std::string type;
};
class Communicator
{
public:
static std::shared_ptr<CommEntity> createEntity(DataFields& data);
};