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
c739183f
Commit
c739183f
authored
Jun 02, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
楼盘字典列表
parent
2fe62253
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
OfficeManage.php
application/index/controller/OfficeManage.php
+4
-2
OfficeService.php
application/index/service/OfficeService.php
+16
-6
No files found.
application/index/controller/OfficeManage.php
View file @
c739183f
...
...
@@ -118,12 +118,14 @@ class OfficeManage extends Basic
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$building_service
=
new
OfficeService
();
$result
=
$building_service
->
BuildingSearch
(
$pageNo
,
$pageSize
,
$this
->
params
1
,
1
);
$result
=
$building_service
->
BuildingSearch
(
$pageNo
,
$pageSize
,
$this
->
params
,
1
);
if
(
$result
[
'status'
]
==
'fail'
)
{
$code
=
101
;
$msg
=
$result
[
'msg'
];
}
else
{
$data
=
$result
[
'data'
];
$data
[
'list'
]
=
$result
[
'data'
];
$data
[
'total'
]
=
$result
[
'total'
];
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
...
...
application/index/service/OfficeService.php
View file @
c739183f
...
...
@@ -9,7 +9,9 @@
namespace
app\index\service
;
use
app\index\controller\BusinessDistrict
;
use
app\index\validate\OfficeBuildingValidate
;
use
app\model\GBusinessDistrict
;
use
app\model\OfficeGBuilding
;
use
app\model\OfficeGImg
;
use
app\model\OfficeGBuildingStations
;
...
...
@@ -224,10 +226,6 @@ class OfficeService
{
$result
[
'status'
]
=
'fail'
;
$result
[
'msg'
]
=
''
;
if
(
empty
(
$params
[
'title'
]))
{
$result
[
'msg'
]
=
'参数错误'
;
return
$result
;
}
if
(
empty
(
$params
[
'city'
]))
{
$result
[
'msg'
]
=
'参数错误'
;
...
...
@@ -250,12 +248,24 @@ class OfficeService
$where
[
'type'
]
=
$params
[
'type'
];
}
$field
=
'id,title,address,type'
;
if
(
isset
(
$params
[
'id'
]))
{
$where
[
'id'
]
=
$params
[
'id'
];
}
$field
=
'id,title,address,type,floor_total,business_district_id,intro'
;
$where
[
'city'
]
=
$params
[
'city'
];
$data
=
$this
->
m_office
->
getList
(
$page_size
,
$page_no
,
''
,
$field
,
$where
);
if
(
$is_total
)
{
$data
=
$this
->
m_office
->
getTotal
(
$where
);
$result
[
'total'
]
=
$this
->
m_office
->
getTotal
(
$where
);
$m_business
=
new
GBusinessDistrict
();
foreach
(
$data
as
$k
=>
$v
)
{
if
(
isset
(
$v
[
'business_district_id'
]))
{
$data
[
$k
][
'business_name'
]
=
$m_business
->
getFieldOneValue
(
'name'
,
[
'id'
=>
$v
[
'business_district_id'
]]);
}
}
}
$result
[
'data'
]
=
$data
;
$result
[
'status'
]
=
'successful'
;
...
...
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