whitefang 1 год назад
Родитель
Сommit
6cb3cef388
2 измененных файлов с 10 добавлено и 1 удалено
  1. 5 0
      app/common/command/QueryRefund.php
  2. 5 1
      config/log.php

+ 5 - 0
app/common/command/QueryRefund.php

@@ -194,11 +194,16 @@ class QueryRefund extends Command
             'id' => $recordId,
             'refund_status' => RefundEnum::REFUND_SUCCESS,
         ]);
+        Log::channel('re_fund')->info('1');
+
         //更新工单退款状态以及处理工程师金额和物业金额
         $order = RechargeOrder::where('id',$order_id)->findOrEmpty();
         $work = ServiceWork::where('id',$order->work_id)->findOrEmpty();
+        Log::channel('re_fund')->info(json_encode($work,JSON_UNESCAPED_UNICODE));
         if(!$work->isEmpty()){
             if(($work->work_pay_status == '1' || $work->work_pay_status == '2') and $work->service_status != '5' and $work->work_status != '9'){
+                Log::channel('re_fund')->info(2);
+
                 //工程师余额变动
                 $change_amount = MasterWorkerAccountLog::where(['work_sn'=>$work->work_sn,'action'=>1])->value('change_amount');
                 WorkerAccountLogLogic::addAccountLog($work,$change_amount,WorkerAccountLogEnum::UM_DEC_ADMIN,WorkerAccountLogEnum::DEC);

+ 5 - 1
config/log.php

@@ -39,7 +39,11 @@ return [
             // 是否实时写入
             'realtime_write' => true,
         ],
-        // 其它日志通道配置
+        // 添加 re_fund 日志通道
+        're_fund' => [
+            'type' => 'File',
+            'path' => app()->getRuntimePath() . 'logs/re_fund.log',
+        ],
     ],
 
 ];