Просмотр исходного кода

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

sunxbiao месяцев назад: 5
Родитель
Сommit
966c765e74
1 измененных файлов с 9 добавлено и 0 удалено
  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 18
 use app\entity\data\store\StoreGroupOrderEntity;
19 19
 use think\db\exception\DbException;
20 20
 use think\exception\ValidateException;
21
+use think\facade\Log;
21 22
 
22 23
 /**
23 24
  * Class StoreGroupOrderDao
@@ -165,6 +166,14 @@ class StoreGroupOrderDao extends BaseDao
165 166
                 ->where('group_order_id', '=', $storeGroupOrderEntity->getGroupOrderId())
166 167
                 ->update($storeGroupOrderEntity->toUnderlineArray());
167 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 177
             throw new ValidateException('更新订单组支付成功状态失败');
169 178
         }
170 179
         return $storeGroupOrderEntity;