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
17bd7f93
Commit
17bd7f93
authored
Sep 04, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
7fc5c153
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
17 deletions
+64
-17
LookShop.php
application/api_broker/controller/LookShop.php
+27
-5
Shop.php
application/api_broker/controller/Shop.php
+1
-1
LookShopService.php
application/api_broker/service/LookShopService.php
+35
-10
route.php
application/route.php
+1
-1
No files found.
application/api_broker/controller/LookShop.php
View file @
17bd7f93
...
@@ -165,7 +165,32 @@ class LookShop extends Basic
...
@@ -165,7 +165,32 @@ class LookShop extends Basic
* 客户浏览记录
* 客户浏览记录
* @return \think\Response
* @return \think\Response
*/
*/
public
function
getLookShopList
()
// public function getLookShopList()
// {
// $params = $this->params;
// $checkResult = $this->validate($params, "UserLookShopValidate.getLookShopList");
// if (true !== $checkResult) {
// return $this->response("101", $checkResult);
// }
// $pageNo = empty($params['pageNo']) ? 1 : $params['pageNo'];
// $pageSize = empty($params['pageSize']) ? 15 : $params['pageSize'];
// $s_look_Shop = new LookShopService();
// $field = 'a.type,a.create_time,b.buyer_nick,b.buyer_img,c.id as user_id';
// $conditions['a.source'] = 1;
// $conditions['a.house_id'] = $params['house_id'];
// $result = $s_look_Shop->getLookShopList($conditions,$field,$pageNo, $pageSize);
// if($result){
// return $this->response("200", "success", $result);
// }else{
// return $this->response("101", "暂无数据", []);
// }
// }
/**
* 客户浏览记录
* @return \think\Response
*/
public
function
getLookShopListV2
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$checkResult
=
$this
->
validate
(
$params
,
"UserLookShopValidate.getLookShopList"
);
$checkResult
=
$this
->
validate
(
$params
,
"UserLookShopValidate.getLookShopList"
);
...
@@ -175,10 +200,7 @@ class LookShop extends Basic
...
@@ -175,10 +200,7 @@ class LookShop 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'
];
$s_look_Shop
=
new
LookShopService
();
$s_look_Shop
=
new
LookShopService
();
$field
=
'a.type,a.create_time,b.buyer_nick,b.buyer_img,c.id as user_id'
;
$result
=
$s_look_Shop
->
getLookShopListV2
(
$params
,
$pageNo
,
$pageSize
);
$conditions
[
'a.source'
]
=
1
;
$conditions
[
'a.house_id'
]
=
$params
[
'house_id'
];
$result
=
$s_look_Shop
->
getLookShopList
(
$conditions
,
$field
,
$pageNo
,
$pageSize
);
if
(
$result
){
if
(
$result
){
return
$this
->
response
(
"200"
,
"success"
,
$result
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
else
{
}
else
{
...
...
application/api_broker/controller/Shop.php
View file @
17bd7f93
...
@@ -1359,7 +1359,7 @@ class Shop extends Basic
...
@@ -1359,7 +1359,7 @@ class Shop extends Basic
//t_look_shop_user
//t_look_shop_user
$lookShopUserModel
=
new
TLookShopUser
();
$lookShopUserModel
=
new
TLookShopUser
();
$where_
[
"house_id"
]
=
$params
[
"house_id"
];
$where_
[
"house_id"
]
=
$params
[
"house_id"
];
$where_
[
"source"
]
=
0
;
//
$where_["source"] = 0;
$logArr
=
$lookShopUserModel
->
getLogList
(
$where_
,
"id,user_id,type,house_id,create_time as look_day"
,
$pageNo
,
$pageSize
);
$logArr
=
$lookShopUserModel
->
getLogList
(
$where_
,
"id,user_id,type,house_id,create_time as look_day"
,
$pageNo
,
$pageSize
);
return
$this
->
response
(
"200"
,
"success"
,
$logArr
);
return
$this
->
response
(
"200"
,
"success"
,
$logArr
);
...
...
application/api_broker/service/LookShopService.php
View file @
17bd7f93
...
@@ -245,20 +245,49 @@ class LookShopService
...
@@ -245,20 +245,49 @@ class LookShopService
* @param $pageSize
* @param $pageSize
* @return bool
* @return bool
*/
*/
public
function
getLookShopList
(
$conditions
,
$field
,
$pageNo
,
$pageSize
)
// public function getLookShopList($conditions,$field,$pageNo, $pageSize)
// {
// $m_look_shop = new TLookShopUser();
// $list = $m_look_shop->getLookShopList($conditions, $field, $pageNo, $pageSize);
// if (!$list) {
// return false;
// }
// // $count = $m_look_shop->getLookShopListCount($conditions,$field);
// // $result["list"] = $list;
// // $result["total"] = $count;
// return $list;
// }
/**
* 客户浏览记录
* @param $conditions
* @param $pageNo
* @param $pageSize
* @return bool|false|\PDOStatement|string|\think\Collection
*/
public
function
getLookShopListV2
(
$conditions
,
$pageNo
,
$pageSize
)
{
{
$m_look_shop
=
new
TLookShopUser
();
$m_look_shop
=
new
TLookShopUser
();
$list
=
$m_look_shop
->
getLookShopList
(
$conditions
,
$field
,
$pageNo
,
$pageSize
);
$field
=
'a.type,a.user_id,a.create_time,a.source,b.buyer_nick,b.buyer_img,c.id'
;
$conditions_
[
'a.house_id'
]
=
$conditions
[
'house_id'
];
$list
=
$m_look_shop
->
getLookShopList
(
$conditions_
,
$field
,
$pageNo
,
$pageSize
);
if
(
!
$list
)
{
if
(
!
$list
)
{
return
false
;
return
false
;
}
}
// $count = $m_look_shop->getLookShopListCount($conditions,$field);
$u_user
=
new
Users
();
// $result["list"] = $list;
foreach
(
$list
as
$k
=>
$v
)
{
// $result["total"] = $count;
if
(
$v
[
'source'
]
==
0
){
$fields
=
"b.buyer_nick,b.buyer_img"
;
$result
=
$u_user
->
getUserInfoById
([
'user_id'
=>
$v
[
'user_id'
]],
$fields
);
$list
[
$k
][
'buyer_nick'
]
=
$result
[
'buyer_nick'
];
$list
[
$k
][
'buyer_img'
]
=
$result
[
'buyer_img'
];
}
else
{
$list
[
$k
][
'user_id'
]
=
$v
[
'id'
];
}
}
return
$list
;
return
$list
;
}
}
/**
/**
* 我的看铺记录
* 我的看铺记录
* @param $user_id
* @param $user_id
...
@@ -276,16 +305,12 @@ class LookShopService
...
@@ -276,16 +305,12 @@ class LookShopService
}
}
$field
=
'a.type,a.create_time,a.house_id'
;
$field
=
'a.type,a.create_time,a.house_id'
;
$conditions
[
'a.source'
]
=
1
;
$conditions
[
'a.user_id'
]
=
$result
[
0
][
"id"
];
$conditions
[
'a.user_id'
]
=
$result
[
0
][
"id"
];
$m_look_shop
=
new
TLookShopUser
();
$m_look_shop
=
new
TLookShopUser
();
$list
=
$m_look_shop
->
getLookShopList
(
$conditions
,
$field
,
$pageNo
,
$pageSize
);
$list
=
$m_look_shop
->
getLookShopList
(
$conditions
,
$field
,
$pageNo
,
$pageSize
);
if
(
!
$list
)
{
if
(
!
$list
)
{
return
false
;
return
false
;
}
}
// $count = $m_look_shop->getLookShopListCount($conditions,$field);
// $result["list"] = $list;
// $result["total"] = $count;
return
$list
;
return
$list
;
}
}
...
...
application/route.php
View file @
17bd7f93
...
@@ -942,7 +942,7 @@ Route::group('broker', [
...
@@ -942,7 +942,7 @@ Route::group('broker', [
'getAgentsResidueNumList'
=>
[
'api_broker/LookShop/getAgentsResidueNumList'
,
[
'method'
=>
'get'
]],
//经纪人列表
'getAgentsResidueNumList'
=>
[
'api_broker/LookShop/getAgentsResidueNumList'
,
[
'method'
=>
'get'
]],
//经纪人列表
'getAgentsResidueNumListV2'
=>
[
'api_broker/LookShop/getAgentsResidueNumListV2'
,
[
'method'
=>
'get'
]],
//经纪人列表
'getAgentsResidueNumListV2'
=>
[
'api_broker/LookShop/getAgentsResidueNumListV2'
,
[
'method'
=>
'get'
]],
//经纪人列表
'setAgentLookNum'
=>
[
'api_broker/LookShop/setAgentLookNum'
,
[
'method'
=>
'post'
]],
//设置经纪人的看铺数量
'setAgentLookNum'
=>
[
'api_broker/LookShop/setAgentLookNum'
,
[
'method'
=>
'post'
]],
//设置经纪人的看铺数量
'getLookShopList'
=>
[
'api_broker/LookShop/getLookShopList'
,
[
'method'
=>
'POST|GET'
]],
//设置经纪人的看铺数量
'getLookShopList'
=>
[
'api_broker/LookShop/getLookShopList
V2
'
,
[
'method'
=>
'POST|GET'
]],
//设置经纪人的看铺数量
'getShopLookList'
=>
[
'api_broker/LookShop/getShopLookList'
,
[
'method'
=>
'POST|GET'
]],
//设置经纪人的看铺数量
'getShopLookList'
=>
[
'api_broker/LookShop/getShopLookList'
,
[
'method'
=>
'POST|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