* @date 2020/7/16 17:59 * * @return mixed * @throws \Lettered\Support\Exceptions\FailedException * @throws \think\exception\DbException */ public function index() { $where = []; //组合搜索 !empty(input('name')) && $where[] = ['name', 'like', '%' . input('name') . '%']; $order = model('common/GoodsOrder'); // TODO 商家要依据自己的ID查询 return IResponse::paginate($order->where($where) ->where(['seller_id' => $this->seller->id]) ->with(['user','addr']) ->paginate(input('limit'),false)); } public function getOrderDetailById($id){ (new IDMustBePositiveInt())->valid(); // $order = model('common/GoodsOrderDetail'); // TODO 商家要依据自己的ID查询 return IResponse::paginate($order ->where(['order_id' => $id]) ->order(['created_at' => 'desc']) ->paginate(input('limit'),false)); } /** * * @author 许祖兴 < zuxing.xu@lettered.cn> * @date 2020/9/20 17:09 * * @return mixed * @throws \Lettered\Support\Exceptions\FailedException * @throws \think\exception\DbException */ public function getOrderService(){ $service = model('common/GoodsOrderService'); // TODO 商家要依据自己的ID查询 return IResponse::paginate($service->where(['seller_id' => $this->seller->id]) ->order(['created_at' => 'desc']) ->paginate(input('limit'),false)); } }