liugc 10 месяцев назад
Родитель
Сommit
767bfa18fd
1 измененных файлов с 48 добавлено и 20 удалено
  1. 48 20
      app/api/service/DouYinService.php

+ 48 - 20
app/api/service/DouYinService.php

@@ -227,6 +227,54 @@ class DouYinService
 
     // ******************************** 订单
 
+    /**
+     * 扩展点回调提交订单
+     * @param $params
+     * @return bool
+     * @throws \Exception
+     * @author liugc <466014217@qq.com>
+     * @date 2025/6/4 14:03
+     */
+    public static function submitOrderNotify($params)
+    {
+        Db::startTrans();
+        try {
+            // order_id goods  total_amount discount cp_extra create_order_time phone_num contact_name open_id
+
+            /*$params
+
+            "order_id": "614167279916",
+            "goods": [
+                {
+                    "img_url": "http://xxx",
+                    "title": "xxx",
+                    "sub_title": "xxx",
+                    "labels": "过期退|随时退",
+                    "date_rule": "xxx",
+                    "origin_price": 800,
+                    "price": 750,
+                    "quantity": 2,
+                    "poi_id": "",
+                    "goods_id": "xxx",
+                    "item_order_id_list": [
+                        "1xxx",
+                        "2xxx"
+                    ]
+                }
+            ],*/
+
+
+
+            Db::commit();
+            return true;
+        } catch (\Exception $e) {
+            Db::rollback();
+            throw new \Exception($e->getMessage());
+        }
+    }
+
+
+
     /**
      * 提交订单
      * @param array $params
@@ -643,26 +691,6 @@ class DouYinService
     }
 
 
-    /**
-     * 扩展点回调提交订单
-     * @param $params
-     * @return bool
-     * @throws \Exception
-     * @author liugc <466014217@qq.com>
-     * @date 2025/6/4 14:03
-     */
-    public static function submitOrderNotify($params)
-    {
-        Db::startTrans();
-        try {
-
-            Db::commit();
-            return true;
-        } catch (\Exception $e) {
-            Db::rollback();
-            throw new \Exception($e->getMessage());
-        }
-    }