Commit df1a5bc7 by 朱继来

调整

parent 399e1d56
Showing with 21 additions and 20 deletions
......@@ -215,31 +215,31 @@ class SpecialController extends Controller
// 处理支付记录
public function handlePayLog()
{
$PayLogModel = new PayLogModel();
$pay_log = $PayLogModel->where('pay_type', 4)->where('is_paid', -1)->orderBy('create_time', 'desc')->get()->toArray();
// $PayLogModel = new PayLogModel();
// $pay_log = $PayLogModel->where('pay_type', 4)->where('is_paid', -1)->orderBy('create_time', 'desc')->get()->toArray();
$data = [];
// $data = [];
foreach ($pay_log as $k=>$v) {
$log = $PayLogModel->where('order_id', $v['order_id'])->where('pay_type', 1)->first();
// foreach ($pay_log as $k=>$v) {
// $log = $PayLogModel->where('order_id', $v['order_id'])->where('pay_type', 1)->first();
if (!$log)
continue;
// if (!$log)
// continue;
// dump($log['order_id'].'==='.date('Y-m-d H:i:s', $log['create_time']).'==='.date('Y-m-d H:i:s', $log['pay_time']));
// // dump($log['order_id'].'==='.date('Y-m-d H:i:s', $log['create_time']).'==='.date('Y-m-d H:i:s', $log['pay_time']));
// $PayLogModel->where('pay_log_id', $v['pay_log_id'])->update(['is_paid'=>1, 'pay_time'=>$log['pay_time']]); // 更新账期支付
// $PayLogModel->where('pay_log_id', $log['pay_log_id'])->delete();
// // 记录到日志
// $monolog = Log::getMonolog();
// $monolog->popHandler();
// Log::useDailyFiles(storage_path('logs/update_pay_log.log'));
// Log::info('更新账期支付记录ID:'.$v['pay_log_id'].',删除的支付记录ID:'.$log['pay_log_id']);
$data[] = $log['pay_log_id'];
}
dd($data);
// // $PayLogModel->where('pay_log_id', $v['pay_log_id'])->update(['is_paid'=>1, 'pay_time'=>$log['pay_time']]); // 更新账期支付
// // $PayLogModel->where('pay_log_id', $log['pay_log_id'])->delete();
// // // 记录到日志
// // $monolog = Log::getMonolog();
// // $monolog->popHandler();
// // Log::useDailyFiles(storage_path('logs/update_pay_log.log'));
// // Log::info('更新账期支付记录ID:'.$v['pay_log_id'].',删除的支付记录ID:'.$log['pay_log_id']);
// $data[] = $log['pay_log_id'];
// }
// dd($data);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment