fix: 将公招的资源文件读取改为非增量更新

This commit is contained in:
MistEO
2022-07-19 10:56:17 +08:00
parent a1dad7f137
commit dc2c9d59a3
2 changed files with 13 additions and 0 deletions

View File

@@ -10,6 +10,8 @@ bool asst::RecruitConfiger::parse(const json::value& json)
{
LogTraceFunction;
clear();
for (const json::value& oper : json.as_array()) {
RecruitOperInfo oper_temp;
oper_temp.name = oper.at("name").as_string();
@@ -39,3 +41,12 @@ bool asst::RecruitConfiger::parse(const json::value& json)
return true;
}
void asst::RecruitConfiger::clear()
{
LogTraceFunction;
m_all_opers.clear();
m_all_tags.clear();
m_all_types.clear();
}

View File

@@ -50,6 +50,8 @@ namespace asst
protected:
virtual bool parse(const json::value& json) override;
void clear();
std::unordered_set<std::string> m_all_tags;
std::unordered_set<std::string> m_all_types;