shish 4 роки тому
батько
коміт
682bc5c8f4
1 змінених файлів з 10 додано та 6 видалено
  1. 10 6
      app-hd/controllers/MtController.php

+ 10 - 6
app-hd/controllers/MtController.php

@@ -53,18 +53,20 @@ class MtController extends PublicController
         $connection = Yii::$app->db;//事务处理
         $transaction = $connection->beginTransaction();
         try {
-
+            noticeUtil::push("111", '15280215347');
             $shopId = $post['app_poi_code'] ?? '';
             $shop = ShopClass::getById($shopId, true);
             if (empty($shop)) {
                 noticeUtil::push("美团确认订单报错,没有找到门店,美团订单id:{$mtOrderId} 美团编号:{$thirdSn}", '15280215347');
                 return Json::encode(['data' => 'ok']);
             }
+            noticeUtil::push("222", '15280215347');
             $shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], true);
             if (empty($shopExt)) {
                 noticeUtil::push("美团确认订单报错,没有找到门店拓展信息,美团订单id:{$mtOrderId} 美团编号:{$thirdSn}", '15280215347');
                 return Json::encode(['data' => 'ok']);
             }
+            noticeUtil::push("333", '15280215347');
             $mainId = $shop->mainId ?? 0;
             $sjId = $shop->sjId ?? 0;
             $customId = $shop->defaultCustomId ?? 0;
@@ -72,17 +74,18 @@ class MtController extends PublicController
                 noticeUtil::push("美团确认订单报错,没有找到客户哦,美团订单id:{$mtOrderId} 美团编号:{$thirdSn}", '15280215347');
                 return Json::encode(['data' => 'ok']);
             }
+            noticeUtil::push("444", '15280215347');
             $custom = CustomClass::getById($customId);
             if (empty($custom)) {
                 noticeUtil::push("美团确认订单报错,没有找到客户,美团订单id:{$mtOrderId} 美团编号:{$thirdSn}", '15280215347');
                 return Json::encode(['data' => 'ok']);
             }
-
+            noticeUtil::push("555", '15280215347');
             foreach ($post as $k => $val) {
                 $post[$k] = urldecode($val);
             }
             MtOrderClass::add($post);
-
+            noticeUtil::push("666", '15280215347');
             $detail = $post['detail'] ?? '';
             if (empty($detail)) {
                 noticeUtil::push("美团确认订单报错,没有找到商品,美团订单id:{$mtOrderId} 美团编号:{$thirdSn}", '15280215347');
@@ -93,7 +96,7 @@ class MtController extends PublicController
                 noticeUtil::push("美团确认订单报错,没有找到商品哦,美团订单id:{$mtOrderId} 美团编号:{$thirdSn}", '15280215347');
                 return Json::encode(['data' => 'ok']);
             }
-
+            noticeUtil::push("777", '15280215347');
             Yii::info('商品信息:' . json_encode($mtGoodsData));
 
             $productList = [];
@@ -107,7 +110,7 @@ class MtController extends PublicController
                 noticeUtil::push("美团确认订单报错,美团默认分类没有找到,美团订单id:{$mtOrderId} 美团编号:{$thirdSn}", '15280215347');
                 return Json::encode(['data' => 'ok']);
             }
-
+            noticeUtil::push("888", '15280215347');
             $caution = isset($post['caution']) && !empty($post['caution']) ? $post['caution'] : '';
             $remark = $caution;
 
@@ -141,6 +144,7 @@ class MtController extends PublicController
                 $goods = [['productId' => $id, 'num' => $num, 'unitType' => $unitType, 'unitPrice' => $goodsPrice, 'property' => $property]];
                 $productList = array_merge($goods, $productList);
             }
+            noticeUtil::push("999", '15280215347');
             $poi_receive_detail_yuan = $post['poi_receive_detail_yuan'] ?? '';
             if (empty($poi_receive_detail_yuan)) {
                 noticeUtil::push("美团确认订单报错,订单金额有问题,美团订单id:{$mtOrderId} 美团编号:{$thirdSn}", '15280215347');
@@ -203,7 +207,7 @@ class MtController extends PublicController
             ];
             $hasPay = dict::getDict('hasPay', 'payed');
             $order = OrderService::createFinishOrder($orderData, $custom, $hasPay);
-
+            noticeUtil::push("101010", '15280215347');
             //新制作单提示
             $shopExt = ShopExtClass::getByCondition(['shopId' => $shopId], true);
             ShopExtClass::newWorkRemind($shopExt, $order);