Commit 15090e39 authored by clone's avatar clone

进场统计

parent 35fd3e82
......@@ -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
<?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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment