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
15090e39
Commit
15090e39
authored
Jul 27, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
进场统计
parent
35fd3e82
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
4 deletions
+46
-4
OrderLog.php
application/api_broker/controller/OrderLog.php
+16
-4
OrderLogValidate.php
application/api_broker/validate/OrderLogValidate.php
+30
-0
No files found.
application/api_broker/controller/OrderLog.php
View file @
15090e39
...
...
@@ -752,11 +752,11 @@ class OrderLog extends Basic
$params
=
$this
->
params
;
//$params['house_id']=260;
//
//$params['house_id']=260;
if
(
!
isset
(
$params
[
'house_id'
]))
{
return
$this
->
response
(
"
300
"
,
"参数不全"
);
return
$this
->
response
(
"
101
"
,
"参数不全"
);
}
//todo 该商铺7日带看次数
...
...
@@ -768,7 +768,7 @@ class OrderLog extends Basic
$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
;
$return
[
'
week
'
]
=
$res_7
;
//todo 该商铺30日带看次数
...
...
@@ -778,9 +778,20 @@ class OrderLog extends Basic
$res_30
=
$model
->
getCountByHouseId
(
$params
);
//dump($params);
$return
[
'
30
'
]
=
$res_30
;
$return
[
'
month
'
]
=
$res_30
;
return
$this
->
response
(
"200"
,
"success!"
,
$return
);
}
public
function
getMarchInList
(){
$params
=
$this
->
params
;
$params
=
array
(
"house_id"
=>
260
);
$checkResult
=
$this
->
validate
(
$params
,
"OrderLogValidate.getMarchInList"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
}
}
}
\ No newline at end of file
application/api_broker/validate/OrderLogValidate.php
0 → 100644
View file @
15090e39
<?php
namespace
app\api_broker\validate
;
use
think\Validate
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/7/27
* Time : 10:01
* Intro:
*/
class
OrderLogValidate
extends
Validate
{
protected
$rule
=
[
'house_id'
=>
'require|number|gt:0'
,
];
protected
$message
=
[
'house_id.require'
=>
'楼盘id为必填字段'
,
'house_id.number'
=>
'楼盘id只能为数字'
,
'house_id.gt'
=>
'楼盘id必须大于0'
,
];
protected
$scene
=
[
'getMarchInList'
=>
[
'house_id'
],
];
}
\ No newline at end of file
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