...
|
...
|
@@ -29,7 +29,7 @@ class CoachPlanController extends RestBaseController |
|
|
$param = $this->request->param();
|
|
|
$where=[];
|
|
|
if (!empty($param['time'])) {
|
|
|
$where['c.start_time'] = [['>= time', $param['time']], ['<= time', strtotime('+1 month', $param['time'])]];
|
|
|
$where['c.start_time'] = [['>= time', intval($param['time'])], ['<= time', strtotime('+1 month', $param['time'])]];
|
|
|
} else {
|
|
|
$where['c.start_time'] = [['>= time', strtotime('+1 month', strtotime(date('Y-m', time())))], ['<= time', strtotime('+2 month', strtotime(date('Y-m', time())))]];
|
|
|
}
|
...
|
...
|
@@ -421,11 +421,11 @@ class CoachPlanController extends RestBaseController |
|
|
$coach=Db::name('coach')->where('user_id',$userId)->find();
|
|
|
$param = $this->request->param();
|
|
|
$where=[];
|
|
|
// if (!empty($param['time'])) {
|
|
|
// $where['c.start_time'] = [['>= time', $param['time']], ['<= time', strtotime('+1 month', $param['time'])]];
|
|
|
// } else {
|
|
|
// $where['c.start_time'] = [['>= time', strtotime('+1 month', strtotime(date('Y-m', time())))], ['<= time', strtotime('+2 month', strtotime(date('Y-m', time())))]];
|
|
|
// }
|
|
|
if (!empty($param['time'])) {
|
|
|
$where['c.start_time'] = [['>= time', intval($param['time'])], ['<= time', strtotime('+1 month', $param['time'])]];
|
|
|
} else {
|
|
|
$where['c.start_time'] = [['>= time', strtotime('+1 month', strtotime(date('Y-m', time())))], ['<= time', strtotime('+2 month', strtotime(date('Y-m', time())))]];
|
|
|
}
|
|
|
$data=Db::name('coach_class_apply')
|
|
|
->alias('cca')
|
|
|
->join('class c','cca.class_id=c.id')
|
...
|
...
|
|