Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
df1a5bc7
authored
Oct 24, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整
parent
399e1d56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
20 deletions
app/Http/Controllers/SpecialController.php
app/Http/Controllers/SpecialController.php
View file @
df1a5bc7
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment