Commit a5317652 authored by hujun's avatar hujun

预约推送

parent 8eedf62a
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace app\api\controller; namespace app\api\controller;
use app\api\extend\Basic; use app\api\extend\Basic;
use app\api_broker\service\PushMessageService;
use app\model\Applies; use app\model\Applies;
use app\model\AppointWatchShop; use app\model\AppointWatchShop;
use app\model\Evaluate; use app\model\Evaluate;
...@@ -101,6 +102,12 @@ class AppointmentTime extends Basic ...@@ -101,6 +102,12 @@ class AppointmentTime extends Basic
); );
$result = $this->appointmentTimeModel->insertAppointWatchShop($addPrams); $result = $this->appointmentTimeModel->insertAppointWatchShop($addPrams);
if ($result["code"] == 200) { if ($result["code"] == 200) {
$push = new PushMessageService();
$house_title = $this->houseInfoModel->getHouseValue('internal_title', ['id'=>$params['house_id']]);
$push_data['message'] = "你的[编号:{$params['user_id']}]客户,提交预约看铺[{$house_title}]";
$push_data['user_id'] = $params['user_id'];
$push_data['house_id'] = $params['house_id'];
$push->record(8, $params['house_id'], [$appoint_agent_id], $this->userId, $push_data);
return $this->response("200", "数据保存成功", $result["msg"]); return $this->response("200", "数据保存成功", $result["msg"]);
} else { } else {
return $this->response("101", "数据保存失败"); return $this->response("101", "数据保存失败");
......
...@@ -371,6 +371,11 @@ class PushMessageService ...@@ -371,6 +371,11 @@ class PushMessageService
$type = 'timer_shaft'; $type = 'timer_shaft';
$id = $v['addressee_id']; $id = $v['addressee_id'];
break; break;
case 8:
$title = '客户预约看铺';
$type = 'appointment';
$id = $v['user_id'];
break;
} }
$this->pushAgentAllDeviceId($v['addressee_id'], $title, $v['message'], $type, $id, $is_forbidden,$v['house_id'], $v['order_id']); $this->pushAgentAllDeviceId($v['addressee_id'], $title, $v['message'], $type, $id, $is_forbidden,$v['house_id'], $v['order_id']);
......
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