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
9cc293c1
Commit
9cc293c1
authored
Jul 24, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
selectPerformanceByTime
parent
33a88da5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
0 deletions
+64
-0
OrderLog.php
application/api_broker/controller/OrderLog.php
+46
-0
Performance.php
application/api_broker/controller/Performance.php
+1
-0
OrderModel.php
application/model/OrderModel.php
+16
-0
route.php
application/route.php
+1
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
9cc293c1
...
...
@@ -11,6 +11,7 @@ use app\extra\RedisExt;
use
app\model\AAgents
;
use
app\model\OBargainModel
;
use
app\model\OMarchInModel
;
use
app\model\OrderModel
;
use
app\model\ORefundModel
;
use
think\Exception
;
use
Think\Log
;
...
...
@@ -738,4 +739,48 @@ class OrderLog extends Basic
return
$this
->
response
(
"200"
,
"request null"
);
}
}
/**
* 商铺详情-带看记录
* User: 朱伟
* Date: 2018-07-24
* Time: 16:01:27
*/
public
function
getLook
()
{
$params
=
$this
->
params
;
//$params['house_id']=260;//
if
(
!
isset
(
$params
[
'house_id'
]))
{
return
$this
->
response
(
"300"
,
"参数不全"
);
}
//todo 该商铺7日带看次数
$model
=
new
OrderModel
();
$params
[
"house_id"
]
=
$params
[
'house_id'
];
$start_time
=
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$end_time
=
date
(
"Y-m-d"
,
time
());
$params
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$res_7
=
$model
->
getCountByHouseId
(
$params
);
//dump($params);
$return
[
'7'
]
=
$res_7
;
//todo 该商铺30日带看次数
$start_time
=
date
(
"Y-m-d"
,
strtotime
(
"-30 day"
));
$end_time
=
date
(
"Y-m-d"
,
time
());
$params
[
'create_time'
]
=
array
(
'between'
,
array
(
$start_time
.
" 00:00:00"
,
$end_time
.
" 23:59:59"
)
);
$res_30
=
$model
->
getCountByHouseId
(
$params
);
//dump($params);
$return
[
'30'
]
=
$res_30
;
return
$this
->
response
(
"200"
,
"success!"
,
$return
);
}
}
\ No newline at end of file
application/api_broker/controller/Performance.php
View file @
9cc293c1
...
...
@@ -52,6 +52,7 @@ class Performance extends Basic
$start_day
=
!
empty
(
$params
[
"start_day"
])
?
$params
[
"start_day"
]
:
date
(
"Y-m-01"
,
time
());
$list
=
$this
->
service_
->
totalAgent
(
$params
[
"agent_id"
],
$params
[
"type"
],
$end_day
,
$start_day
);
//dump($list);
if
(
count
(
$list
)
>
0
)
{
...
...
application/model/OrderModel.php
View file @
9cc293c1
...
...
@@ -242,4 +242,19 @@ class OrderModel extends Model
}
/**
* 获取7日30日次数
*/
public
function
getCountByHouseId
(
$params
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
"id"
)
->
where
(
$params
)
->
count
();
//echo Db::table($this->table)->getLastSql();
//dump($this->getLastSql());
return
$result
;
}
}
\ No newline at end of file
application/route.php
View file @
9cc293c1
...
...
@@ -397,6 +397,7 @@ Route::group('broker', [
'bargain'
=>
[
'api_broker/OrderLog/bargain'
,
[
'method'
=>
'get|post'
]
],
'statusBargain'
=>
[
'api_broker/OrderLog/statusBargain'
,
[
'method'
=>
'get|post'
]
],
'getIsAccountStatement'
=>
[
'api_broker/OrderLog/getIsAccountStatement'
,
[
'method'
=>
'get|post'
]
],
'getLook'
=>
[
'api_broker/OrderLog/getLook'
,
[
'method'
=>
'get|post'
]
],
'login'
=>
[
'api_broker/Broker/login'
,
[
'method'
=>
'post'
]
],
//经纪人登陆 废弃
'loginV2'
=>
[
'api_broker/Broker/loginV2'
,
[
'method'
=>
'post'
]
],
//经纪人登陆
...
...
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