Browse Source

获取明细

shish 1 year ago
parent
commit
3e3d8a0cfc
1 changed files with 18 additions and 0 deletions
  1. 18 0
      app-ghs/controllers/LiveOrderController.php

+ 18 - 0
app-ghs/controllers/LiveOrderController.php

@@ -3,6 +3,7 @@
 namespace ghs\controllers;
 
 use bizGhs\live\classes\LiveOrderClass;
+use bizGhs\live\classes\LiveOrderCustomClass;
 use bizGhs\product\classes\ProductClass;
 use common\components\dateUtil;
 use common\components\stringUtil;
@@ -103,4 +104,21 @@ class LiveOrderController extends BaseController
         }
     }
 
+    //获取明细 ssh 20241005
+    public function actionGetDetail()
+    {
+        $get = Yii::$app->request->get();
+        $id = $get['id']??0;
+        $live = LiveOrderClass::getById($id,true);
+        if(empty($live)){
+            util::fail('没有找到记录');
+        }
+        if($live->mainId != $this->mainId){
+            util::fail('不是你的记录');
+        }
+        $orderSn = $live->orderSn??'';
+        $customList = LiveOrderCustomClass::getAllByCondition(['orderSn'=>$orderSn],null,'*');
+        util::success(['customList'=>$customList,'info'=>$live]);
+    }
+
 }