mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
18 lines
437 B
C++
18 lines
437 B
C++
#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;
|
|
} |