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
f123bc31
Commit
f123bc31
authored
Aug 15, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b708a226
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
103 additions
and
61 deletions
+103
-61
Shop.php
application/api_broker/controller/Shop.php
+88
-58
TLookShopUser.php
application/model/TLookShopUser.php
+11
-0
route.php
application/route.php
+4
-3
No files found.
application/api_broker/controller/Shop.php
View file @
f123bc31
...
@@ -25,6 +25,7 @@ use app\model\OBargainModel;
...
@@ -25,6 +25,7 @@ use app\model\OBargainModel;
use
app\model\OfficeGBuilding
;
use
app\model\OfficeGBuilding
;
use
app\model\OReportModel
;
use
app\model\OReportModel
;
use
app\model\Regions
;
use
app\model\Regions
;
use
app\model\TLookShopUser
;
use
think\Log
;
use
think\Log
;
...
@@ -110,9 +111,9 @@ class Shop extends Basic
...
@@ -110,9 +111,9 @@ class Shop extends Basic
$field
=
"id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
$field
=
"id,internal_title as title,internal_address as address,city,disc,business_district_id,status,industry_type
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price,is_lock
,shop_area_start,shop_area_end,shop_type,residue_num,shop_sign,is_carefully_chosen,rent_type,rent_price,is_lock
,is_exclusive_type,is_vip,floor"
;
,is_exclusive_type,is_vip,floor"
;
if
(
empty
(
$params
[
"city"
]))
{
if
(
empty
(
$params
[
"city"
]))
{
$conditions
[
"city"
]
=
trim
(
$this
->
city
);
$conditions
[
"city"
]
=
trim
(
$this
->
city
);
}
else
{
}
else
{
$conditions
[
"city"
]
=
$params
[
"city"
];
$conditions
[
"city"
]
=
$params
[
"city"
];
}
}
...
@@ -152,9 +153,9 @@ class Shop extends Basic
...
@@ -152,9 +153,9 @@ class Shop extends Basic
//residue_type 2已租,1求租
//residue_type 2已租,1求租
if
(
is_numeric
(
$params
[
'residue_type'
]))
{
if
(
is_numeric
(
$params
[
'residue_type'
]))
{
if
(
$params
[
'residue_type'
]
==
1
)
{
if
(
$params
[
'residue_type'
]
==
1
)
{
$conditions
[
'residue_num'
]
=
array
(
'gt'
,
0
);
$conditions
[
'residue_num'
]
=
array
(
'gt'
,
0
);
}
else
{
}
else
{
$conditions
[
'residue_num'
]
=
0
;
$conditions
[
'residue_num'
]
=
0
;
}
}
}
}
...
@@ -279,7 +280,7 @@ class Shop extends Basic
...
@@ -279,7 +280,7 @@ class Shop extends Basic
$conditions
[
'status'
]
=
!
empty
(
$params
[
'status'
])
?
$params
[
'status'
]
:
array
(
'in'
,
"1,2"
);
//只显示上架或下架的
$conditions
[
'status'
]
=
!
empty
(
$params
[
'status'
])
?
$params
[
'status'
]
:
array
(
'in'
,
"1,2"
);
//只显示上架或下架的
}
}
if
(
!
empty
(
$params
[
"site_name"
]))
{
if
(
!
empty
(
$params
[
"site_name"
]))
{
$conditions
[
"city"
]
=
$params
[
"site_name"
];
$conditions
[
"city"
]
=
$params
[
"site_name"
];
}
}
...
@@ -296,7 +297,7 @@ class Shop extends Basic
...
@@ -296,7 +297,7 @@ class Shop extends Basic
// $business_district = $m_business_district->getValue(['id'=>$val["business_district_id"]], 'name');
// $business_district = $m_business_district->getValue(['id'=>$val["business_district_id"]], 'name');
// }
// }
// $result[$key]["title"] = $val["disc"] . $business_district .$result[$key]["title"];
// $result[$key]["title"] = $val["disc"] . $business_district .$result[$key]["title"];
$result
[
$key
][
"title"
]
=
$val
[
"disc"
]
.
$result
[
$key
][
"title"
];
$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
;
//默认主图
...
@@ -328,7 +329,8 @@ class Shop extends Basic
...
@@ -328,7 +329,8 @@ class Shop extends Basic
* @param $house_id
* @param $house_id
* @return bool
* @return bool
*/
*/
private
function
isLookLock
(
$house_id
){
private
function
isLookLock
(
$house_id
)
{
$vip
=
new
VipService
();
$vip
=
new
VipService
();
if
(
!
$vip
->
vip
(
$this
->
agentId
,
'index/lockHouse'
))
{
if
(
!
$vip
->
vip
(
$this
->
agentId
,
'index/lockHouse'
))
{
return
true
;
return
true
;
...
@@ -369,7 +371,7 @@ class Shop extends Basic
...
@@ -369,7 +371,7 @@ class Shop extends Basic
);*/
);*/
$conditions
=
[];
$conditions
=
[];
$field
=
"id,internal_title as title,internal_address as address"
;
$field
=
"id,internal_title as title,internal_address as address"
;
if
(
empty
(
$params
[
"city"
]))
{
if
(
empty
(
$params
[
"city"
]))
{
$conditions
[
"city"
]
=
trim
(
$this
->
city
);
$conditions
[
"city"
]
=
trim
(
$this
->
city
);
}
}
...
@@ -377,8 +379,8 @@ class Shop extends Basic
...
@@ -377,8 +379,8 @@ class Shop extends Basic
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
if
(
isset
(
$params
[
'keyword'
])
&&
!
empty
(
$params
[
'keyword'
])
)
{
if
(
isset
(
$params
[
'keyword'
])
&&
!
empty
(
$params
[
'keyword'
]))
{
$conditions
[
'id|internal_title'
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'keyword'
])
.
"%"
);
$conditions
[
'id|internal_title'
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'keyword'
])
.
"%"
);
}
}
$order_
=
"status asc,id desc"
;
$order_
=
"status asc,id desc"
;
...
@@ -426,7 +428,7 @@ class Shop extends Basic
...
@@ -426,7 +428,7 @@ class Shop extends Basic
private
function
returnHouseIdV2
(
$landlord_phone
)
private
function
returnHouseIdV2
(
$landlord_phone
)
{
{
$houseExtModel
=
new
GLandlordPhone
();
$houseExtModel
=
new
GLandlordPhone
();
$where
[
'phone'
]
=
[
'LIKE'
,
'%'
.
$landlord_phone
.
'%'
];
$where
[
'phone'
]
=
[
'LIKE'
,
'%'
.
$landlord_phone
.
'%'
];
$where
[
'status'
]
=
0
;
$where
[
'status'
]
=
0
;
$houseIds
=
$houseExtModel
->
getAllList
(
'house_id'
,
$where
);
$houseIds
=
$houseExtModel
->
getAllList
(
'house_id'
,
$where
);
$ids
=
""
;
$ids
=
""
;
...
@@ -547,7 +549,7 @@ class Shop extends Basic
...
@@ -547,7 +549,7 @@ class Shop extends Basic
}
}
$is_look
=
$this
->
isLookLock
(
$result
[
'id'
]);
$is_look
=
$this
->
isLookLock
(
$result
[
'id'
]);
if
(
$result
[
'is_lock'
]
==
1
&&
!
$is_look
)
{
if
(
$result
[
'is_lock'
]
==
1
&&
!
$is_look
)
{
return
$this
->
response
(
"101"
,
'没有查看权限'
);
return
$this
->
response
(
"101"
,
'没有查看权限'
);
}
}
...
@@ -584,14 +586,14 @@ class Shop extends Basic
...
@@ -584,14 +586,14 @@ class Shop extends Basic
if
(
$is_show_landlord
)
{
if
(
$is_show_landlord
)
{
$m_landlord
=
new
GLandlordPhone
();
$m_landlord
=
new
GLandlordPhone
();
$result
[
'landlord_phone'
]
=
$m_landlord
->
getAllList
(
'id,name,phone'
,
[
'house_id'
=>
$params
[
"id"
],
'status'
=>
0
]);
$result
[
'landlord_phone'
]
=
$m_landlord
->
getAllList
(
'id,name,phone'
,
[
'house_id'
=>
$params
[
"id"
],
'status'
=>
0
]);
foreach
(
$result
[
'landlord_phone'
]
as
$kk
=>
$vv
)
{
foreach
(
$result
[
'landlord_phone'
]
as
$kk
=>
$vv
)
{
$result
[
'landlord_phone'
][
$kk
][
'phone'
]
=
substr_replace
(
$result
[
'landlord_phone'
][
$kk
][
'phone'
],
'****'
,
3
,
4
);
$result
[
'landlord_phone'
][
$kk
][
'phone'
]
=
substr_replace
(
$result
[
'landlord_phone'
][
$kk
][
'phone'
],
'****'
,
3
,
4
);
$result
[
'landlord_phone'
][
$kk
][
'name'
]
=
'(房东ID:'
.
$result
[
'landlord_phone'
][
$kk
][
'id'
]
.
')'
.
$result
[
'landlord_phone'
][
$kk
][
'name'
];
$result
[
'landlord_phone'
][
$kk
][
'name'
]
=
'(房东ID:'
.
$result
[
'landlord_phone'
][
$kk
][
'id'
]
.
')'
.
$result
[
'landlord_phone'
][
$kk
][
'name'
];
}
}
$result
[
'is_show_landlord'
]
=
1
;
$result
[
'is_show_landlord'
]
=
1
;
}
else
{
}
else
{
$result
[
'landlord_phone'
]
=
[[
'name'
=>
''
,
'phone'
=>
''
]];
$result
[
'landlord_phone'
]
=
[[
'name'
=>
''
,
'phone'
=>
''
]];
$result
[
'is_show_landlord'
]
=
0
;
$result
[
'is_show_landlord'
]
=
0
;
}
}
...
@@ -662,36 +664,36 @@ class Shop extends Basic
...
@@ -662,36 +664,36 @@ class Shop extends Basic
if
(
$params
[
'site_area'
]
==
3
)
{
if
(
$params
[
'site_area'
]
==
3
)
{
#是否被收藏
#是否被收藏
$result
[
"is_collect"
]
=
$this
->
isCollect
(
$params
[
"id"
],
$params
[
"user_id"
]);
$result
[
"is_collect"
]
=
$this
->
isCollect
(
$params
[
"id"
],
$params
[
"user_id"
]);
$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'
);
}
}
$is_bool
=
$this
->
isCanEditByAgentId
(
$panPartyArr
);
$is_bool
=
$this
->
isCanEditByAgentId
(
$panPartyArr
);
if
(
$is_bool
)
{
if
(
$is_bool
)
{
$result
[
'is_can_edit'
]
=
0
;
$result
[
'is_can_edit'
]
=
0
;
}
}
$is_show_address
=
$this
->
isLookAddress
(
$panPartyArr
,
$house_agent_data
,
$params
[
"id"
]);
$is_show_address
=
$this
->
isLookAddress
(
$panPartyArr
,
$house_agent_data
,
$params
[
"id"
]);
if
(
!
$is_show_address
)
{
if
(
!
$is_show_address
)
{
$result
[
'address'
]
=
$result
[
'external_address'
];
$result
[
'address'
]
=
$result
[
'external_address'
];
}
}
$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'
]
}
年"
;
$result
[
'payment_deposit'
]
=
empty
(
$result
[
'payment_month'
])
?
""
:
"付
{
$result
[
'payment_month'
]
}
押
{
$result
[
'deposit_month'
]
}
"
;
$result
[
'payment_deposit'
]
=
empty
(
$result
[
'payment_month'
])
?
""
:
"付
{
$result
[
'payment_month'
]
}
押
{
$result
[
'deposit_month'
]
}
"
;
$result
[
'age_limit'
]
=
empty
(
$result
[
'age_limit'
])
?
""
:
"签订
{
$result
[
'age_limit'
]
}
年"
;
$result
[
'age_limit'
]
=
empty
(
$result
[
'age_limit'
])
?
""
:
"签订
{
$result
[
'age_limit'
]
}
年"
;
if
(
$result
[
'is_show_image'
]
==
1
)
{
if
(
$result
[
'is_show_image'
]
==
1
)
{
$result
[
'external_image'
]
=
empty
(
$result
[
'images'
][
0
])
?
""
:
CK_IMG_URL
.
'images/'
.
$result
[
'images'
][
0
][
'img_name'
];
$result
[
'external_image'
]
=
empty
(
$result
[
'images'
][
0
])
?
""
:
CK_IMG_URL
.
'images/'
.
$result
[
'images'
][
0
][
'img_name'
];
}
else
{
}
else
{
$m_image_depot
=
new
GImageDepot
();
$m_image_depot
=
new
GImageDepot
();
$image_id
=
explode
(
','
,
$result
[
'external_image_id'
]);
$image_id
=
explode
(
','
,
$result
[
'external_image_id'
]);
$external_image
=
$m_image_depot
->
getInfo
(
'img_name'
,
[
'id'
=>
$image_id
[
0
],
'img_status'
=>
0
]);
$external_image
=
$m_image_depot
->
getInfo
(
'img_name'
,
[
'id'
=>
$image_id
[
0
],
'img_status'
=>
0
]);
$result
[
'external_image'
]
=
empty
(
$external_image
[
'img_name'
])
?
""
:
SHOP_IMAGE_DEPOT_URL
.
$external_image
[
'img_name'
];
$result
[
'external_image'
]
=
empty
(
$external_image
[
'img_name'
])
?
""
:
SHOP_IMAGE_DEPOT_URL
.
$external_image
[
'img_name'
];
}
}
//302版本
//302版本
//判断是否有权限点击独家合同按钮 0:可查看 1:不可查看
//判断是否有权限点击独家合同按钮 0:可查看 1:不可查看
$s_house
=
new
HouseService
();
$s_house
=
new
HouseService
();
$result
[
'is_can_edit_only_contract'
]
=
$s_house
->
isCanEditOnlyContract
(
$this
->
agentId
,
$params
[
"id"
]);
$result
[
'is_can_edit_only_contract'
]
=
$s_house
->
isCanEditOnlyContract
(
$this
->
agentId
,
$params
[
"id"
]);
#商铺视频
#商铺视频
// dump('999');exit;
// dump('999');exit;
...
@@ -738,7 +740,7 @@ class Shop extends Basic
...
@@ -738,7 +740,7 @@ class Shop extends Basic
$agent_ids
=
$s_user_log
->
getSiteAgentId
(
$agent_id
);
$agent_ids
=
$s_user_log
->
getSiteAgentId
(
$agent_id
);
if
(
$agent_ids
)
{
if
(
$agent_ids
)
{
//此经纪人有转勤账号
//此经纪人有转勤账号
$get_params
[
"agents_id"
]
=
array
(
'in'
,
$agent_ids
);
$get_params
[
"agents_id"
]
=
array
(
'in'
,
$agent_ids
);
}
else
{
}
else
{
$get_params
[
"agents_id"
]
=
$agent_id
;
$get_params
[
"agents_id"
]
=
$agent_id
;
}
}
...
@@ -803,36 +805,37 @@ class Shop extends Basic
...
@@ -803,36 +805,37 @@ class Shop extends Basic
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\DbException
*/
*/
private
function
isLookAddress
(
$panPartyArr
,
$house_agent_data
,
$house_id
){
private
function
isLookAddress
(
$panPartyArr
,
$house_agent_data
,
$house_id
)
{
$vip_services
=
new
VipService
();
$vip_services
=
new
VipService
();
$is_can
=
$vip_services
->
vip
(
$this
->
agentId
,
'is_show_address'
);
$is_can
=
$vip_services
->
vip
(
$this
->
agentId
,
'is_show_address'
);
if
(
$is_can
==
0
)
{
if
(
$is_can
==
0
)
{
return
true
;
return
true
;
}
}
foreach
(
$panPartyArr
as
$item
){
foreach
(
$panPartyArr
as
$item
)
{
if
(
$this
->
agentId
==
$item
[
"id"
])
{
if
(
$this
->
agentId
==
$item
[
"id"
])
{
return
true
;
return
true
;
}
}
}
}
if
(
!
empty
(
$house_agent_data
))
{
if
(
!
empty
(
$house_agent_data
))
{
foreach
(
$house_agent_data
as
$value
){
foreach
(
$house_agent_data
as
$value
)
{
if
(
$this
->
agentId
==
$value
[
"id"
])
{
if
(
$this
->
agentId
==
$value
[
"id"
])
{
return
true
;
return
true
;
}
}
}
}
}
}
//根据经纪人id和楼盘查询是否30天有报备
//根据经纪人id和楼盘查询是否30天有报备
$start_time
=
date
(
"Y-m-d"
,
strtotime
(
'-30day'
));
$start_time
=
date
(
"Y-m-d"
,
strtotime
(
'-30day'
));
$end_time
=
date
(
"Y-m-d H:i:s"
,
time
());
$end_time
=
date
(
"Y-m-d H:i:s"
,
time
());
$reportModel
=
new
OReportModel
();
$reportModel
=
new
OReportModel
();
$params
[
"report_agent_id"
]
=
$this
->
agentId
;
$params
[
"report_agent_id"
]
=
$this
->
agentId
;
$params
[
"house_id"
]
=
$house_id
;
$params
[
"house_id"
]
=
$house_id
;
$params
[
"create_time"
]
=
array
(
"between"
,
array
(
$start_time
,
$end_time
));
$params
[
"create_time"
]
=
array
(
"between"
,
array
(
$start_time
,
$end_time
));
$reportList
=
$reportModel
->
selectReportByUserId
(
"a.id"
,
$params
);
$reportList
=
$reportModel
->
selectReportByUserId
(
"a.id"
,
$params
);
if
(
count
(
$reportList
)
>
0
)
{
if
(
count
(
$reportList
)
>
0
)
{
return
true
;
return
true
;
}
}
...
@@ -844,14 +847,15 @@ class Shop extends Basic
...
@@ -844,14 +847,15 @@ class Shop extends Basic
* @param $panPartyArr
* @param $panPartyArr
* @return bool
* @return bool
*/
*/
private
function
isCanEditByAgentId
(
$panPartyArr
){
private
function
isCanEditByAgentId
(
$panPartyArr
)
{
$agentModel
=
new
AAgents
();
$agentModel
=
new
AAgents
();
foreach
(
$panPartyArr
as
$item
){
foreach
(
$panPartyArr
as
$item
)
{
$params
[
"store_id"
]
=
$item
[
"store_id"
];
$params
[
"store_id"
]
=
$item
[
"store_id"
];
$params
[
"level"
]
=
array
(
"in"
,
"20,40"
);
$params
[
"level"
]
=
array
(
"in"
,
"20,40"
);
$result
=
$agentModel
->
getStoreIdByAgentId
(
"id"
,
$params
);
$result
=
$agentModel
->
getStoreIdByAgentId
(
"id"
,
$params
);
if
(
$this
->
agentId
==
$result
[
0
][
"id"
])
{
if
(
$this
->
agentId
==
$result
[
0
][
"id"
])
{
return
true
;
return
true
;
}
}
}
}
...
@@ -1108,7 +1112,8 @@ class Shop extends Basic
...
@@ -1108,7 +1112,8 @@ class Shop extends Basic
*
*
* @return \think\Response
* @return \think\Response
*/
*/
public
function
getHouseAddress
()
{
public
function
getHouseAddress
()
{
if
(
empty
(
$this
->
params
[
'address'
])
||
empty
(
$this
->
params
[
'city'
]))
{
if
(
empty
(
$this
->
params
[
'address'
])
||
empty
(
$this
->
params
[
'city'
]))
{
return
$this
->
response
(
101
,
'参数错误'
);
return
$this
->
response
(
101
,
'参数错误'
);
}
}
...
@@ -1116,13 +1121,13 @@ class Shop extends Basic
...
@@ -1116,13 +1121,13 @@ class Shop extends Basic
$msg
=
""
;
$msg
=
""
;
try
{
try
{
$m_house
=
new
GHouses
();
$m_house
=
new
GHouses
();
$where
[
'internal_address'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'address'
]
.
'%'
];
$where
[
'internal_address'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'address'
]
.
'%'
];
$where
[
'city'
]
=
$this
->
params
[
'city'
];
$where
[
'city'
]
=
$this
->
params
[
'city'
];
$data
=
$m_house
->
getHouseInfo
(
'id,internal_address as address'
,
$where
);
$data
=
$m_house
->
getHouseInfo
(
'id,internal_address as address'
,
$where
);
$code
=
200
;
$code
=
200
;
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$code
=
101
;
$code
=
101
;
$msg
=
"内部错误:"
.
$e
->
getMessage
();
$msg
=
"内部错误:"
.
$e
->
getMessage
();
}
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
return
$this
->
response
(
$code
,
$msg
,
$data
);
...
@@ -1133,7 +1138,8 @@ class Shop extends Basic
...
@@ -1133,7 +1138,8 @@ class Shop extends Basic
*
*
* @return \think\Response
* @return \think\Response
*/
*/
public
function
getOfficeBuildingAddress
()
{
public
function
getOfficeBuildingAddress
()
{
if
(
empty
(
$this
->
params
[
'address'
])
||
empty
(
$this
->
params
[
'city'
]))
{
if
(
empty
(
$this
->
params
[
'address'
])
||
empty
(
$this
->
params
[
'city'
]))
{
return
$this
->
response
(
101
,
'参数错误'
);
return
$this
->
response
(
101
,
'参数错误'
);
}
}
...
@@ -1141,22 +1147,23 @@ class Shop extends Basic
...
@@ -1141,22 +1147,23 @@ class Shop extends Basic
$msg
=
""
;
$msg
=
""
;
try
{
try
{
$m_house
=
new
OfficeGBuilding
();
$m_house
=
new
OfficeGBuilding
();
$where
[
'internal_address'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'address'
]
.
'%'
];
$where
[
'internal_address'
]
=
[
'LIKE'
,
'%'
.
$this
->
params
[
'address'
]
.
'%'
];
$where
[
'city'
]
=
$this
->
params
[
'city'
];
$where
[
'city'
]
=
$this
->
params
[
'city'
];
$data
=
$m_house
->
getFindData
(
'id,address'
,
$where
);
$data
=
$m_house
->
getFindData
(
'id,address'
,
$where
);
$code
=
200
;
$code
=
200
;
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
$code
=
101
;
$code
=
101
;
$msg
=
"内部错误:"
.
$e
->
getMessage
();
$msg
=
"内部错误:"
.
$e
->
getMessage
();
}
}
return
$this
->
response
(
$code
,
$msg
,
$data
);
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
private
function
getBusinessDistrictNameById
(
$businessDistrictId
){
private
function
getBusinessDistrictNameById
(
$businessDistrictId
)
{
$model
=
new
GBusinessDistrict
();
$model
=
new
GBusinessDistrict
();
$params
[
"id"
]
=
$businessDistrictId
;
$params
[
"id"
]
=
$businessDistrictId
;
return
$model
->
getValue
(
$params
,
"name"
);
return
$model
->
getValue
(
$params
,
"name"
);
}
}
...
@@ -1169,7 +1176,7 @@ class Shop extends Basic
...
@@ -1169,7 +1176,7 @@ class Shop extends Basic
$res
=
$this
->
gHousesModel
->
getExclusive
(
$this
->
params
[
'houses_id'
]);
$res
=
$this
->
gHousesModel
->
getExclusive
(
$this
->
params
[
'houses_id'
]);
// dump($res);
// dump($res);
foreach
(
$res
[
'exclusive_img'
]
as
$key
=>
$val
)
{
foreach
(
$res
[
'exclusive_img'
]
as
$key
=>
$val
)
{
$res
[
'exclusive_img'
][
$key
][
'file_name'
]
=
IMAGES_URL
.
'resource/lib/Attachments/images/'
.
$val
[
'img_name'
];
$res
[
'exclusive_img'
][
$key
][
'file_name'
]
=
IMAGES_URL
.
'resource/lib/Attachments/images/'
.
$val
[
'img_name'
];
$res
[
'exclusive_img'
][
$key
][
'save_path'
]
=
$val
[
'img_name'
];
$res
[
'exclusive_img'
][
$key
][
'save_path'
]
=
$val
[
'img_name'
];
}
}
}
else
{
}
else
{
...
@@ -1271,7 +1278,7 @@ class Shop extends Basic
...
@@ -1271,7 +1278,7 @@ class Shop extends Basic
$pageSize
=
empty
(
$this
->
params
[
'page_size'
])
?
15
:
$this
->
params
[
'page_size'
];
$pageSize
=
empty
(
$this
->
params
[
'page_size'
])
?
15
:
$this
->
params
[
'page_size'
];
$field
=
'a.id,a.video_name,a.house_id,a.upload_name,a.check_name,a.check_id,a.check_time,a.create_time,a.video_image'
;
$field
=
'a.id,a.video_name,a.house_id,a.upload_name,a.check_name,a.check_id,a.check_time,a.create_time,a.video_image'
;
$data
=
$m_house_video
->
getVideoAgentList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$field
,
$where
);
$data
=
$m_house_video
->
getVideoAgentList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$field
,
$where
);
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
$data
[
$k
][
'check_time'
]
=
$v
[
'check_time'
]
?
$v
[
'check_time'
]
:
''
;
$data
[
$k
][
'check_time'
]
=
$v
[
'check_time'
]
?
$v
[
'check_time'
]
:
''
;
$data
[
$k
][
'check_status'
]
=
$v
[
'check_id'
]
?
1
:
0
;
$data
[
$k
][
'check_status'
]
=
$v
[
'check_id'
]
?
1
:
0
;
$data
[
$k
][
'path'
]
=
'resource/lib/Attachments/video/'
;
$data
[
$k
][
'path'
]
=
'resource/lib/Attachments/video/'
;
...
@@ -1297,7 +1304,7 @@ class Shop extends Basic
...
@@ -1297,7 +1304,7 @@ class Shop extends Basic
}
}
$m_house_video
=
new
GHousesVideo
();
$m_house_video
=
new
GHousesVideo
();
$video_data
=
$m_house_video
->
getVideoFind
(
'id,upload_id'
,[
'id'
=>
$this
->
params
[
'video_id'
],
'is_del'
=>
0
]);
$video_data
=
$m_house_video
->
getVideoFind
(
'id,upload_id'
,
[
'id'
=>
$this
->
params
[
'video_id'
],
'is_del'
=>
0
]);
if
(
!
$video_data
[
'id'
])
{
if
(
!
$video_data
[
'id'
])
{
return
$this
->
response
(
$code
,
'没有该视频'
);
return
$this
->
response
(
$code
,
'没有该视频'
);
...
@@ -1324,13 +1331,36 @@ class Shop extends Basic
...
@@ -1324,13 +1331,36 @@ class Shop extends Basic
return
$this
->
response
(
101
,
'没有权限'
);
return
$this
->
response
(
101
,
'没有权限'
);
}
}
$num
=
$m_house_video
->
updateData
(
$data
,
[
'id'
=>
$this
->
params
[
'video_id'
]]);
$num
=
$m_house_video
->
updateData
(
$data
,
[
'id'
=>
$this
->
params
[
'video_id'
]]);
if
(
$num
)
{
if
(
$num
)
{
$msg
=
$this
->
params
[
'type'
]
==
'check'
?
'审核成功'
:
'删除成功'
;
$msg
=
$this
->
params
[
'type'
]
==
'check'
?
'审核成功'
:
'删除成功'
;
$code
=
200
;
$code
=
200
;
}
else
{
}
else
{
$msg
=
$this
->
params
[
'type'
]
==
'check'
?
'审核失败'
:
'删除失败'
;
$msg
=
$this
->
params
[
'type'
]
==
'check'
?
'审核失败'
:
'删除失败'
;
}
}
return
$this
->
response
(
$code
,
$msg
);
return
$this
->
response
(
$code
,
$msg
);
}
}
public
function
getUserLookShopList
()
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/* $params = array(
"house_id" => 1,
"pageNo" => 1,
"pageSize" => 15
);*/
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
if
(
!
isset
(
$params
[
"house_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
//t_look_shop_user
$lookShopUserModel
=
new
TLookShopUser
();
$where_
[
"house_id"
]
=
$params
[
"house_id"
];
$logArr
=
$lookShopUserModel
->
getLogList
(
$where_
,
"id,user_id,type,house_id,look_day"
,
$pageNo
,
$pageSize
);
return
$this
->
response
(
"200"
,
"success"
,
$logArr
);
}
}
}
application/model/TLookShopUser.php
View file @
f123bc31
...
@@ -55,4 +55,14 @@ class TLookShopUser extends Model
...
@@ -55,4 +55,14 @@ class TLookShopUser extends Model
->
where
(
$condition
)
->
where
(
$condition
)
->
count
();
->
count
();
}
}
public
function
getLogList
(
$condition
,
$field
,
$pageNo
,
$pageSize
)
{
return
$this
->
db_
->
field
(
$field
)
->
where
(
$condition
)
->
page
(
$pageNo
)
->
limit
(
$pageSize
)
->
order
(
"id desc"
)
->
select
();
}
}
}
\ No newline at end of file
application/route.php
View file @
f123bc31
...
@@ -640,9 +640,9 @@ Route::group('api', [
...
@@ -640,9 +640,9 @@ Route::group('api', [
'getTradeList'
=>
[
'api/TradeLog/getTradeList'
,
[
'method'
=>
'post|get'
]],
'getTradeList'
=>
[
'api/TradeLog/getTradeList'
,
[
'method'
=>
'post|get'
]],
//AttentionShop
//AttentionShop
'addOrUpdateAttention'
=>
[
'api/AttentionShop/addOrUpdateAttention'
,
[
'method'
=>
'post|get'
]
],
'addOrUpdateAttention'
=>
[
'api/AttentionShop/addOrUpdateAttention'
,
[
'method'
=>
'post|get'
]
],
'attentionList'
=>
[
'api/AttentionShop/attentionList'
,
[
'method'
=>
'post | get'
]
],
'attentionList'
=>
[
'api/AttentionShop/attentionList'
,
[
'method'
=>
'post | get'
]
],
'attentionOfficeList'
=>
[
'api/AttentionShop/attentionOfficeList'
,
[
'method'
=>
'post | get'
]
],
//关注的办公楼
'attentionOfficeList'
=>
[
'api/AttentionShop/attentionOfficeList'
,
[
'method'
=>
'post | get'
]
],
//关注的办公楼
'addSublet'
=>
[
'api/Sublet/addSublet'
,
[
'method'
=>
'post|get'
]],
'addSublet'
=>
[
'api/Sublet/addSublet'
,
[
'method'
=>
'post|get'
]],
...
@@ -1054,6 +1054,7 @@ Route::group('broker', [
...
@@ -1054,6 +1054,7 @@ Route::group('broker', [
'getWorkLearningList'
=>
[
'api_broker/UploadWorkLearning/getWorkLearningList'
,
[
'method'
=>
'GET'
]],
//保存0素质测评 1方法分析 2价值观考核图片
'getWorkLearningList'
=>
[
'api_broker/UploadWorkLearning/getWorkLearningList'
,
[
'method'
=>
'GET'
]],
//保存0素质测评 1方法分析 2价值观考核图片
'subletList'
=>
[
'api_broker/Sublet/subletList'
,
[
'method'
=>
'GET'
]],
//委托转铺列表
'subletList'
=>
[
'api_broker/Sublet/subletList'
,
[
'method'
=>
'GET'
]],
//委托转铺列表
'getUserLookShopList'
=>
[
'api_broker/Shop/getUserLookShopList'
,
[
'method'
=>
'GET'
]],
//委托转铺列表
]);
]);
...
...
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