alias('BIGV') ->join('seller_base_info SBI', 'SBI.seller_id=BIGV.seller_id')->where($condition)->count(); $list = Db::name('seller_bigv_info')->alias('BIGV') ->join('seller_base_info SBI', 'SBI.seller_id=BIGV.seller_id') ->field("BIGV.*,SBI.first_name")->withAttr('personal_images', function($value) { return json_decode($value, true); })->where($condition)->order($order)->page($p, $other['page_size'])->select()->toArray(); $other['count'] = $count; if (!$list) { $list = []; } $result['code'] = 200; $result['list'] = $list; $result['other'] = $other; return $this->successResponse($result); } catch (\Exception $exc) { return $this->errorResponse($exc->getMessage()); } } function updateExt() { try { if (!Request::isPost()) { throw new Exception(lang('request_method_incorrect')); } $postField = 'id,is_show'; $data = Request::only(explode(',', $postField), 'post'); if (!$data['id']) { throw new Exception(lang('parameter_error')); } Db::name('seller_bigv_info')->update($data); $result['message'] = '操作成功'; return $this->successResponse($result); } catch (\Exception $exc) { return $this->errorResponse($exc->getMessage()); } } }