mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
完成系统管理web端功能,实现系统管理服务端接口,实现登录功能
This commit is contained in:
18
src/app/Admin.cpp
Normal file
18
src/app/Admin.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "Admin.h"
|
||||
#include "app/Dao.h"
|
||||
#include "common/Logger.h"
|
||||
|
||||
Errcode Admin::longin(std::string username, std::string passwd)
|
||||
{
|
||||
std::string err;
|
||||
Errcode ecode = DAO::login(nullptr, username, passwd, err);
|
||||
if (ecode != Errcode::OK)
|
||||
{
|
||||
XLOGE() << "login error, username=" << username << ", err=" << err;
|
||||
}
|
||||
else
|
||||
{
|
||||
XLOGE() << "login success, username=" << username;
|
||||
}
|
||||
return ecode;
|
||||
}
|
||||
Reference in New Issue
Block a user