|
@ -16,7 +16,7 @@ void SettingPageCmdImpl::setSettingVal(json& cmd, json& receipt) { |
|
|
receipt["ackcodeInfo"] = err::zecode2str(err::kdb_operate_error); |
|
|
receipt["ackcodeInfo"] = err::zecode2str(err::kdb_operate_error); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_set_setting_val, fmt::format("({},{})", settingName, settingVal)); |
|
|
|
|
|
|
|
|
// m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_set_setting_val, fmt::format("({},{})", settingName, settingVal));
|
|
|
} |
|
|
} |
|
|
void SettingPageCmdImpl::getAllFormula(json& cmd, json& receipt) { |
|
|
void SettingPageCmdImpl::getAllFormula(json& cmd, json& receipt) { |
|
|
receipt["formula"] = m_dbService->getAllFormulaJson(); |
|
|
receipt["formula"] = m_dbService->getAllFormulaJson(); |
|
@ -34,13 +34,13 @@ void SettingPageCmdImpl::addFormula(json& cmd, json& receipt) { |
|
|
jsonGet<int>(cmd["continued_humi"]), //
|
|
|
jsonGet<int>(cmd["continued_humi"]), //
|
|
|
jsonGet<int>(cmd["injection_pump_speed"])); |
|
|
jsonGet<int>(cmd["injection_pump_speed"])); |
|
|
// kbehavior_add_formula
|
|
|
// kbehavior_add_formula
|
|
|
m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_add_formula, fmt::format("({})", formula_id)); |
|
|
|
|
|
|
|
|
// m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_add_formula, fmt::format("({})", formula_id));
|
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
void SettingPageCmdImpl::delFormula(json& cmd, json& receipt) { |
|
|
void SettingPageCmdImpl::delFormula(json& cmd, json& receipt) { |
|
|
auto formula = m_dbService->delFormula(jsonGet<int>(cmd["id"])); |
|
|
auto formula = m_dbService->delFormula(jsonGet<int>(cmd["id"])); |
|
|
if (formula) { |
|
|
if (formula) { |
|
|
m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_del_formula, fmt::format("({})", formula->formula_id)); |
|
|
|
|
|
|
|
|
// m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_del_formula, fmt::format("({})", formula->formula_id));
|
|
|
} |
|
|
} |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -53,8 +53,8 @@ void SettingPageCmdImpl::updateFormula(json& cmd, json& receipt) { |
|
|
} |
|
|
} |
|
|
auto formula = m_dbService->updateFormula(jsonGet<int>(cmd["id"]), cmd["column"], val_str); |
|
|
auto formula = m_dbService->updateFormula(jsonGet<int>(cmd["id"]), cmd["column"], val_str); |
|
|
if (formula) { |
|
|
if (formula) { |
|
|
m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_update_formula, |
|
|
|
|
|
fmt::format("({},{},{})", formula->formula_id, cmd["column"], val_str)); |
|
|
|
|
|
|
|
|
// m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_update_formula,
|
|
|
|
|
|
// fmt::format("({},{},{})", formula->formula_id, cmd["column"], val_str));
|
|
|
} |
|
|
} |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -91,10 +91,10 @@ void SettingPageCmdImpl::updateFormula2(json& cmd, json& receipt) { |
|
|
} |
|
|
} |
|
|
m_dbService->updateFormula(formula); |
|
|
m_dbService->updateFormula(formula); |
|
|
if (oldname != formula_id) { |
|
|
if (oldname != formula_id) { |
|
|
m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_update_formula_name, |
|
|
|
|
|
fmt::format("({}->{})", oldname, formula->formula_id)); |
|
|
|
|
|
|
|
|
// m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_update_formula_name,
|
|
|
|
|
|
// fmt::format("({}->{})", oldname, formula->formula_id));
|
|
|
} |
|
|
} |
|
|
m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_update_formula, fmt::format("({})", formula->formula_id)); |
|
|
|
|
|
|
|
|
// m_dbService->addUserBehaviorRecord(m_deviceStateService->getLoginUid(), kbehavior_update_formula, fmt::format("({})", formula->formula_id));
|
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|