Commit 60d06aee authored by hujun's avatar hujun

推送格式修改

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