$filter = json_decode($this->request->get("filter"),true) ; // json串转为数组
$filter['refund_status'] = 2;
$filter = json_encode($filter,JSON_UNESCAPED_UNICODE);
$this->request->get(["filter" => $filter]);
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$list = $this->model
->with(['user', 'activity','school'])
->where($where)
->order($sort, $order)
->paginate($limit)->each(function ($item, $key) {
if ($item['info']) {
$map = json_decode($item['info'],true);
$item['info'] = "套餐:{$map['name']} 价格:{$map['price']}元 可用人数:{$map['people_count']}人";
}
if ($item['signtime']) {
$item['signtime'] = date('Y-m-d H:i:s',$item['signtime']);
}
}); |
$filter = json_decode($this->request->get("filter"),true) ; // json串转为数组
$filter['refund_status'] = 2;
$filter = json_encode($filter,JSON_UNESCAPED_UNICODE);
$this->request->get(["filter" => $filter]);
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$list = $this->model
->with(['user', 'activity','school'])
->where($where)
->order($sort, $order)
->paginate($limit)->each(function ($item, $key) {
if ($item['info']) {
$map = json_decode($item['info'],true);
$item['info'] = "套餐:{$map['name']} 价格:{$map['price']}元 可用人数:{$map['people_count']}人";
}
if ($item['signtime']) {
$item['signtime'] = date('Y-m-d H:i:s',$item['signtime']);
}
});