Commit 96f786e3 authored by hujun's avatar hujun

新增办公楼房源跟进

parent c5edd9f3
......@@ -13,6 +13,7 @@ use app\api_broker\extend\Basic;
use app\index\service\OfficeRoomService;
use app\index\service\OfficeService;
use app\model\OfficeGBuilding;
use app\model\OfficeGHousesFollowUp;
use app\model\OfficeGRoom;
class OfficeRoom extends Basic
......@@ -205,4 +206,48 @@ class OfficeRoom extends Basic
return $this->response("200", 'request success', $result);
}
/**
* 新增办公楼房源跟进
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function addShopFollowUp()
{
header('Access-Control-Allow-Origin:*');
$params = $this->params;
/* $params = array(
"house_id" => 1,
"follow_up_info"=>"123123131",
"agent_id"=>1,
"agent_name"=>"2324",
"agent_phone"=>"13766166616",
);*/
if (!isset($params["house_id"]) || !isset($params["follow_up_info"]) || !isset($params["agent_id"])
|| !isset($params["agent_name"]) || !isset($params["agent_phone"])) {
return $this->response("101", "请求参数错误");
}
$m_office_building = new OfficeGBuilding();
$result = $m_office_building->getFindData('province,city,disc', ['id' => $params["house_id"]]);
if ($result) {
$params['province'] = $result['province'] ? $result['province'] : '上海市';
$params['city'] = $result['city'] ? $result['city'] : '上海市';
$params['disc'] = $result['disc'] ? $result['disc'] : '黄浦区';
}
$follow_up_model = new OFficeGHousesFollowUp();
$id = $follow_up_model->addHousesFollowUp($params);
if ($id > 0) {
return $this->response("200", "request success", ["id" => $id]);
} else {
return $this->response("200", "request error");
}
}
}
\ No newline at end of file
......@@ -983,6 +983,7 @@ Route::group('office', [
'getCheckType' => ['api_broker/OfficeReport/getCheckType', ['method' => 'get|post']],
'reportListForPc' => ['api_broker/OfficeReport/reportListForPc', ['method' => 'get']],
'getRoomListByReport' => ['api_broker/OfficeRoom/getRoomListByReport', ['method' => 'get|post']],
'addShopFollowUp' => ['api_broker/OfficeRoom/addShopFollowUp', ['method' => 'get|post']],
]);
Route::group('office_index', [
......
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