Commit e458efbf authored by hujun's avatar hujun

修改客方跳转对应详情页面

parent af254178
...@@ -138,15 +138,15 @@ class GeTuiUntils { ...@@ -138,15 +138,15 @@ class GeTuiUntils {
/** /**
* 对某个人推送消息-公共 * 对某个人推送消息-公共
* *
* 2017-11-07 10:31:27
* @author zhuwei
* @param $id * @param $id
* @param $device_id * @param $device_id
* @param $title * @param $title
* @param $content * @param $content
* @return array|void * @param string $type
* @param $user_id
* @return array
*/ */
function public_push_message_for_one($id, $device_id, $title, $content) function public_push_message_for_one($id, $device_id, $title, $content, $type = 'other', $user_id)
{ {
$home_url = $this->http_host(); $home_url = $this->http_host();
$data['agent_id'] = $id; $data['agent_id'] = $id;
...@@ -156,10 +156,10 @@ class GeTuiUntils { ...@@ -156,10 +156,10 @@ class GeTuiUntils {
$data['touchuan'] = json_encode(array( $data['touchuan'] = json_encode(array(
'title' => $title, 'title' => $title,
'content' => $content, 'content' => $content,
'type' => 'other', 'type' => $type,
'url' => '', 'url' => '',
'name' => $title, 'name' => $title,
'id' => '69', 'id' => $user_id,
'imageUrl' => $home_url .'notice_android_logo.png')); 'imageUrl' => $home_url .'notice_android_logo.png'));
return $this->push_message_for_one($data); return $this->push_message_for_one($data);
} }
......
...@@ -68,7 +68,7 @@ class Client extends Basic ...@@ -68,7 +68,7 @@ class Client extends Basic
$ccr_agent_data = $agent->getAgentInfo('name,phone', $this->params['ccr_id']); $ccr_agent_data = $agent->getAgentInfo('name,phone', $this->params['ccr_id']);
$content = "【{$ccr_agent_data['name']}-{$ccr_agent_data['phone']}修改了{$user_agent_id['user_name']}(id:{$user_agent_id['id']})客方】"; $content = "【{$ccr_agent_data['name']}-{$ccr_agent_data['phone']}修改了{$user_agent_id['user_name']}(id:{$user_agent_id['id']})客方】";
// $content = "【你的客户客方被修改为{$agent_data['name']}-{$agent_data['phone']}】"; // $content = "【你的客户客方被修改为{$agent_data['name']}-{$agent_data['phone']}】";
$push->pushMessageById($user_agent_id['agent_id'], '客方修改', $content); $push->pushMessageById($user_agent_id['agent_id'], '客方修改', $content, 'user_info', $user_agent_id['id']);
$this->operating_records($this->params['ccr_id'], $type=3, $remark,0,$this->params['id']); $this->operating_records($this->params['ccr_id'], $type=3, $remark,0,$this->params['id']);
} }
} else { } else {
......
...@@ -157,9 +157,11 @@ class PushMessageService ...@@ -157,9 +157,11 @@ class PushMessageService
* @param $id * @param $id
* @param $title * @param $title
* @param $content * @param $content
* @return array|void * @param string $type
* @param string $user_id
* @return array|bool
*/ */
public function pushMessageById($id, $title,$content) { public function pushMessageById($id, $title,$content, $type = 'other' ,$user_id = '') {
if (empty($id)) { if (empty($id)) {
return false; return false;
...@@ -167,7 +169,7 @@ class PushMessageService ...@@ -167,7 +169,7 @@ class PushMessageService
$agent = new AAgents(); $agent = new AAgents();
$device_id = $agent->getAgentsById($id, 'device_id'); $device_id = $agent->getAgentsById($id, 'device_id');
$result = $this->push->public_push_message_for_one($id, $device_id, $title, $content); $result = $this->push->public_push_message_for_one($id, $device_id, $title, $content, $type, $user_id);
return $result; return $result;
} }
......
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