Pārlūkot izejas kodu

创建订单-更换事务调用方式

sunxbiao 5 mēneši atpakaļ
vecāks
revīzija
966c765e74
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. 9 0
      app/common/dao/store/order/StoreGroupOrderDao.php

+ 9 - 0
app/common/dao/store/order/StoreGroupOrderDao.php

@@ -18,6 +18,7 @@ use app\entity\CommonEntity;
18
 use app\entity\data\store\StoreGroupOrderEntity;
18
 use app\entity\data\store\StoreGroupOrderEntity;
19
 use think\db\exception\DbException;
19
 use think\db\exception\DbException;
20
 use think\exception\ValidateException;
20
 use think\exception\ValidateException;
21
+use think\facade\Log;
21
 
22
 
22
 /**
23
 /**
23
  * Class StoreGroupOrderDao
24
  * Class StoreGroupOrderDao
@@ -165,6 +166,14 @@ class StoreGroupOrderDao extends BaseDao
165
                 ->where('group_order_id', '=', $storeGroupOrderEntity->getGroupOrderId())
166
                 ->where('group_order_id', '=', $storeGroupOrderEntity->getGroupOrderId())
166
                 ->update($storeGroupOrderEntity->toUnderlineArray());
167
                 ->update($storeGroupOrderEntity->toUnderlineArray());
167
         } catch (\Exception $e) {
168
         } catch (\Exception $e) {
169
+            Log::error('更新订单组支付成功状态失败' . json_encode([
170
+                    'error_message' => $e->getMessage(),
171
+                    'error_file' => $e->getFile(),
172
+                    'error_line' => $e->getLine(),
173
+                    'error_code' => $e->getCode(),
174
+                    'exception_class' => get_class($e),
175
+                    'trace' => $e->getTraceAsString()
176
+                ]));
168
             throw new ValidateException('更新订单组支付成功状态失败');
177
             throw new ValidateException('更新订单组支付成功状态失败');
169
         }
178
         }
170
         return $storeGroupOrderEntity;
179
         return $storeGroupOrderEntity;