Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
96f786e3
Commit
96f786e3
authored
Jun 04, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增办公楼房源跟进
parent
c5edd9f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
OfficeRoom.php
application/api_broker/controller/OfficeRoom.php
+46
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/OfficeRoom.php
View file @
96f786e3
...
...
@@ -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
application/route.php
View file @
96f786e3
...
...
@@ -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'
,
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment