...
|
...
|
@@ -127,4 +127,40 @@ class VolunteerController extends AdminBaseController |
|
|
$this->success('操作成功!','');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public function daochu(){
|
|
|
$where=[];
|
|
|
$param = $this->request->param();
|
|
|
$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]];
|
|
|
} else {
|
|
|
if (!empty($startTime)) {
|
|
|
$where['create_time'] = ['>= time', $startTime];
|
|
|
}
|
|
|
if (!empty($endTime)) {
|
|
|
$where['create_time'] = ['<= time', $endTime];
|
|
|
}
|
|
|
}
|
|
|
$category = empty($param['category']) ? '' : $param['category'];
|
|
|
if (!empty($category)) {
|
|
|
$where['status'] = ['eq', "$category"];
|
|
|
}
|
|
|
$type = empty($param['type']) ? '' : $param['type'];
|
|
|
if (!empty($type)) {
|
|
|
$where['type'] = ['eq', "$type"];
|
|
|
}
|
|
|
$keyword = empty($param['keyword']) ? '' : $param['keyword'];
|
|
|
if (!empty($keyword)) {
|
|
|
$where['name|province|city|county|email|move_phone|fixed_phone|card_number|school|postcode|nation|politics|sex|urgency_phone|qq'] = ['like', "%$keyword%"];
|
|
|
}
|
|
|
$data=Db::name('volunteer')
|
|
|
->where('delete_time',0)
|
|
|
->where($where)
|
|
|
->order('create_time desc')
|
|
|
->select();
|
|
|
dump($data);
|
|
|
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|