|
|
@@ -35,11 +35,7 @@ void CMqttClientWorker::Stop()
|
|
|
{
|
|
|
m_is_running = false;
|
|
|
|
|
|
- //等待进程结束
|
|
|
- while (m_nStopNum < 1)
|
|
|
- {
|
|
|
- Sleep(50);
|
|
|
- }
|
|
|
+ Sleep(100);
|
|
|
}
|
|
|
|
|
|
void CMqttClientWorker::Run()
|
|
|
@@ -92,7 +88,6 @@ void CMqttClientWorker::Run()
|
|
|
catch(const mqtt::exception& exc)
|
|
|
{
|
|
|
LOG_INFO(("disconnect error, exc:" + exc.get_message()).c_str());
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
//销毁客户端
|
|
|
@@ -409,9 +404,16 @@ void CMqttClientWorker::HandleMessage(std::string message)
|
|
|
}
|
|
|
else if (type == "shouyintai_order")
|
|
|
{
|
|
|
+ std::string order_id = CLewaimaiJson::ToString(data["order_id"]);
|
|
|
std::string content = CLewaimaiJson::ToString(data["content"]);
|
|
|
|
|
|
CVoiceWorker::GetInstance()->AddVoice(content);
|
|
|
+
|
|
|
+ if (CSetting::GetInstance()->GetParam("setting_is_new_diannei_saomadiancan_printer") == "1")
|
|
|
+ {
|
|
|
+ CPosPrinter printer;
|
|
|
+ printer.PrintShoukuanOrder(order_id);
|
|
|
+ }
|
|
|
}
|
|
|
else if (type == "tangshi_service")
|
|
|
{
|