From f4d788087feabb405e7697abc6948226f766fdd2 Mon Sep 17 00:00:00 2001 From: liqianjin <949671634@qq.com> Date: Mon, 3 Apr 2023 09:13:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=912023/4/?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon/futures/api/controller/Futures.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addon/futures/api/controller/Futures.php b/addon/futures/api/controller/Futures.php index 1d977e40..88cbde81 100644 --- a/addon/futures/api/controller/Futures.php +++ b/addon/futures/api/controller/Futures.php @@ -132,12 +132,15 @@ class Futures extends BaseApi{ $condition[] = ['a.release_time', '>', time()]; break; case 'stock': + $condition[] = ['a.seller_uid', '=', $this->member_id]; $condition[] = ['a.status', '=', '1']; break; case 'release': + $condition[] = ['a.seller_uid', '=', $this->member_id]; $condition[] = ['a.status', 'in', [2, 6, 7]]; break; case 'sold': + $condition[] = ['a.seller_uid', '=', $this->member_id]; $condition[] = ['a.status', '=', '3']; break; default: From 3eb8bcb6ce1efd81f3f33248ae9ed75f596ffbbc Mon Sep 17 00:00:00 2001 From: liqianjin <949671634@qq.com> Date: Mon, 3 Apr 2023 09:31:44 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=912023/4/?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon/futures/api/controller/Futures.php | 4 ++-- addon/futures/model/Futures.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addon/futures/api/controller/Futures.php b/addon/futures/api/controller/Futures.php index 88cbde81..7848100c 100644 --- a/addon/futures/api/controller/Futures.php +++ b/addon/futures/api/controller/Futures.php @@ -128,7 +128,7 @@ class Futures extends BaseApi{ break; case '审核出售': $condition[] = ['a.seller_uid', '=', $this->member_id]; - $condition[] = ['a.status', '=', 2]; + $condition[] = ['a.status', 'in', [2, 6]]; $condition[] = ['a.release_time', '>', time()]; break; case 'stock': @@ -295,7 +295,7 @@ class Futures extends BaseApi{ $futuresModel = new FuturesModel; $detail = $futuresModel->detail($id, $this->site_id); - if($detail['code'] < 0 || empty($detail['data']) || $detail['data']['seller_uid'] != $this->member_id){ + if($detail['code'] < 0 || empty($detail['data']) || !($detail['data']['seller_uid'] == $this->member_id || $detail['data']['member_id'] == $this->member_id)){ return $this->response($this->error('','订单不存在')); } return $this->response($detail); diff --git a/addon/futures/model/Futures.php b/addon/futures/model/Futures.php index 67687708..c8c95a6f 100644 --- a/addon/futures/model/Futures.php +++ b/addon/futures/model/Futures.php @@ -54,6 +54,7 @@ class Futures extends BaseModel{ 'a.real_income', 'a.site_id', 'a.seller_uid', + 'a.member_id', 'a.goods_id', 'a.id', 'a.total',