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
f3e92039
Commit
f3e92039
authored
Sep 03, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺详情字段修改
parent
086130bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
48 deletions
+52
-48
Shop.php
application/api/controller/Shop.php
+14
-3
Shop.php
application/api_broker/controller/Shop.php
+38
-45
No files found.
application/api/controller/Shop.php
View file @
f3e92039
...
...
@@ -183,7 +183,6 @@ 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
][
"title"
]
=
$val
[
"disc"
]
.
$result
[
$key
][
"title"
];
$param
[
"house_id"
]
=
$val
[
"id"
];
$param
[
"img_type"
]
=
1
;
//默认主图
...
...
@@ -224,12 +223,24 @@ 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,
b.enter_num,b.external_item_advantage as item_advantage,b.sign_rule,b.do_business_date, b.opening_date,b.traffic,
b.auditorium,b.tiny_brochure_url,b.start_business_date,b.fee_rule,b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee"
;
b.auditorium,b.tiny_brochure_url,b.start_business_date,b.fee_rule,b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee,
b.area_width,b.depth,b.electric_quantity,b.voltage,b.exhaust_fume,b.running_water,b.downriver,b.business_scope,b.decoration"
;
$conditions
[
'a.status'
]
=
array
(
"eq"
,
1
);
$conditions
[
'a.is_show'
]
=
array
(
'eq'
,
0
);
//c端只显示公开楼盘
...
...
@@ -314,7 +325,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万以上'
),
...
...
application/api_broker/controller/Shop.php
View file @
f3e92039
...
...
@@ -56,28 +56,28 @@ class Shop extends Basic
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/* $params = array(
"site_area" => 4, //来源 1c首页 2c搜索 3b首页 4b搜索 5b报备
// "title" => "vv", //1,2 external_title ,3,4internal_title
"house_id" => 4,
"is_carefully_chosen" => 0, //精选商铺--0否1是
"shop_type" => 0, //商铺类型(0商场,1街铺)
"address" => "111",
"disc" => "黄浦区",
"industry_type" => "休闲娱乐",
"shop_area_start" => 45,//面积起始范围 街铺start和end面积一样
"shop_area_end" => 65,//面积结束范围
"rent_price_start" => 1000,//租金 rent_price
"rent_price_end" => 10000,//租金
"shop_sign" => "临近地铁,临近地铁2",
"agent_id" => 630, //添加经纪人id
"status" => 1, //1上架or2下架
"start_time" => "2018-05-25",
"end_time" => "2018-05-30",
"landlord_phone" => "17621970093",
"pageNo" => 1,
"pageSize" => 15
);*/
/* $params = array(
"site_area" => 4, //来源 1c首页 2c搜索 3b首页 4b搜索 5b报备
// "title" => "vv", //1,2 external_title ,3,4internal_title
"house_id" => 4,
"is_carefully_chosen" => 0, //精选商铺--0否1是
"shop_type" => 0, //商铺类型(0商场,1街铺)
"address" => "111",
"disc" => "黄浦区",
"industry_type" => "休闲娱乐",
"shop_area_start" => 45,//面积起始范围 街铺start和end面积一样
"shop_area_end" => 65,//面积结束范围
"rent_price_start" => 1000,//租金 rent_price
"rent_price_end" => 10000,//租金
"shop_sign" => "临近地铁,临近地铁2",
"agent_id" => 630, //添加经纪人id
"status" => 1, //1上架or2下架
"start_time" => "2018-05-25",
"end_time" => "2018-05-30",
"landlord_phone" => "17621970093",
"pageNo" => 1,
"pageSize" => 15
);*/
$conditions
=
[];
if
(
empty
(
$params
[
'site_area'
]))
{
return
$this
->
response
(
"101"
,
"请求来源不能为空"
);
...
...
@@ -264,11 +264,11 @@ class Shop extends Basic
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/* $params = array(
"id" => 3084,
"site_area" => 3, //1.c端 3.b端 4.pc端
"user_id" => 2 //if c端 用户登录后传入user_id
);*/
/* $params = array(
"id" => 3084,
"site_area" => 3, //1.c端 3.b端 4.pc端
"user_id" => 2 //if c端 用户登录后传入user_id
);*/
$conditions
=
[];
if
(
empty
(
$params
[
'id'
]))
{
return
$this
->
response
(
"101"
,
"详情id不能为空"
);
...
...
@@ -278,15 +278,7 @@ class Shop extends Basic
}
if
(
$params
[
'site_area'
]
==
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,
b.enter_num,b.external_item_advantage as item_advantage,b.sign_rule,b.do_business_date, b.opening_date,b.traffic,
b.auditorium,b.tiny_brochure_url,b.start_business_date,b.fee_rule"
;
$conditions
[
'a.status'
]
=
array
(
"eq"
,
1
);
$conditions
[
'a.is_show'
]
=
array
(
'eq'
,
0
);
//c端只显示公开楼盘
}
else
if
(
$params
[
'site_area'
]
==
3
)
{
if
(
$params
[
'site_area'
]
==
3
)
{
$field
=
"a.id,a.internal_title as title,a.internal_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,
...
...
@@ -307,7 +299,8 @@ class Shop extends Basic
$conditions
[
'a.id'
]
=
array
(
"eq"
,
$params
[
"id"
]
);
$field
.=
',b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee,c.agents_id'
;
$field
.=
',b.age_limit,b.payment_month,b.deposit_month,b.external_slotting_fee,c.agents_id, b.area_width,b.depth,
b.electric_quantity,b.voltage,b.exhaust_fume,b.running_water,b.downriver,b.business_scope,b.decoration,b.source'
;
$result
=
$this
->
gHousesModel
->
getHouseDetailById
(
$field
,
$conditions
);
if
(
count
(
$result
)
<=
0
)
{
return
$this
->
response
(
"101"
,
'此楼盘不存在'
);
...
...
@@ -414,8 +407,8 @@ class Shop extends Basic
$result
[
"is_collect"
]
=
1
;
}
$vip_services
=
new
VipService
();
$result
[
'is_can_edit'
]
=
$vip_services
->
vip
(
$params
[
'user_id'
],
'index/houseEdit'
);
$vip_services
=
new
VipService
();
$result
[
'is_can_edit'
]
=
$vip_services
->
vip
(
$params
[
'user_id'
],
'index/houseEdit'
);
}
$result
[
'new_sign_rule'
]
=
"付
{
$result
[
'payment_month'
]
}
押
{
$result
[
'deposit_month'
]
}
,签订
{
$result
[
'age_limit'
]
}
年"
;
...
...
@@ -432,7 +425,7 @@ class Shop extends Basic
*/
public
function
edit
()
{
return
$this
->
response
(
101
,
'请升级最新版本'
);
return
$this
->
response
(
101
,
'请升级最新版本'
);
}
/**
...
...
@@ -465,7 +458,7 @@ class Shop extends Basic
if
(
$house_id
)
{
$result
[
'data'
][
'house_id'
]
=
$house_id
[
'house_id'
];
$result
[
'data'
][
'internal_title'
]
=
empty
(
$this
->
params
[
'internal_title'
])
?
""
:
$this
->
params
[
'internal_title'
];
$result
[
'msg'
]
=
'新增或编辑成功'
;
$result
[
'msg'
]
=
'新增或编辑成功'
;
if
(
isset
(
$house_id
[
'status'
])
&&
$house_id
[
'status'
]
==
2
)
{
$push_service
=
new
PushMessageService
();
...
...
@@ -616,11 +609,11 @@ class Shop extends Basic
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$result
=
$this
->
gHousesModel
->
getHouseInfo
(
'province,city,disc'
,
[
'id'
=>
$params
[
"house_id"
]]);
if
(
$result
)
{
$result
=
$this
->
gHousesModel
->
getHouseInfo
(
'province,city,disc'
,
[
'id'
=>
$params
[
"house_id"
]
]);
if
(
$result
)
{
$params
[
'province'
]
=
$result
[
0
][
'province'
]
?
$result
[
0
][
'province'
]
:
'上海市'
;
$params
[
'city'
]
=
$result
[
0
][
'city'
]
?
$result
[
0
][
'city'
]
:
'上海市'
;
$params
[
'disc'
]
=
$result
[
0
][
'disc'
]
?
$result
[
0
][
'disc'
]
:
'黄浦区'
;
$params
[
'city'
]
=
$result
[
0
][
'city'
]
?
$result
[
0
][
'city'
]
:
'上海市'
;
$params
[
'disc'
]
=
$result
[
0
][
'disc'
]
?
$result
[
0
][
'disc'
]
:
'黄浦区'
;
}
$follow_up_model
=
new
GHousesFollowUp
();
...
...
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