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
0bd87f2f
Commit
0bd87f2f
authored
Jun 12, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页房源数据统计
parent
1e4276a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
22 deletions
+59
-22
HomePageLog.php
application/api_broker/controller/HomePageLog.php
+28
-22
GHousesFollowUp.php
application/model/GHousesFollowUp.php
+16
-0
UPhoneFollowPp.php
application/model/UPhoneFollowPp.php
+15
-0
No files found.
application/api_broker/controller/HomePageLog.php
View file @
0bd87f2f
...
...
@@ -37,14 +37,14 @@ class HomePageLog extends Basic
public
function
userFollowUpList
()
{
$params
=
$this
->
params
;
/* $params = array(
"start_time" => time(), //开始时间
"end_time" => time() . " 23:59:59", //结束时间
"name_or_phone" => "li",//用户姓名或电话 经纪人
"search_content" => "111",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
/* $params = array(
"start_time" => time(), //开始时间
"end_time" => time() . " 23:59:59", //结束时间
"name_or_phone" => "li",//用户姓名或电话 经纪人
"search_content" => "111",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
if
(
empty
(
$params
[
'start_time'
])
||
empty
(
$params
[
'end_time'
]))
{
return
$this
->
response
(
"101"
,
'请选择时间'
);
...
...
@@ -53,14 +53,14 @@ class HomePageLog extends Basic
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$field
=
"f.id,f.user_id,f.agent_id,f.type,f.content,f.create_time,f.user_status,a.name,a.img,b.store_name"
;
$field
=
"f.id,f.user_id,f.agent_id,f.type,f.content,f.create_time,f.user_status,a.name,a.img,b.store_name"
;
$where_
=
[];
if
(
!
empty
(
$params
[
"search_content"
]))
{
$where_
[
"f.content"
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'search_content'
])
.
"%"
);
}
if
(
!
empty
(
$params
[
"start_time"
])
&&
!
empty
(
$params
[
"end_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"
]);
$start_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"start_time"
]);
$end_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"end_time"
]);
$where_
[
"f.create_time"
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
}
if
(
!
empty
(
$params
[
"name_or_phone"
]))
{
...
...
@@ -74,9 +74,11 @@ class HomePageLog extends Basic
];
$order
=
"f.id desc"
;
$result
=
$this
->
uPhoneFollowUpModel
->
getSearch
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$join
,
$where_
,
""
);
$count
=
$this
->
uPhoneFollowUpModel
->
getSearchCount
(
$join
,
$where_
);
if
(
count
(
$result
)
>
0
)
{
$list
[
"result"
]
=
$result
;
$list
[
"img_path"
]
=
AGENTHEADERIMGURL
;
$list
[
"total"
]
=
$count
;
return
$this
->
response
(
"200"
,
"request success"
,
$list
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
...
...
@@ -95,20 +97,22 @@ class HomePageLog extends Basic
public
function
houseFollowUpList
()
{
$params
=
$this
->
params
;
/* $params = array(
"start_time" => time(), //开始时间
"end_time" => time() . " 23:59:59", //结束时间
"name_or_phone" => "li",//用户姓名或电话
"search_content" => "111",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
/* $params = array(
"start_time" => time(), //开始时间
"end_time" => time() . " 23:59:59", //结束时间
"name_or_phone" => "li",//用户姓名或电话
"search_content" => "111",// 搜索跟进内容
"pageNo" => 1,
"pageSize" => 15
);*/
if
(
empty
(
$params
[
'start_time'
])
||
empty
(
$params
[
'end_time'
]))
{
return
$this
->
response
(
"101"
,
'请选择时间'
);
}
$where_
=
[];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
...
...
@@ -118,8 +122,8 @@ class HomePageLog extends Basic
$where_
[
"f.follow_up_info"
]
=
array
(
"like"
,
"%"
.
trim
(
$params
[
'search_content'
])
.
"%"
);
}
if
(
!
empty
(
$params
[
"start_time"
])
&&
!
empty
(
$params
[
"end_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"
]);
$start_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"start_time"
]);
$end_time
=
date
(
"Y-m-d H:i:s"
,
$params
[
"end_time"
]);
$where_
[
"f.create_time"
]
=
array
(
'between'
,
array
(
$start_time
,
$end_time
)
);
}
if
(
!
empty
(
$params
[
"name_or_phone"
]))
{
...
...
@@ -132,9 +136,11 @@ class HomePageLog extends Basic
];
$order
=
"f.id desc"
;
$result
=
$this
->
gHouseFollowUpModel
->
getSearch
(
$pageNo
,
$pageSize
,
$order
,
$field
,
$join
,
$where_
,
""
);
$count
=
$this
->
gHouseFollowUpModel
->
getSearchCount
(
$join
,
$where_
);
if
(
count
(
$result
)
>
0
)
{
$list
[
"result"
]
=
$result
;
$list
[
"img_path"
]
=
AGENTHEADERIMGURL
;
$list
[
"total"
]
=
$count
;
return
$this
->
response
(
"200"
,
"request success"
,
$list
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
...
...
application/model/GHousesFollowUp.php
View file @
0bd87f2f
...
...
@@ -109,4 +109,19 @@ class GHousesFollowUp extends Model
// echo $this->getLastSql();
return
$data
;
}
/**
* 首页商铺跟进搜索
* @param $join
* @param $where
* @return int
*/
public
function
getSearchCount
(
$join
,
$where
)
{
$data
=
$this
->
db_
->
alias
(
'f'
)
->
join
(
$join
)
->
where
(
$where
)
->
count
();
return
$data
;
}
}
\ No newline at end of file
application/model/UPhoneFollowPp.php
View file @
0bd87f2f
...
...
@@ -65,6 +65,21 @@ class UPhoneFollowPp extends BaseModel
return
$data
;
}
/**
* @param $join
* @param $where
* @return int
*/
public
function
getSearchCount
(
$join
,
$where
)
{
$r
=
$this
->
alias
(
'f'
)
->
join
(
$join
)
->
where
(
$where
)
->
count
();
return
$r
;
}
public
function
getUserAgentTotal
(
$params
,
$join
)
{
...
...
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