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
e3e860dc
Commit
e3e860dc
authored
Jun 04, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户列表搜索
parent
86ee5458
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
1 deletion
+52
-1
Member.php
application/index/controller/Member.php
+35
-0
Users.php
application/model/Users.php
+17
-1
No files found.
application/index/controller/Member.php
View file @
e3e860dc
...
...
@@ -150,6 +150,41 @@ class Member extends Basic{
$type
=
2
;
}
//业态
if
(
!
empty
(
$params
[
'industry_type'
]))
{
$where
[
'a.industry_type'
]
=
$params
[
'industry_type'
];
}
//面积需求
if
(
!
empty
(
$params
[
'area_type'
]))
{
switch
(
$params
[
'area_type'
])
{
case
1
:
$where
[
'a.area_demand'
]
=
[
'<='
,
100
];
break
;
case
2
:
$where
[
'a.area_demand'
]
=
[
'between'
,
[
100
,
500
]];
break
;
default
:
$where
[
'a.area_demand'
]
=
[
'>'
,
500
];
}
}
//价格需求
if
(
!
empty
(
$params
[
'price_type'
]))
{
switch
(
$params
[
'price_type'
])
{
case
1
:
$where
[
'a.price_demand'
]
=
[
'<='
,
10000
];
break
;
case
2
:
$where
[
'a.price_demand'
]
=
[
'between'
,
[
10000
,
30000
]];
break
;
default
:
$where
[
'a.price_demand'
]
=
[
'>'
,
30000
];
}
}
if
(
!
empty
(
$params
[
'invite_agent_phone'
]))
{
$type
=
4
;
$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'];
...
...
application/model/Users.php
View file @
e3e860dc
...
...
@@ -95,6 +95,16 @@ class Users extends Model
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
elseif
(
$type
==
4
)
{
$result
=
$this
->
field
(
$fields
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.referrer_id = b.id'
,
'left'
)
->
where
(
$params
)
->
where
(
'a.referrer_source'
,
20
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
else
{
$result
=
$this
->
field
(
$fields
)
->
alias
(
'a'
)
->
where
(
$params
)
...
...
@@ -150,6 +160,12 @@ class Users extends Model
->
join
(
'a_agents b'
,
'a.agent_id = b.id'
,
'left'
)
->
where
(
$params
)
->
count
();
}
elseif
(
$type
==
4
)
{
$result
=
$this
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.referrer_id = b.id'
,
'left'
)
->
where
(
$params
)
->
where
(
'a.referrer_source'
,
20
)
->
select
();
}
else
{
$result
=
$this
->
alias
(
'a'
)
->
where
(
$params
)
...
...
@@ -308,7 +324,7 @@ class Users extends Model
public
function
useraction_search_user_res
(
$user_id
,
int
$referrer
=
0
)
{
$field
=
'id as user_id,agent_id,sex,user_nick,user_name,user_pic,user_status,user_phone,create_time,
referrer_source,referrer_id,registration_time'
;
referrer_source,referrer_id,registration_time
,industry_type
'
;
$data
=
db
(
'u_users'
)
->
where
(
'id'
,
$user_id
)
->
field
(
$field
)
...
...
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