Commit 2a6cf80f authored by hujun's avatar hujun

收信息人

parent 47d43522
...@@ -43,6 +43,7 @@ class PushMessageService ...@@ -43,6 +43,7 @@ class PushMessageService
public function pushReportMessage($house_id, $agent_id, $type, $operation_id) public function pushReportMessage($house_id, $agent_id, $type, $operation_id)
{ {
try { try {
$agent_id_arr = [];
$house_agent = new GHousesToAgents(); $house_agent = new GHousesToAgents();
$agent = new AAgents(); $agent = new AAgents();
$house = new GHouses(); $house = new GHouses();
...@@ -52,15 +53,15 @@ class PushMessageService ...@@ -52,15 +53,15 @@ class PushMessageService
$agent_name = $agent->getAgentsStoreById([ 'a.id' => $agent_id ], 'name,store_name'); $agent_name = $agent->getAgentsStoreById([ 'a.id' => $agent_id ], 'name,store_name');
$house_data = $house->getHouseDetail('internal_title', [ 'id' => $house_id ]); $house_data = $house->getHouseDetail('internal_title', [ 'id' => $house_id ]);
$order_id = $m_report->getReportOrder('b.id',['a.report_agent_id'=>$agent_id]); $order_id = $m_report->getReportOrder('b.id',['a.report_agent_id'=>$agent_id]);
foreach ($data as $k => $v) {
$content = "【{$agent_name['store_name']}】店【{$agent_name['name']}】约带看【{$house_data['internal_title']}】商铺"; $content = "【{$agent_name['store_name']}】店【{$agent_name['name']}】约带看【{$house_data['internal_title']}】商铺";
// $this->pushAgentAllDeviceId($v['id'], '报备', $content);
$save['message'] = $content; $save['message'] = $content;
$save['order_id'] = $order_id['id']; $save['order_id'] = $order_id['id'];
$save['house_id'] = $house_id; $save['house_id'] = $house_id;
$this->record(7, 0, [$agent_id], $operation_id, $save); foreach ($data as $k => $v) {
// $this->pushAgentAllDeviceId($v['id'], '报备', $content);
$agent_id_arr[] = $v['id'];
} }
$this->record(7, $house_id, $agent_id_arr, $operation_id, $save);
$result = true; $result = true;
} catch (\Exception $e) { } catch (\Exception $e) {
$result = false; $result = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment