modify recall
This commit is contained in:
@@ -44,7 +44,7 @@ public:
|
||||
class RecallMonitor
|
||||
{
|
||||
public:
|
||||
int recall_status; //补招状态 0-未补招 1-补招中 2-补招完成 3-补招失败
|
||||
int recall_status; //补招状态 0-未补招 1-补招中 2-补招完成 3-补招失败 4-无数据
|
||||
std::string StartTime; //数据补招起始时间
|
||||
std::string EndTime; //数据补招结束时间
|
||||
std::string STEADY; //补招历史统计数据标识 0-不补招;1-补招
|
||||
@@ -128,7 +128,8 @@ enum class RecallStatus {
|
||||
NOT_STARTED = 0, // 未补招
|
||||
RUNNING = 1, // 补招中
|
||||
DONE = 2, // 补招完成
|
||||
FAILED = 3 // 补招失败
|
||||
FAILED = 3, // 补招失败
|
||||
EMPTY = 4 // 无补招数据
|
||||
};
|
||||
|
||||
// 本轮要下发的一条任务(每个终端最多一条)
|
||||
@@ -896,6 +897,24 @@ enum class ResponseCode : int {
|
||||
TIMEOUT = 406, // 请求超出了等待时间
|
||||
INTERNAL_ERROR = 500 // 其他错误
|
||||
};
|
||||
|
||||
inline std::string ResponseCodeToString(int code) {
|
||||
switch (code) {
|
||||
case 200: return "请求成功";
|
||||
case 201: return "请求被接受,开始处理";
|
||||
case 202: return "请求处理中";
|
||||
case 400: return "请求失败,参数错误";
|
||||
case 401: return "未认证或认证错误";
|
||||
case 402: return "请求被拒绝:正在处理同类命令";
|
||||
case 403: return "请求被拒绝";
|
||||
case 404: return "资源不存在";
|
||||
case 405: return "当前忙,无法响应";
|
||||
case 406: return "请求超时";
|
||||
case 500: return "内部错误";
|
||||
default: return "未知响应码";
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool is_ok(int rc) { return rc == static_cast<int>(ResponseCode::OK); }
|
||||
|
||||
static bool parse_datetime_tm(const std::string& s, std::tm& out) {
|
||||
|
||||
Reference in New Issue
Block a user