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
fefc3ab1
Commit
fefc3ab1
authored
Nov 01, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户列表与商品列表站点控制
parent
3b8d0196
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
6 deletions
+29
-6
Houses.php
application/index/controller/Houses.php
+10
-4
Member.php
application/index/controller/Member.php
+19
-2
No files found.
application/index/controller/Houses.php
View file @
fefc3ab1
...
...
@@ -11,6 +11,7 @@ namespace app\index\controller;
use
app\api_broker\service\LookShopService
;
use
app\index\extend\Basic
;
use
app\index\service\BrokerService
;
use
app\index\service\HouseService
;
use
app\index\validate\HouseValidate
;
use
app\model\AAgents
;
...
...
@@ -235,10 +236,6 @@ class Houses extends Basic
$where
[
'shop_type'
]
=
$this
->
params
[
'shop_type'
];
}
if
(
$this
->
userId
!=
1
)
{
$where
[
'city'
]
=
$this
->
city
;
}
/*所在区*/
if
(
!
empty
(
$this
->
params
[
'disc'
]))
{
$where
[
'disc'
]
=
$this
->
params
[
'disc'
];
...
...
@@ -415,6 +412,15 @@ class Houses extends Basic
$where
[
'is_lock'
]
=
$this
->
params
[
'is_lock'
];
}
$service_broker
=
new
BrokerService
();
$check_data
=
$service_broker
->
checkSite
(
$this
->
userId
);
if
(
$check_data
)
{
if
(
$check_data
[
'city'
]
!=
'all'
)
{
$where
[
'city'
]
=
[
'in'
,
$check_data
[
'city'
]];
}
}
else
{
$where
[
'city'
]
=
$this
->
city
;
}
$list
=
$this
->
house
->
getHouseListDish
(
$pageNo
,
$pageSize
,
'id DESC'
,
$fields
,
$where
,
$this
->
userId
);
$data
[
'data'
][
'total'
]
=
$this
->
house
->
getHouseListTotal
(
$where
);
...
...
application/index/controller/Member.php
View file @
fefc3ab1
...
...
@@ -6,6 +6,7 @@ use app\api_broker\service\ClientService;
use
app\api_broker\service\VipService
;
use
app\extra\RedisExt
;
use
app\index\extend\Basic
;
use
app\index\service\BrokerService
;
use
app\index\service\UserService
;
use
app\model\AAgents
;
use
app\model\ACollectUser
;
...
...
@@ -291,7 +292,23 @@ class Member extends Basic{
if
(
$if_search_user
)
{
#if_search_user 存在精确搜索客户姓名,电话,编号 则变成 false
$where
[
'a.site_ids'
]
=
[
'LIKE'
,
'%'
.
$this
->
siteId
.
'%'
];
//默认显示经纪人所在站点的客户
// $where['a.site_ids'] = [ 'LIKE', '%' . $this->siteId . '%' ];//默认显示经纪人所在站点的客户
$service_broker
=
new
BrokerService
();
$check_data
=
$service_broker
->
checkSite
(
$this
->
userId
);
if
(
$check_data
)
{
if
(
$check_data
[
'site_id'
]
!=
'all'
)
{
if
(
!
empty
(
$check_data
[
'site_id'
]))
{
$site_id
=
explode
(
','
,
$check_data
[
'site_id'
]);
foreach
(
$site_id
as
$k
=>
$v
)
{
$site_id
[
$k
]
=
intval
(
$v
);
//转为整型
}
$where
[
'a.site_ids'
]
=
[
'in'
,
$site_id
];
}
}
}
else
{
$where
[
'a.site_ids'
]
=
[
'LIKE'
,
'%'
.
$this
->
siteId
.
'%'
];
}
}
$fields
=
'a.id,a.user_nick,a.create_time,a.user_name,a.user_phone,a.user_pic,a.create_time,a.user_pswd,a.referrer_id,a.user_label,
...
...
@@ -364,7 +381,7 @@ class Member extends Basic{
}
catch
(
\Exception
$e
)
{
return
$this
->
response
(
101
,
'内部错误,获取客户失败!请联系运营。'
);
return
$this
->
response
(
101
,
'内部错误,获取客户失败!请联系运营。'
.
$e
->
getMessage
()
);
}
$return
=
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
...
...
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