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
2d0864df
Commit
2d0864df
authored
Aug 30, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户的看铺记录
parent
622e4bf3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
0 deletions
+62
-0
LookShop.php
application/api_broker/controller/LookShop.php
+23
-0
LookShopService.php
application/api_broker/service/LookShopService.php
+32
-0
UserLookShopValidate.php
application/api_broker/validate/UserLookShopValidate.php
+6
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/LookShop.php
View file @
2d0864df
...
...
@@ -186,6 +186,28 @@ class LookShop extends Basic
}
}
/**
* 我的看铺记录
* @return \think\Response
*/
public
function
getShopLookList
()
{
$params
=
$this
->
params
;
$checkResult
=
$this
->
validate
(
$params
,
"UserLookShopValidate.getShopLookList"
);
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
();
$result
=
$s_look_Shop
->
getShopLookList
(
$params
[
'user_id'
],
$pageNo
,
$pageSize
);
if
(
$result
){
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
else
{
return
$this
->
response
(
"101"
,
"暂无数据"
,
[]);
}
}
}
\ No newline at end of file
application/api_broker/service/LookShopService.php
View file @
2d0864df
...
...
@@ -7,6 +7,7 @@ use app\model\AAgents;
use
app\model\GHousesToAgents
;
use
app\model\SystemConfig
;
use
app\model\TLookShopUser
;
use
app\model\Users
;
use
RedisException
;
use
think\Exception
;
use
think\Log
;
...
...
@@ -258,6 +259,37 @@ class LookShopService
}
/**
* 我的看铺记录
* @param $user_id
* @param $pageNo
* @param $pageSize
* @return bool|false|\PDOStatement|string|\think\Collection
*/
public
function
getShopLookList
(
$user_id
,
$pageNo
,
$pageSize
)
{
$m_user
=
new
Users
();
$fields
=
"b.id,b.buyer_nick"
;
$result
=
$m_user
->
getUserInfoById
([
'user_id'
=>
$user_id
],
$fields
);
if
(
!
$result
)
{
return
false
;
}
$field
=
'a.type,a.create_time,a.house_id'
;
$conditions
[
'a.source'
]
=
1
;
$conditions
[
'a.user_id'
]
=
$result
[
0
][
"id"
];
$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
;
}
...
...
application/api_broker/validate/UserLookShopValidate.php
View file @
2d0864df
...
...
@@ -15,15 +15,20 @@ class UserLookShopValidate extends Validate
{
protected
$rule
=
[
'house_id'
=>
'require|number|gt:0'
,
'user_id'
=>
'require|number|gt:0'
,
];
protected
$message
=
[
'house_id.require'
=>
'house_id必传字段'
,
'house_id.number'
=>
'house_id必须为数字'
,
'house_id.gt'
=>
'house_id必须大于0'
,
'user_id.require'
=>
'user_id必传字段'
,
'user_id.number'
=>
'user_id必须为数字'
,
'user_id.gt'
=>
'user_id必须大于0'
,
];
protected
$scene
=
[
'getLookShopList'
=>
[
'house_id'
],
'getShopLookList'
=>
[
'user_id'
],
];
}
\ No newline at end of file
application/route.php
View file @
2d0864df
...
...
@@ -935,6 +935,7 @@ Route::group('broker', [
'getAgentsResidueNumListV2'
=>
[
'api_broker/LookShop/getAgentsResidueNumListV2'
,
[
'method'
=>
'get'
]],
//经纪人列表
'setAgentLookNum'
=>
[
'api_broker/LookShop/setAgentLookNum'
,
[
'method'
=>
'post'
]],
//设置经纪人的看铺数量
'getLookShopList'
=>
[
'api_broker/LookShop/getLookShopList'
,
[
'method'
=>
'POST|GET'
]],
//设置经纪人的看铺数量
'getShopLookList'
=>
[
'api_broker/LookShop/getShopLookList'
,
[
'method'
=>
'POST|GET'
]],
//设置经纪人的看铺数量
//首页跟进记录
'userFollowUpList'
=>
[
'api_broker/HomePageLog/userFollowUpList'
,
[
'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