diff --git a/app/ExceptionHandle.php b/app/ExceptionHandle.php index 06a506e6..bdd23a35 100644 --- a/app/ExceptionHandle.php +++ b/app/ExceptionHandle.php @@ -12,6 +12,7 @@ namespace app; +use crmeb\utils\DingTalk; use think\db\exception\DataNotFoundException; use think\db\exception\ModelNotFoundException; use think\db\exception\PDOException; @@ -81,6 +82,7 @@ class ExceptionHandle extends Handle else if ($e instanceof \EasyWeChat\Core\Exceptions\HttpException) return app('json')->fail($e->getMessage()); + DingTalk::exception($e, $request); return parent::render($request, $e); } } diff --git a/app/common/repositories/store/order/StoreGroupOrderRepository.php b/app/common/repositories/store/order/StoreGroupOrderRepository.php index 53e7fc25..70edf4a4 100644 --- a/app/common/repositories/store/order/StoreGroupOrderRepository.php +++ b/app/common/repositories/store/order/StoreGroupOrderRepository.php @@ -101,7 +101,10 @@ class StoreGroupOrderRepository extends BaseRepository }, 'orderProduct', 'presellOrder']); }, 'interest']) ->order('create_time DESC')->find(); - $interest = $order->interest->calculateInterest(); + $interest = '0'; + if (is_callable([$order->interest, 'calculateInterest'])) { + $interest = $order->interest->calculateInterest(); + } $order['interest']['total_amount'] = bcadd($order->interest->total_price, $interest, 2); return $order; }