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
0d9f8eaa
Commit
0d9f8eaa
authored
Sep 18, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
dfd4efc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
21 deletions
+25
-21
ClinchMap.php
application/index/controller/ClinchMap.php
+25
-21
No files found.
application/index/controller/ClinchMap.php
View file @
0d9f8eaa
...
@@ -48,7 +48,7 @@ class ClinchMap extends Basic
...
@@ -48,7 +48,7 @@ class ClinchMap extends Basic
{
{
header
(
'Access-Control-Allow-Origin:*'
);
header
(
'Access-Control-Allow-Origin:*'
);
//成交数
//成交数
$result
[
'bargain_num'
]
=
$this
->
get
CityBargainInfo
();
$result
[
'bargain_num'
]
=
$this
->
get
ShopBargainNum
();
//城市 当月成交 总成交
//城市 当月成交 总成交
$result
[
'city_bargain_info'
]
=
$this
->
getCityBargainInfo
();
$result
[
'city_bargain_info'
]
=
$this
->
getCityBargainInfo
();
...
@@ -153,16 +153,18 @@ class ClinchMap extends Basic
...
@@ -153,16 +153,18 @@ class ClinchMap extends Basic
*/
*/
public
function
getPerformanceInfo
()
public
function
getPerformanceInfo
()
{
{
$time_arr
=
[
date
(
'Y-m'
,
strtotime
(
'-1 month'
))
=>
[
'type'
=>
'1'
],
$time_arr
=
[
date
(
'Y-m'
,
strtotime
(
'-2 month'
))
=>
[
'type'
=>
'2'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-1 month'
)),
'type'
=>
1
],
date
(
'Y-m'
,
strtotime
(
'-3 month'
))
=>
[
'type'
=>
'3'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-2 month'
)),
'type'
=>
2
],
date
(
'Y-m'
,
strtotime
(
'-4 month'
))
=>
[
'type'
=>
'4'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-3 month'
)),
'type'
=>
3
],
date
(
'Y-m'
,
strtotime
(
'-5 month'
))
=>
[
'type'
=>
'5'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-4 month'
)),
'type'
=>
4
],
date
(
'Y-m'
,
strtotime
(
'-6 month'
))
=>
[
'type'
=>
'6'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-5 month'
)),
'type'
=>
5
],
date
(
'Y-m'
,
strtotime
(
'-7 month'
))
=>
[
'type'
=>
'7'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-6 month'
)),
'type'
=>
6
],
date
(
'Y-m'
,
strtotime
(
'-8 month'
))
=>
[
'type'
=>
'8'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-7 month'
)),
'type'
=>
7
],
date
(
'Y-m'
,
strtotime
(
'-9 month'
))
=>
[
'type'
=>
'9'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-8 month'
)),
'type'
=>
8
],
date
(
'Y-m'
,
strtotime
(
'-10 month'
))
=>
[
'type'
=>
'10'
]];
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-9 month'
)),
'type'
=>
9
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-10 month'
)),
'type'
=>
10
],
];
foreach
(
$time_arr
as
$key
=>
$v
)
{
foreach
(
$time_arr
as
$key
=>
$v
)
{
$start_time
=
date
(
'Y-m-d'
,
strtotime
(
date
(
'Y-m-01'
)
.
"-
{
$v
[
'type'
]
}
month"
));
// 计算出本月第一天再减一个月
$start_time
=
date
(
'Y-m-d'
,
strtotime
(
date
(
'Y-m-01'
)
.
"-
{
$v
[
'type'
]
}
month"
));
// 计算出本月第一天再减一个月
$last_num
=
$v
[
'type'
]
-
1
;
$last_num
=
$v
[
'type'
]
-
1
;
...
@@ -187,16 +189,18 @@ class ClinchMap extends Basic
...
@@ -187,16 +189,18 @@ class ClinchMap extends Basic
*/
*/
public
function
getUserInfo
()
public
function
getUserInfo
()
{
{
$time_arr
=
[
date
(
'Y-m'
,
strtotime
(
'-1 month'
))
=>
[
'type'
=>
'1'
],
$time_arr
=
[
date
(
'Y-m'
,
strtotime
(
'-2 month'
))
=>
[
'type'
=>
'2'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-1 month'
)),
'type'
=>
1
],
date
(
'Y-m'
,
strtotime
(
'-3 month'
))
=>
[
'type'
=>
'3'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-2 month'
)),
'type'
=>
2
],
date
(
'Y-m'
,
strtotime
(
'-4 month'
))
=>
[
'type'
=>
'4'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-3 month'
)),
'type'
=>
3
],
date
(
'Y-m'
,
strtotime
(
'-5 month'
))
=>
[
'type'
=>
'5'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-4 month'
)),
'type'
=>
4
],
date
(
'Y-m'
,
strtotime
(
'-6 month'
))
=>
[
'type'
=>
'6'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-5 month'
)),
'type'
=>
5
],
date
(
'Y-m'
,
strtotime
(
'-7 month'
))
=>
[
'type'
=>
'7'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-6 month'
)),
'type'
=>
6
],
date
(
'Y-m'
,
strtotime
(
'-8 month'
))
=>
[
'type'
=>
'8'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-7 month'
)),
'type'
=>
7
],
date
(
'Y-m'
,
strtotime
(
'-9 month'
))
=>
[
'type'
=>
'9'
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-8 month'
)),
'type'
=>
8
],
date
(
'Y-m'
,
strtotime
(
'-10 month'
))
=>
[
'type'
=>
'10'
]];
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-9 month'
)),
'type'
=>
9
],
[
'time'
=>
date
(
'Y-m'
,
strtotime
(
'-10 month'
)),
'type'
=>
10
],
];
$redis
=
RedisExt
::
getRedis
();
$redis
=
RedisExt
::
getRedis
();
foreach
(
$time_arr
as
$key
=>
$v
)
{
foreach
(
$time_arr
as
$key
=>
$v
)
{
if
(
!
$redis
->
get
(
$this
->
redis_user_prefix
.
$key
))
{
if
(
!
$redis
->
get
(
$this
->
redis_user_prefix
.
$key
))
{
...
...
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