request->get(); $res=OrderLogic::cartIdByPurchaseOrderInfo($this->request->userInfo,$params); if($res==false){ return $this->fail(OrderLogic::getError()); } return $this->data($res); } /** * @notes 创建购货订单 */ public function createOrder(){ $params=$this->request->post(); $order=OrderLogic::createOpurchaseOrder(request()->userInfo,$params); if($order==false){ return $this->fail(OrderLogic::getError()); }else{ //推送队列 Redis::send('push-supplier-products', ['order_id'=>$order['id']]); return $this->success('支付成功'); } } }