Browse Source

'0826-c01'

zory 3 weeks ago
parent
commit
3bf695c658
2 changed files with 4 additions and 4 deletions
  1. 2 2
      app/controller/api/Solution.php
  2. 2 2
      app/controller/merchant/Order.php

+ 2 - 2
app/controller/api/Solution.php

@@ -100,10 +100,10 @@ class Solution extends Base
                         if ($goods->isEmpty()) return json(['err_no' => 0,"err_tips" => "success"]);
                         $order = (new SaasOrder)->where("order_sn",$msgData['order_id'])->findOrEmpty();
                         if (!$order->isEmpty()) return json(['err_no' => 0,"err_tips" => "success"]);
-                        $orderSn = "AL".CodeExtend::uniqidDate(18).rand(100,999);
+                        $orderSn = "AL".$msgData['order_id'];
                         $goodsImg = is_string($goods['image_list'])?json_decode($goods['image_list'],true):$goods['image_list'];
                         $order->insertGetId([
-                            "out_order_no"  => "AL".$msgData['order_id'],
+                            "out_order_no"  => $orderSn,
                             "item_order_id" => $msgData['item_order_info_list'][0]['item_order_id']?:'0',
                             "order_sn"  => $msgData['order_id'],
                             "openid"    => $msgData['open_id'],

+ 2 - 2
app/controller/merchant/Order.php

@@ -45,7 +45,7 @@ class Order extends Base
     {
         try {
             $param = $request->all();
-            $param['poi_id'] = $request->user['store_id'];
+//            $param['poi_id'] = $request->user['store_id'];
             $productType = $this->goodsService->productType();
             $data = $this->service->setModel()->getList($param,['product' => function($query) use($productType){
                 $query->field("product_id,product_name,product_type,is_new,price,line_price")->append(['types'])->withAttr(['types' => function($query,$resp) use($productType){
@@ -353,7 +353,7 @@ class Order extends Base
             if (!is_array($param)) return error($param);
             $order = (new SaasOrder)->where("out_order_no",$param["order"])->with(['poi'])->findOrEmpty();
             if ($order->isEmpty()) return error("关联订单错误");
-            if ($order['status'] <> 1) return error("关联订单错误");
+            if (!in_array($order['status'],[1,6,7])) return error("关联订单错误");
             if (empty($order['item_order_id'])) return error("订单数据不完整");
             $data = (new OrderData)->config([
                 "appid"     => sConf("wechat.mini_appid"),