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
1155b989
Commit
1155b989
authored
Oct 27, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc后台客户列表搜索BUG
parent
28e3c419
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
39 deletions
+20
-39
Member.php
application/index/controller/Member.php
+20
-39
No files found.
application/index/controller/Member.php
View file @
1155b989
...
...
@@ -59,7 +59,7 @@ class Member extends Basic{
$where
=
[];
$type
=
0
;
$if_search_user
=
fals
e
;
$if_search_user
=
tru
e
;
//客方ID
$can_vip
=
true
;
...
...
@@ -79,11 +79,7 @@ class Member extends Basic{
$where
[
'a.status'
]
=
[
'<>'
,
1
];
}
if
(
!
empty
(
$params
[
'user_nick'
]))
{
$if_search_user
=
true
;
//$where[0] = ['EXP','a.user_phone LIKE "%'.$this->params['phone'].'%" or a.user_nick LIKE "%'.$this->params['phone'].'%"'];
$where
[
'a.user_name'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_nick'
]
.
'%'
];
}
//是否公客
if
(
!
empty
(
$params
[
'public_user'
])
&&
$params
[
'public_user'
]
!=
-
1
)
{
...
...
@@ -122,9 +118,7 @@ class Member extends Basic{
}
}
}
if
(
$can_vip
)
{
$where
[
'a.site_ids'
]
=
[
'LIKE'
,
'%'
.
$this
->
siteId
.
'%'
];
//默认显示经纪人所在站点的客户
}
//是否登录过
if
(
!
empty
(
$params
[
'login_status'
])
&&
$params
[
'login_status'
]
!=
-
1
)
{
if
(
$params
[
'login_status'
]
==
1
)
{
...
...
@@ -190,22 +184,6 @@ class Member extends Basic{
$where
[
'b.phone'
]
=
$params
[
'invite_agent_phone'
];
}
/* //最后登录开始时间
if (!empty($params['login_time_start']) && empty($params['login_time_end'])) {
$where['a.last_login_time'] = ['> time',$params['last_login_time']. ' 00:00:00'];
}
//最后登录结束时间
if (!empty($params['login_time_end']) && empty($params['login_time_start'])) {
$where['a.last_login_time'] = ['< time',$params['login_time_end']. ' 23:59:59'];
}
//最后登录时间
if (!empty($params['login_time_end']) && !empty($params['login_time_start'])) {
$where['a.last_login_time'] = ['between time', [$params['login_time_start']. ' 00:00:00', $params['login_time_end']. ' 23:59:59']];
}*/
//客方门店
if
(
!
empty
(
$params
[
'store_id'
])
&&
empty
(
$params
[
'referrer_store_id'
]))
{
$where
[
'b.store_id'
]
=
$params
[
'store_id'
];
...
...
@@ -244,8 +222,6 @@ class Member extends Basic{
}
if
(
!
empty
(
$params
[
'first_login_start'
]))
{
$where
[
'a.first_login_time'
]
=
$params
[
'first_login_start'
]
.
' 00:00:00'
;
}
...
...
@@ -268,13 +244,6 @@ class Member extends Basic{
}
}
// if (!empty($params['province'])) {
// $where['a.province'] = $params['province'];
// }
// if ($this->city != '全部') {
// $where['a.city'] = $params['city'];
// }
if
(
!
empty
(
$params
[
'disc'
]))
{
$where
[
'a.disc'
]
=
$params
[
'disc'
];
...
...
@@ -282,23 +251,29 @@ class Member extends Basic{
//客户编号
if
(
!
empty
(
$params
[
'id'
]))
{
$if_search_user
=
tru
e
;
$if_search_user
=
fals
e
;
$where
[
'a.id'
]
=
$params
[
'id'
];
unset
(
$where
[
'a.create_time'
]);
}
//客户姓名
if
(
!
empty
(
$params
[
'user_nick'
]))
{
$if_search_user
=
false
;
$where
[
'a.user_name'
]
=
[
'LIKE'
,
'%'
.
$params
[
'user_nick'
]
.
'%'
];
unset
(
$where
[
'a.create_time'
]);
}
//客户手机号
if
(
!
empty
(
$params
[
'phone'
]))
{
$if_search_user
=
tru
e
;
$where
[
'a.user_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'phone'
]
.
'%'
];
$if_search_user
=
fals
e
;
$where
[
'a.user_phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'phone'
]
.
'%'
];
if
(
strlen
(
$params
[
'phone'
])
==
11
)
{
unset
(
$where
[
'a.create_time'
]);
}
}
//是否转介绍搜索 0否 1是
//`referrer_source` 引荐人来源 10:会员
//是否转介绍搜索 0否 1是 `referrer_source` 引荐人来源 10:会员
if
(
!
empty
(
$params
[
'is_referrer_source_user'
])
&&
$params
[
'is_referrer_source_user'
]
==
1
)
{
$where
[
'a.referrer_source'
]
=
10
;
}
...
...
@@ -313,6 +288,12 @@ class Member extends Basic{
}
}
if
(
$if_search_user
)
{
#if_search_user 存在精确搜索客户姓名,电话,编号 则变成 false
$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,
a.user_name,a.status,a.first_login_time,a.last_login_time,a.agent_id,a.vip,a.price_demand,a.industry_type,a.area_demand,a.user_status,a.source'
;
...
...
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