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
11f7d5ba
Commit
11f7d5ba
authored
Sep 05, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
e1242d55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
21 deletions
+28
-21
Shop.php
application/api/controller/Shop.php
+28
-21
No files found.
application/api/controller/Shop.php
View file @
11f7d5ba
...
...
@@ -14,6 +14,7 @@ use app\api_broker\service\LookShopService;
use
app\model\AttentionModel
;
use
app\model\GHouses
;
use
app\model\GHousesImgs
;
use
app\model\GImageDepot
;
use
app\model\GLabels
;
use
app\model\HouseImgs
;
use
app\model\HouseInfos
;
...
...
@@ -32,6 +33,7 @@ class Shop extends Basic
private
$gHousesModel
;
private
$gHousesImgModel
;
private
$lookShopService_
;
private
$imageDepotModel
;
function
__construct
(
$request
=
null
)
{
...
...
@@ -43,6 +45,7 @@ class Shop extends Basic
$this
->
gHousesModel
=
new
GHouses
();
$this
->
gHousesImgModel
=
new
GHousesImgs
();
$this
->
lookShopService_
=
new
LookShopService
();
$this
->
imageDepotModel
=
new
GImageDepot
();
}
...
...
@@ -183,10 +186,17 @@ class Shop extends Basic
foreach
(
$result
as
$key
=>
$val
)
{
$result
[
$key
][
"api_path"
]
=
CK_IMG_URL
.
'images/'
;
$result
[
$key
][
"rent_price"
]
=
$val
[
"rent_price"
]
*
0.01
;
$result
[
$key
][
"images"
]
=
[];
if
(
$val
[
"external_image_id"
])
{
$param
[
"id"
]
=
array
(
"in"
,
$val
[
"external_image_id"
]
);
$param
[
"img_status"
]
=
0
;
$field
=
'id,img_type,label,img_name,create_time'
;
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
);
$result
[
$key
][
"images"
]
=
count
(
$res
)
>
0
?
$res
[
0
]
:
""
;
}
$param
[
"house_id"
]
=
$val
[
"id"
];
$param
[
"img_type"
]
=
1
;
//默认主图
$result
[
$key
][
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
1
);
}
...
...
@@ -223,18 +233,6 @@ class Shop extends Basic
return
$this
->
response
(
"101"
,
"请求来源错误"
);
}
/**
* `area_width` int(11) unsigned DEFAULT '0' COMMENT '面宽 * 100',
`depth` int(11) unsigned DEFAULT '0' COMMENT '进深 * 100',
`electric_quantity` int(11) unsigned DEFAULT '0' COMMENT '电量 * 100',
`voltage` int(11) unsigned DEFAULT '0' COMMENT '电压 * 100',
`exhaust_fume` tinyint(1) unsigned DEFAULT '0' COMMENT '烟管道: 0无1有',
`running_water` tinyint(1) unsigned DEFAULT '0' COMMENT '上水:0无 1有',
`downriver` tinyint(3) unsigned DEFAULT '0' COMMENT '下水: 0无1有',
`business_scope` varchar(255) DEFAULT NULL COMMENT '经营范围文字',
`decoration` tinyint(3) unsigned DEFAULT '0' COMMENT '交付装修 0否1是',
*/
$field
=
"a.id,a.external_title as title,a.external_address as address,a.city,a.disc,a.business_district_id,a.status,
a.industry_type,a.shop_area_start,a.shop_area_end,a.shop_type,a.residue_num,a.shop_sign,a.is_carefully_chosen,a.rent_type,
a.rent_price,a.management_fee,a.slotting_fee,a.total,a.market_area,a.is_has_gas,a.file_path,a.longitude,a.latitude,
...
...
@@ -269,12 +267,21 @@ class Shop extends Basic
$result
[
"external_slotting_fee"
]
=
$result
[
"external_slotting_fee"
]
*
0.01
;
}
$result
[
"api_path"
]
=
CK_IMG_URL
.
'images/'
;
$param
[
"house_id"
]
=
$params
[
'id'
];
//
$param["house_id"] = $params['id'];
//todo 这里的是否要更改成b端后台上传的类型
$param
[
"img_type"
]
=
2
;
$result
[
"images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
15
);
$param
[
"img_type"
]
=
3
;
//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$result
[
"plan_images"
]
=
$this
->
gHousesImgModel
->
getHouseImages
(
$param
,
1
);
/* $param["img_type"] = 2;
$result["images"] = $this->gHousesImgModel->getHouseImages($param, 15);
$param["img_type"] = 3;//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$result["plan_images"] = $this->gHousesImgModel->getHouseImages($param, 1);*/
$result
[
"images"
]
=
[];
if
(
$result
[
"external_image_id"
])
{
$param
[
"id"
]
=
array
(
"in"
,
$result
[
"external_image_id"
]
);
$param
[
"img_status"
]
=
0
;
$field
=
'id,img_type,label,img_name,create_time'
;
$res
=
$this
->
imageDepotModel
->
getImageDepotById
(
$field
,
$param
);
$result
[
"images"
]
=
count
(
$res
)
>
0
?
$res
[
0
]
:
[];
}
if
(
$result
[
'status'
]
==
0
)
{
return
$this
->
response
(
"101"
,
'此楼盘已下架'
);
...
...
@@ -340,7 +347,7 @@ class Shop extends Basic
break
;
//目前只有上海和杭州其余的先不显示
}
$result
[
'yetai'
]
=
array
(
'全部'
,
'商场美食'
,
'沿街餐饮'
,
'百货超市'
,
'服饰鞋包'
,
'亲子教育'
,
'休闲娱乐'
,
'办公'
,
'其他'
);
$result
[
'yetai'
]
=
array
(
'全部'
,
'商场美食'
,
'沿街餐饮'
,
'百货超市'
,
'服饰鞋包'
,
'亲子教育'
,
'休闲娱乐'
,
'办公'
,
'其他'
);
//租金租金(0:租金-大于三万; 1:租金一万到三万之间; 2:租金-小于一万)
$result
[
'money'
]
=
array
(
array
(
'id'
=>
'-1'
,
'value'
=>
'全部'
),
array
(
'id'
=>
'0'
,
'value'
=>
'3万以上'
),
...
...
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