From bc2b7f5c1dc7add991a1af1d3f7a23535f3311e5 Mon Sep 17 00:00:00 2001 From: liqianjin <949671634@qq.com> Date: Sat, 1 Apr 2023 18:06:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=912023/4/1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon/futures/api/controller/Futures.php | 42 +++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/addon/futures/api/controller/Futures.php b/addon/futures/api/controller/Futures.php index dfe49eca..1d977e40 100644 --- a/addon/futures/api/controller/Futures.php +++ b/addon/futures/api/controller/Futures.php @@ -3,6 +3,7 @@ namespace addon\futures\api\controller; use app\api\controller\BaseApi; use addon\futures\model\Futures as FuturesModel; +use app\model\system\Document; class Futures extends BaseApi{ /** @@ -93,7 +94,6 @@ class Futures extends BaseApi{ $search_text = input('search_text', ''); $condition = [ - ['a.seller_uid', '=', $this->member_id], ['a.site_id','=',$this->site_id] ]; if($search_text != ''){ @@ -101,6 +101,36 @@ class Futures extends BaseApi{ } switch($status){ + case '待付款订单': + $condition[] = ['a.seller_uid', '=', $this->member_id]; + $condition[] = ['a.status', 'in', [2, 6, 7]]; + $condition[] = ['a.release_time', '<=', time()]; + break; + case '商城已完成': + $condition[] = ['a.seller_uid', '=', $this->member_id]; + $condition[] = ['a.status', '=', '3']; + break; + case '采购未付款': + $condition[] = ['a.member_id', '=', $this->member_id]; + $condition[] = ['a.status', '=', '6']; + break; + case '成功完成订单': + $condition[] = ['a.member_id', '=', $this->member_id]; + $condition[] = ['a.status', '=', '3']; + break; + case '库存订单': + $condition[] = ['a.seller_uid', '=', $this->member_id]; + $condition[] = ['a.status', '=', '1']; + break; + case '提货订单': + $condition[] = ['a.seller_uid', '=', $this->member_id]; + $condition[] = ['a.status', 'in', ['4','5']]; + break; + case '审核出售': + $condition[] = ['a.seller_uid', '=', $this->member_id]; + $condition[] = ['a.status', '=', 2]; + $condition[] = ['a.release_time', '>', time()]; + break; case 'stock': $condition[] = ['a.status', '=', '1']; break; @@ -268,6 +298,16 @@ class Futures extends BaseApi{ return $this->response($detail); } + /** + * 协议 + */ + public function aggrement() + { + $document = new Document(); + $info = $document->getDocument([['site_id', '=', $this->site_id], ['app_module', '=', 'shop'], ['document_key', '=', 'FUTURES_AGREEMENT']]); + return $this->response($info); + } + // public function testBuyBack(){ // return $this->response(event('BuyBack')); // }