Commit f3e92039 authored by clone's avatar clone

商铺详情字段修改

parent 086130bd
...@@ -183,7 +183,6 @@ class Shop extends Basic ...@@ -183,7 +183,6 @@ class Shop extends Basic
foreach ($result as $key => $val) { foreach ($result as $key => $val) {
$result[$key]["api_path"] = CK_IMG_URL . 'images/'; $result[$key]["api_path"] = CK_IMG_URL . 'images/';
$result[$key]["rent_price"] = $val["rent_price"] * 0.01; $result[$key]["rent_price"] = $val["rent_price"] * 0.01;
$result[$key]["title"] = $val["disc"] . $result[$key]["title"];
$param["house_id"] = $val["id"]; $param["house_id"] = $val["id"];
$param["img_type"] = 1; //默认主图 $param["img_type"] = 1; //默认主图
...@@ -224,12 +223,24 @@ class Shop extends Basic ...@@ -224,12 +223,24 @@ class Shop extends Basic
return $this->response("101", "请求来源错误"); 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, $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.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, 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.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.status'] = array( "eq", 1 );
$conditions['a.is_show'] = array( 'eq', 0 ); //c端只显示公开楼盘 $conditions['a.is_show'] = array( 'eq', 0 ); //c端只显示公开楼盘
...@@ -314,7 +325,7 @@ class Shop extends Basic ...@@ -314,7 +325,7 @@ class Shop extends Basic
break; //目前只有上海和杭州其余的先不显示 break; //目前只有上海和杭州其余的先不显示
} }
$result['yetai'] = array( '全部', '餐饮美食', '百货零售', '服装', '亲子教育', '休闲娱乐', '办公', '其他' ); $result['yetai'] = array( '全部', '商场美食','沿街餐饮', '百货超市', '服饰鞋包', '亲子教育', '休闲娱乐', '办公', '其他' );
//租金租金(0:租金-大于三万; 1:租金一万到三万之间; 2:租金-小于一万) //租金租金(0:租金-大于三万; 1:租金一万到三万之间; 2:租金-小于一万)
$result['money'] = array( array( 'id' => '-1', 'value' => '全部' ), array( 'id' => '0', 'value' => '3万以上' ), $result['money'] = array( array( 'id' => '-1', 'value' => '全部' ), array( 'id' => '0', 'value' => '3万以上' ),
......
...@@ -56,28 +56,28 @@ class Shop extends Basic ...@@ -56,28 +56,28 @@ class Shop extends Basic
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"site_area" => 4, //来源 1c首页 2c搜索 3b首页 4b搜索 5b报备 "site_area" => 4, //来源 1c首页 2c搜索 3b首页 4b搜索 5b报备
// "title" => "vv", //1,2 external_title ,3,4internal_title // "title" => "vv", //1,2 external_title ,3,4internal_title
"house_id" => 4, "house_id" => 4,
"is_carefully_chosen" => 0, //精选商铺--0否1是 "is_carefully_chosen" => 0, //精选商铺--0否1是
"shop_type" => 0, //商铺类型(0商场,1街铺) "shop_type" => 0, //商铺类型(0商场,1街铺)
"address" => "111", "address" => "111",
"disc" => "黄浦区", "disc" => "黄浦区",
"industry_type" => "休闲娱乐", "industry_type" => "休闲娱乐",
"shop_area_start" => 45,//面积起始范围 街铺start和end面积一样 "shop_area_start" => 45,//面积起始范围 街铺start和end面积一样
"shop_area_end" => 65,//面积结束范围 "shop_area_end" => 65,//面积结束范围
"rent_price_start" => 1000,//租金 rent_price "rent_price_start" => 1000,//租金 rent_price
"rent_price_end" => 10000,//租金 "rent_price_end" => 10000,//租金
"shop_sign" => "临近地铁,临近地铁2", "shop_sign" => "临近地铁,临近地铁2",
"agent_id" => 630, //添加经纪人id "agent_id" => 630, //添加经纪人id
"status" => 1, //1上架or2下架 "status" => 1, //1上架or2下架
"start_time" => "2018-05-25", "start_time" => "2018-05-25",
"end_time" => "2018-05-30", "end_time" => "2018-05-30",
"landlord_phone" => "17621970093", "landlord_phone" => "17621970093",
"pageNo" => 1, "pageNo" => 1,
"pageSize" => 15 "pageSize" => 15
);*/ );*/
$conditions = []; $conditions = [];
if (empty($params['site_area'])) { if (empty($params['site_area'])) {
return $this->response("101", "请求来源不能为空"); return $this->response("101", "请求来源不能为空");
...@@ -264,11 +264,11 @@ class Shop extends Basic ...@@ -264,11 +264,11 @@ class Shop extends Basic
header('Access-Control-Allow-Origin:*'); header('Access-Control-Allow-Origin:*');
$params = $this->params; $params = $this->params;
/* $params = array( /* $params = array(
"id" => 3084, "id" => 3084,
"site_area" => 3, //1.c端 3.b端 4.pc端 "site_area" => 3, //1.c端 3.b端 4.pc端
"user_id" => 2 //if c端 用户登录后传入user_id "user_id" => 2 //if c端 用户登录后传入user_id
);*/ );*/
$conditions = []; $conditions = [];
if (empty($params['id'])) { if (empty($params['id'])) {
return $this->response("101", "详情id不能为空"); return $this->response("101", "详情id不能为空");
...@@ -278,15 +278,7 @@ class Shop extends Basic ...@@ -278,15 +278,7 @@ class Shop extends Basic
} }
if ($params['site_area'] == 1) { if ($params['site_area'] == 3) {
$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) {
$field = "a.id,a.internal_title as title,a.internal_address as address,a.city,a.disc,a.business_district_id,a.status, $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.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, 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 ...@@ -307,7 +299,8 @@ class Shop extends Basic
$conditions['a.id'] = array( "eq", $params["id"] ); $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); $result = $this->gHousesModel->getHouseDetailById($field, $conditions);
if (count($result) <= 0) { if (count($result) <= 0) {
return $this->response("101", '此楼盘不存在'); return $this->response("101", '此楼盘不存在');
...@@ -414,8 +407,8 @@ class Shop extends Basic ...@@ -414,8 +407,8 @@ class Shop extends Basic
$result["is_collect"] = 1; $result["is_collect"] = 1;
} }
$vip_services = new VipService(); $vip_services = new VipService();
$result['is_can_edit'] = $vip_services->vip($params['user_id'],'index/houseEdit'); $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']}年"; $result['new_sign_rule'] = "付{$result['payment_month']}{$result['deposit_month']},签订{$result['age_limit']}年";
...@@ -432,7 +425,7 @@ class Shop extends Basic ...@@ -432,7 +425,7 @@ class Shop extends Basic
*/ */
public function edit() public function edit()
{ {
return $this->response(101,'请升级最新版本'); return $this->response(101, '请升级最新版本');
} }
/** /**
...@@ -465,7 +458,7 @@ class Shop extends Basic ...@@ -465,7 +458,7 @@ class Shop extends Basic
if ($house_id) { if ($house_id) {
$result['data']['house_id'] = $house_id['house_id']; $result['data']['house_id'] = $house_id['house_id'];
$result['data']['internal_title'] = empty($this->params['internal_title']) ? "" : $this->params['internal_title']; $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) { if (isset($house_id['status']) && $house_id['status'] == 2) {
$push_service = new PushMessageService(); $push_service = new PushMessageService();
...@@ -616,11 +609,11 @@ class Shop extends Basic ...@@ -616,11 +609,11 @@ class Shop extends Basic
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
$result = $this->gHousesModel->getHouseInfo('province,city,disc', [ 'id' => $params["house_id"]]); $result = $this->gHousesModel->getHouseInfo('province,city,disc', [ 'id' => $params["house_id"] ]);
if($result){ if ($result) {
$params['province'] = $result[0]['province'] ? $result[0]['province'] : '上海市'; $params['province'] = $result[0]['province'] ? $result[0]['province'] : '上海市';
$params['city'] = $result[0]['city']? $result[0]['city'] : '上海市'; $params['city'] = $result[0]['city'] ? $result[0]['city'] : '上海市';
$params['disc'] = $result[0]['disc']? $result[0]['disc'] : '黄浦区'; $params['disc'] = $result[0]['disc'] ? $result[0]['disc'] : '黄浦区';
} }
$follow_up_model = new GHousesFollowUp(); $follow_up_model = new GHousesFollowUp();
......
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