Browse Source

显示订单

shish 6 năm trước cách đây
mục cha
commit
aa3bb76bf6

+ 7 - 4
app/business/controllers/OrderController.php

@@ -17,9 +17,12 @@ class OrderController extends BaseController
 	public function actionList()
 	public function actionList()
 	{
 	{
 		$get = Yii::$app->request->get();
 		$get = Yii::$app->request->get();
-		$status = isset($get['status']) ? $get['status'] : 0;
 		$search = isset($get['search']) ? $get['search'] : '';
 		$search = isset($get['search']) ? $get['search'] : '';
-		$where = ['merchantId' => $this->merchantId, 'status' => $status];
+		$where = [];
+		$where['merchantId'] = $this->merchantId;
+		if (isset($get['status']) && $get['status'] != -1) {
+			$where['status'] = $get['status'];
+		}
 		if (!empty($search)) {
 		if (!empty($search)) {
 			if (stringUtil::isMobile($search)) {
 			if (stringUtil::isMobile($search)) {
 				$where['receiveMobile'] = $search;
 				$where['receiveMobile'] = $search;
@@ -31,7 +34,7 @@ class OrderController extends BaseController
 		$list['asset'] = $this->merchantAsset;
 		$list['asset'] = $this->merchantAsset;
 		util::success($list);
 		util::success($list);
 	}
 	}
-	
+
 	//订单详情 shish 2019.12.16
 	//订单详情 shish 2019.12.16
 	public function actionDetail()
 	public function actionDetail()
 	{
 	{
@@ -132,5 +135,5 @@ class OrderController extends BaseController
 		OrderService::updateById($id, ['actPrice' => $price]);
 		OrderService::updateById($id, ['actPrice' => $price]);
 		util::ok('修改成功');
 		util::ok('修改成功');
 	}
 	}
-
+	
 }
 }