mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
29 lines
773 B
C++
29 lines
773 B
C++
#pragma once
|
||
#include <string>
|
||
#include <unordered_map>
|
||
|
||
enum class Errcode
|
||
{
|
||
OK = 0,
|
||
ERR = 1,
|
||
ERR_TOKEN, // TOKEN错误
|
||
ERR_PARAM, // 参数错误
|
||
ERR_PARAM_NUL, // 缺少参数
|
||
ERR_DATA_NUL, // 数据不存在
|
||
|
||
ERR_USER = 100,
|
||
ERR_LOGIN_USER_NOTEXIST, // 登入错误,用户不存在
|
||
ERR_LOGIN_PASSWD, // 登入错误,密码不正确
|
||
|
||
ERR_DEVICE = 200,
|
||
|
||
|
||
ERR_DB_CONN = 1001, // 数据库连接错误
|
||
|
||
ERR_DB_DUPLICATE = 1062, // Duplicate entry for key
|
||
ERR_DB_SQL = 1064, // 数据库查询SQL错误
|
||
ERR_DB_VAL = 1366, // 1366,Incorrect decimal value,通常为参数值错误,例如空值、值类型错误
|
||
|
||
};
|
||
|
||
extern std::string ErrcodeStr(Errcode code); |