Commit da81bc7f authored by hujun's avatar hujun

报备推送

parent 78799e06
......@@ -2,7 +2,9 @@
namespace app\api_broker\service;
use app\api\untils\GeTuiUntils;
use app\model\GHouses;
use app\model\GHousesToAgents;
use app\model\HouseInfos;
use app\model\OrderModel;
use app\model\OReportModel;
......@@ -50,6 +52,7 @@ class ReportService
/**
* 生成报备和保存订单
*
* @param $agent_id
* @param $agent_name
* @param $store_id
......@@ -61,6 +64,9 @@ class ReportService
* @param $intro
* @param $predict_see_time
* @return int
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function verifyReport($agent_id, $agent_name, $store_id, $user_id, $user_phone, $user_name, $house_ids, $vehicle, $intro, $predict_see_time)
{
......@@ -69,6 +75,13 @@ class ReportService
$predict_see_time);
if ($id > 0) {
$agent = new GHousesToAgents();
$device_id = $agent->getAgentList($house_ids);
$ge_tui = new GeTuiUntils();
foreach ($device_id as $k=>$v) {
$content = "{$v['store_name']}{$agent_name}约带看xxx商铺";
$ge_tui->public_push_message_for_one($v['id'], $v['device_id'], '报备', $content);
}
$house_arr = explode(",", $house_ids);
$order_arr = [];
foreach ($house_arr as $k => $v) {
......
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