From 693cb1e15827cdf09eb402fba1bb2457e0d3a83a Mon Sep 17 00:00:00 2001 From: zengyyh Date: Sat, 26 Oct 2024 16:04:19 +0800 Subject: [PATCH] 123 --- app/store/controller/Order.php | 11 +++++++++++ app/store/controller/Store.php | 21 +++++++++++++++++++++ app/store/model/Order.php | 3 ++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/app/store/controller/Order.php b/app/store/controller/Order.php index 93f05441..706c3932 100644 --- a/app/store/controller/Order.php +++ b/app/store/controller/Order.php @@ -408,4 +408,15 @@ class Order extends Controller return $this->renderSuccess('修改成功'); } + + public function disputeStatus(int $orderId) + { + $params = $this->postForm(); + $result = OrderModel::where('order_id',$orderId)->update(['dispute_status'=>$params['disputeStatus']]); + if ($result) { + return $this->renderSuccess('更新成功'); + } else { + return $this->renderError('更新失败'); + } + } } diff --git a/app/store/controller/Store.php b/app/store/controller/Store.php index 29c60f5a..f3639397 100644 --- a/app/store/controller/Store.php +++ b/app/store/controller/Store.php @@ -215,5 +215,26 @@ class Store extends Controller $list = $model->getList($this->request->param()); return $this->renderSuccess(compact('list')); } + + //备注 + public function openShopRemark(int $id) + { + + $remark = $this->postForm(); + if (empty($remark)) { + return $this->renderSuccess("备注不能为空"); + } + + // 更新备注 + $result = OpenShop::where('id', $id)->update(['remark' => $remark['remark']]); + + // 检查更新结果 + if (!$result) { + return $this->renderSuccess("操作失败"); + } + + return $this->renderSuccess("添加备注成功"); + + } } diff --git a/app/store/model/Order.php b/app/store/model/Order.php index 870819f8..551bd4b9 100644 --- a/app/store/model/Order.php +++ b/app/store/model/Order.php @@ -312,6 +312,7 @@ class Order extends OrderModel 'extractShopId' => 0, // 自提门店ID 'betweenTime' => [], // 起止时间 'userId' => 0, // 会员ID + 'disputeStatus' => 10 //10正常状态 20纠纷订单 ]); // 检索查询条件 $filter = []; @@ -348,7 +349,7 @@ class Order extends OrderModel $params['extractShopId'] > 0 && $filter[] = ['extract_shop_id', '=', (int)$params['extractShopId']]; // 会员ID $params['userId'] > 0 && $filter[] = ['order.user_id', '=', (int)$params['userId']]; - + $params['disputeStatus'] > 10 && $filter[] = ['dispute_status', '=', $params['disputeStatus']]; //gj if (isset($param['merchantId']) && $param['merchantId']) { $filter[] = ['merchant_id', '=', $param['merchantId']];