|
@@ -29,13 +29,13 @@ void module_meta_date_changed::accept(sio::message::ptr const& data)
|
|
|
std::string szParam = "0";
|
|
|
tool_map::try_get_value(szParam,JSON_KEY_ID,data);
|
|
|
|
|
|
- int id=-1;
|
|
|
- tool_map::try_get_value(id,JSON_KEY_ID,data);
|
|
|
+ // int id=-1;
|
|
|
+ // tool_map::try_get_value(id,JSON_KEY_ID,data);
|
|
|
|
|
|
std::string op_type="";
|
|
|
tool_map::try_get_value(op_type, JSON_KEY_OP_TYPE, data);
|
|
|
|
|
|
- log_info("web发来数据:JSON_CMD_VALUE_META_DATA_CHANGED,%d.%s---%s",id,szParam.c_str(),op_type.c_str());
|
|
|
+ log_info("web发来数据:JSON_CMD_VALUE_META_DATA_CHANGED,%s---%s",szParam.c_str(),op_type.c_str());
|
|
|
if(!szParam.empty() && !op_type.empty())
|
|
|
{
|
|
|
EDIT_TYPE_ID edit_type_id;
|
|
@@ -61,7 +61,7 @@ void module_meta_date_changed::accept(sio::message::ptr const& data)
|
|
|
}
|
|
|
else if(JSON_KEY_NAME_AREA == name)
|
|
|
{
|
|
|
- deal_call_edit_area(szParam,id, edit_type_id);
|
|
|
+ deal_call_edit_area(szParam, edit_type_id);
|
|
|
}
|
|
|
else if(JSON_KEY_NAME_READER == name)
|
|
|
{
|
|
@@ -185,15 +185,15 @@ void module_meta_date_changed::deal_call_edit_card(std::string & id64, EDIT_TYPE
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void module_meta_date_changed::deal_call_edit_area(const std::string& id, int& aid,EDIT_TYPE_ID edit_type_id)
|
|
|
+void module_meta_date_changed::deal_call_edit_area(const std::string& id,EDIT_TYPE_ID edit_type_id)
|
|
|
{
|
|
|
+ int cid = std::stoi(id);
|
|
|
if(ET_INSERT == edit_type_id || ET_UPDATE == edit_type_id)
|
|
|
{
|
|
|
- area_list::instance()->init_from_db(aid);
|
|
|
+ area_list::instance()->init_from_db(cid);
|
|
|
}
|
|
|
else if(ET_DELETE == edit_type_id)
|
|
|
{
|
|
|
- int cid = std::stoi(id);
|
|
|
if(auto area_ptr = area_list::instance()->get(cid))
|
|
|
{
|
|
|
log_info("区域删除:areaid=%d", cid);
|