...
|
...
|
@@ -78,23 +78,23 @@ class ActivityController extends AdminBaseController |
|
|
$param = $this->request->param();
|
|
|
$team_id=$this->getAdminTeamId();
|
|
|
if (!empty($team_id)){
|
|
|
$where['team_id']=$team_id;
|
|
|
$where['an.team_id']=$team_id;
|
|
|
}
|
|
|
$startTime = empty($param['start_time']) ? 0 : strtotime($param['start_time']);
|
|
|
$endTime = empty($param['end_time']) ? 0 : strtotime($param['end_time']);
|
|
|
if (!empty($startTime) && !empty($endTime)) {
|
|
|
$where['create_time'] = [['>= time', $startTime], ['<= time', $endTime]];
|
|
|
$where['an.create_time'] = [['>= time', $startTime], ['<= time', $endTime]];
|
|
|
} else {
|
|
|
if (!empty($startTime)) {
|
|
|
$where['create_time'] = ['>= time', $startTime];
|
|
|
$where['an.create_time'] = ['>= time', $startTime];
|
|
|
}
|
|
|
if (!empty($endTime)) {
|
|
|
$where['create_time'] = ['<= time', $endTime];
|
|
|
$where['an.create_time'] = ['<= time', $endTime];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (!empty($param['type'])){
|
|
|
$where['activity_type']=$param['type'];
|
|
|
$where['an.activity_type']=$param['type'];
|
|
|
$this->assign('type',$param['type']);
|
|
|
}else{
|
|
|
$this->assign('type','0');
|
...
|
...
|
@@ -103,9 +103,12 @@ class ActivityController extends AdminBaseController |
|
|
|
|
|
$keyword = empty($param['keyword']) ? '' : $param['keyword'];
|
|
|
if (!empty($keyword)) {
|
|
|
$where['activity_name|abstract'] = ['like', "%$keyword%"];
|
|
|
$where['an.activity_name|an.abstract'] = ['like', "%$keyword%"];
|
|
|
}
|
|
|
$data=Db::name('activity_news')
|
|
|
->alias('an')
|
|
|
->field('an.*,t.type_name')
|
|
|
->join('new_type t','an.activity_type=t.d')
|
|
|
->where('delete_time',0)
|
|
|
->where($where)
|
|
|
->order('weight desc')
|
...
|
...
|
@@ -856,4 +859,4 @@ class ActivityController extends AdminBaseController |
|
|
}*/
|
|
|
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
|
|
} |
...
|
...
|
|