Gorden 1 hónapja
szülő
commit
5ef34a2dc8

+ 6 - 4
app/admin/controller/notify/RechargeController.php

@@ -67,11 +67,13 @@ class RechargeController
 
             return $result;
         } catch (BusinessException $e) {
+            dump($e->getMessage());
             _syslog("APP充值", "APP充值失败", $data, $data, 1001);
-            return json_fail("处理失败");
+            return json_fail("处理失败3");
         } catch (\Exception $e) {
+            dump($e->getMessage());
             _syslog("APP充值", "APP充值失败", $data, $data, 1001);
-            return json_fail("处理失败");
+            return json_fail("处理失败4");
         }
 
 //    public function paySuccess($id)
@@ -173,12 +175,12 @@ class RechargeController
             dump($e->getMessage());
             Db::rollBack();
 
-            throw new BusinessException("处理失败");
+            throw new BusinessException("处理失败1");
 //            return json_fail('处理失败');
         } catch (\Exception $e) {
             dump($e->getMessage());
             Db::rollBack();
-            throw new BusinessException("处理失败");
+            throw new BusinessException("处理失败2");
 //            return json_fail('处理失败');
         }
     }

+ 6 - 1
app/functions.php

@@ -88,7 +88,12 @@ if (!function_exists('month_12')) {
 if (!function_exists('_syslog')) {
     function _syslog($name, $operation, $operationData = false, $requestParams = false, $adminId = false)
     {
-        $logAdminId = $adminId ? $adminId : \Tinywan\Jwt\JwtToken::getCurrentId();
+        try {
+            $adminId = $adminId ? $adminId : \Tinywan\Jwt\JwtToken::getCurrentId();
+        } catch (\Exception $e) {
+            $adminId = 1001;
+        }
+        $logAdminId = $adminId;
         $model = new \app\model\SysLog();
         $model->log_admin_id = $logAdminId;
         $model->log_name = $name;