From 49dcded9afe57b12eee0645f7f7cf5a97cf0584d Mon Sep 17 00:00:00 2001 From: lqmac Date: Fri, 3 Nov 2023 00:25:46 +0800 Subject: [PATCH] 1 --- application/api/controller/Order.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/application/api/controller/Order.php b/application/api/controller/Order.php index c58f7f8..71d9cab 100755 --- a/application/api/controller/Order.php +++ b/application/api/controller/Order.php @@ -251,15 +251,15 @@ class Order extends Api $user = $this->auth->getUserinfo(); $order = OrderModel::where('id', $id)->where('order_type',1)->where('status', 3)->where('user_id', "<>", $user['id'])->field("id,user_id,order_amount,pay_amount,warehouse_id")->find(); if (!$order) { - $this->error("售卖商品不存在"); + $this->error("商品已售罄"); } $detail = Detail::where('order_id', $order['id'])->find(); if (!$detail) { - $this->error("售卖商品不存在"); + $this->error("商品已售罄"); } $goods = Goods::where('id', $detail['goods_id'])->find(); if (!$goods) { - $this->error("售卖商品不存在"); + $this->error("商品已售罄"); } $warehouse = Warehouse::where('id', $order['warehouse_id'])->find(); $is_allow_access = $this->limitBuyNum($user, $warehouse); @@ -300,15 +300,15 @@ class Order extends Api //通过订单去找商品 $order = OrderModel::where('id', $seller_order_id)->where('order_type',1)->where('status', 3)->where('user_id', "<>", $user['id'])->field("id,user_id,order_amount,pay_amount,warehouse_id")->find(); if (!$order) { - $this->error("售卖商品不存在"); + $this->error("商品已售罄"); } $detail = Detail::where('order_id', $order['id'])->find(); if (!$detail) { - $this->error("售卖商品不存在"); + $this->error("商品已售罄"); } $goods = Goods::where('id', $detail['goods_id'])->where('status','normal')->find(); if (!$goods) { - $this->error("售卖商品不存在"); + $this->error("商品已售罄"); } $warehouse = Warehouse::where('id', $goods['warehouse_id'])->find();