Commit 60d06aee authored by hujun's avatar hujun

推送格式修改

parent 5a3009c7
...@@ -58,7 +58,7 @@ class PushClientService ...@@ -58,7 +58,7 @@ class PushClientService
*/ */
public function pushRecord() public function pushRecord()
{ {
$title = $type = ''; $title = $type = $content = '';
$field = 'id,operation_id,type,message,house_id,user_id,order_id'; $field = 'id,operation_id,type,message,house_id,user_id,order_id';
$where['status'] = $id = $is_forbidden = 0; $where['status'] = $id = $is_forbidden = 0;
$push_data = $this->m_push->getDateLimit($field, $where, 100); $push_data = $this->m_push->getDateLimit($field, $where, 100);
...@@ -68,9 +68,10 @@ class PushClientService ...@@ -68,9 +68,10 @@ class PushClientService
case 0 : case 0 :
$title = "评价经纪人"; $title = "评价经纪人";
$type = 'evaluate'; $type = 'evaluate';
$content = '同联商业邀请您评价经纪人'.$v['message'].'对商铺的带看服务';
break; break;
} }
$this->pushAgentAllDeviceId($v['operation_id'], $title, $v['message'], $type, $v['user_id'], $is_forbidden, $v['house_id'], $v['order_id']); $this->pushAgentAllDeviceId($v['operation_id'], $title, $content, $type, $v['user_id'], $is_forbidden, $v['house_id'], $v['order_id'], $v['message']);
$update_data['status'] = 1; $update_data['status'] = 1;
$update_data['send_time'] = date('Y-m-d H:i:s'); $update_data['send_time'] = date('Y-m-d H:i:s');
...@@ -88,10 +89,11 @@ class PushClientService ...@@ -88,10 +89,11 @@ class PushClientService
* @param int $is_forbidden * @param int $is_forbidden
* @param int $house_id * @param int $house_id
* @param int $order_id * @param int $order_id
* @param $name
* @return array|bool * @return array|bool
* @throws \Exception * @throws \Exception
*/ */
public function pushAgentAllDeviceId($id, $title, $content, $type = 0, $user_id = 0, $is_forbidden = 0, $house_id = 0, $order_id = 0) public function pushAgentAllDeviceId($id, $title, $content, $type = 0, $user_id = 0, $is_forbidden = 0, $house_id = 0, $order_id = 0, $name)
{ {
if (empty($user_id)) { if (empty($user_id)) {
return false; return false;
...@@ -106,7 +108,7 @@ class PushClientService ...@@ -106,7 +108,7 @@ class PushClientService
$result = false; $result = false;
} else { } else {
$push_id = $chat_ext->getInfo('push_id', ['ext_id'=>$ext_id, 'is_forbidden'=>$is_forbidden]); $push_id = $chat_ext->getInfo('push_id', ['ext_id'=>$ext_id, 'is_forbidden'=>$is_forbidden]);
$result = $push->public_push_message_for_one($id, $push_id['push_id'], $title, $content, $type, $user_id, $house_id, $order_id); $result = $push->public_push_message_for_one($id, $push_id['push_id'], $title, $content, $type, $user_id, $house_id, $order_id, $name);
} }
return $result; return $result;
......
...@@ -175,10 +175,11 @@ class GeTuiUtils { ...@@ -175,10 +175,11 @@ class GeTuiUtils {
* @param $user_id * @param $user_id
* @param $house_id * @param $house_id
* @param $order_id * @param $order_id
* @param $name
* @return array * @return array
* @throws \Exception * @throws \Exception
*/ */
function public_push_message_for_one($id, $device_id, $title, $content, $type = 'other', $user_id, $house_id, $order_id) function public_push_message_for_one($id, $device_id, $title, $content, $type = 'other', $user_id, $house_id, $order_id, $name = "")
{ {
$home_url = $this->http_host(); $home_url = $this->http_host();
$data['agent_id'] = $id; $data['agent_id'] = $id;
...@@ -190,7 +191,7 @@ class GeTuiUtils { ...@@ -190,7 +191,7 @@ class GeTuiUtils {
'content' => $content, 'content' => $content,
'type' => $type, 'type' => $type,
'url' => '', 'url' => '',
'name' => $title, 'name' => $name,
'id' => $user_id, 'id' => $user_id,
'house_id' => $house_id, 'house_id' => $house_id,
'order_id' => $order_id, 'order_id' => $order_id,
......
...@@ -272,7 +272,7 @@ class PushMessageService ...@@ -272,7 +272,7 @@ class PushMessageService
if (!empty($device_id_array)) { if (!empty($device_id_array)) {
foreach ($device_id_array as $k => $v) { foreach ($device_id_array as $k => $v) {
if (!empty($v['push_id'])) { if (!empty($v['push_id'])) {
$result[] = $this->push->public_push_message_for_one($id, $v['push_id'], $title, $content, $type, $user_id, $house_id, $order_id); $result[] = $this->push->public_push_message_for_one($id, $v['push_id'], $title, $content, $type, $user_id, $house_id, $order_id, $title);
} }
} }
} }
......
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