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
114f801d
Commit
114f801d
authored
Aug 14, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户保护器判断
parent
01cda0d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
User.php
application/api_broker/controller/User.php
+9
-7
Users.php
application/model/Users.php
+1
-1
No files found.
application/api_broker/controller/User.php
View file @
114f801d
...
@@ -61,7 +61,7 @@ class User extends Basic
...
@@ -61,7 +61,7 @@ class User extends Basic
public
function
searchUser
()
public
function
searchUser
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*
$params = array(
/*
$params = array(
"user_status" => 0,//客户状态(0:求租;1:已租;-1:无效)
"user_status" => 0,//客户状态(0:求租;1:已租;-1:无效)
"yetai" => "休闲娱乐",
"yetai" => "休闲娱乐",
"area_start" => 1,//面积起始范围 room_area2
"area_start" => 1,//面积起始范围 room_area2
...
@@ -74,9 +74,9 @@ class User extends Basic
...
@@ -74,9 +74,9 @@ class User extends Basic
"user_name" => "12312",
"user_name" => "12312",
"user_phone" => "138171212",
"user_phone" => "138171212",
"pageNo" => 1,
"pageNo" => 1,
//
"agent_id" => 5741,//传经纪人id代表我得客户
"agent_id" => 5741,//传经纪人id代表我得客户
"pageSize" => 15,
"pageSize" => 15,
"status" =>
-1
,
"status" =>
0
,
);*/
);*/
$field
=
"id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip"
;
$field
=
"id as user_id,sex,user_name,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip"
;
...
@@ -131,9 +131,6 @@ class User extends Basic
...
@@ -131,9 +131,6 @@ class User extends Basic
$start_time
=
date
(
'Y-m-d H:i:s'
,
$params
[
'start_time'
]);
$start_time
=
date
(
'Y-m-d H:i:s'
,
$params
[
'start_time'
]);
$end_time
=
date
(
'Y-m-d H:i:s'
,
$params
[
'end_time'
]);
$end_time
=
date
(
'Y-m-d H:i:s'
,
$params
[
'end_time'
]);
$conditions
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
$conditions
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
}
else
if
(
empty
(
$params
[
"agent_id"
])
&&
empty
(
$params
[
"id"
])
&&
empty
(
$params
[
"user_phone"
]))
{
$time_
=
date
(
'Y-m-d H:i:s'
,
strtotime
(
"-1 day"
));
$conditions
[
'create_time'
]
=
array
(
'lt'
,
$time_
);
}
}
if
(
isset
(
$params
[
'status'
]))
{
if
(
isset
(
$params
[
'status'
]))
{
...
@@ -145,7 +142,6 @@ class User extends Basic
...
@@ -145,7 +142,6 @@ class User extends Basic
$conditions
[
'agent_id'
]
=
$params
[
'agent_id'
];
$conditions
[
'agent_id'
]
=
$params
[
'agent_id'
];
}
}
$userList
=
$this
->
userModel
->
selectUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
,
"id desc"
);
$userList
=
$this
->
userModel
->
selectUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
,
"id desc"
);
if
(
empty
(
$userList
))
{
if
(
empty
(
$userList
))
{
return
$this
->
response
(
"200"
,
"此条件没有找到数据"
);
return
$this
->
response
(
"200"
,
"此条件没有找到数据"
);
...
@@ -158,6 +154,12 @@ class User extends Basic
...
@@ -158,6 +154,12 @@ class User extends Basic
foreach
(
$userList
as
$k
=>
$v
)
{
foreach
(
$userList
as
$k
=>
$v
)
{
$is_show
=
$clientService
->
dialTotal
(
$v
[
"user_id"
]);
$is_show
=
$clientService
->
dialTotal
(
$v
[
"user_id"
]);
if
(
$is_show
)
{
if
(
$is_show
)
{
//判断客户是否超过24小时保护期间 0:保护器内 1:超过保护期
$is_outstrip_twenty_four_hours
=
0
;
if
((
time
()
-
strtotime
(
$v
[
'create_time'
]))
>
(
60
*
60
*
24
)){
$is_outstrip_twenty_four_hours
=
1
;
}
$v
[
'is_outstrip_twenty_four_hours'
]
=
$is_outstrip_twenty_four_hours
;
array_push
(
$list
,
$v
);
array_push
(
$list
,
$v
);
}
}
}
}
...
...
application/model/Users.php
View file @
114f801d
...
@@ -572,7 +572,7 @@ class Users extends Model
...
@@ -572,7 +572,7 @@ class Users extends Model
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
limit
(
$pageSize
)
->
limit
(
$pageSize
)
->
select
();
->
select
();
//
echo $this->getLastSql();
//echo $this->getLastSql();
return
$result
;
return
$result
;
}
}
...
...
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