|
@@ -286,8 +286,8 @@ class UserCenter extends Base
|
|
|
$where = [];
|
|
|
$where['user_id'] = $this->user_id;
|
|
|
if(isset($date_arr[0])) $where['year'] =$date_arr[0];
|
|
|
- if(isset($date_arr[1])) $where['year'] =$date_arr[1];
|
|
|
- if(isset($date_arr[2])) $where['year'] =$date_arr[2];
|
|
|
+ if(isset($date_arr[1])) $where['month'] =$date_arr[1];
|
|
|
+ if(isset($date_arr[2])) $where['day'] =$date_arr[2];
|
|
|
$list = UserVitality::field('type,count(id) num')->where($where)->group('type')->select()->toArray();
|
|
|
$this->success('ok',['list'=>$list]);
|
|
|
}
|
|
@@ -316,8 +316,8 @@ class UserCenter extends Base
|
|
|
$where = [];
|
|
|
$where['user_id'] = $this->user_id;
|
|
|
if(isset($date_arr[0])) $where['year'] =$date_arr[0];
|
|
|
- if(isset($date_arr[1])) $where['year'] =$date_arr[1];
|
|
|
- if(isset($date_arr[2])) $where['year'] =$date_arr[2];
|
|
|
+ if(isset($date_arr[1])) $where['month'] =$date_arr[1];
|
|
|
+ if(isset($date_arr[2])) $where['day'] =$date_arr[2];
|
|
|
$list = UserVitality::where($where)->order('id desc')->select()->toArray();
|
|
|
$this->success('ok',['list'=>$list]);
|
|
|
}
|