Commit db6d3978 authored by clone's avatar clone

1

parent 49f537eb
......@@ -3,6 +3,7 @@
namespace app\api\controller;
use app\api\extend\Basic;
use app\api_broker\service\PushMessageService;
use app\index\service\HouseService;
use app\model\GHouses;
use app\model\GHousesImgs;
......@@ -87,12 +88,10 @@ class FindShop extends Basic
}
$updateParams["create_time"] = date("Y-m-d H:i:s", time());
$id = $findShopModel->addFindShop($updateParams);
}
if ($params["id"]) {
$pushService = new PushMessageService();
$pushService->pushFindShopMessage($params["user_id"]);
}
if ($id > 0) {
return $this->response("200", "数据保存成功", ["id" => $id]);
} else {
......
......@@ -487,4 +487,19 @@ class PushMessageService
}
return $result;
}
public function pushFindShopMessage($user_id)
{
$data['message'] = "你的客户(ID:{$user_id})提交了委托找铺需求,请到电脑端查看";
$m_user = new Users();
$client_agent = $m_user->getUserByWhereValue('agent_id', ['id'=>$user_id]);
$agent_id = 0;
if (count($client_agent) > 0) {
$agent_id = $client_agent;
}
$push_type = 12;
$this->record($push_type, 0, $agent_id, 0, $data);
return;
}
}
\ No newline at end of file
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