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
d56bef73
authored
Jul 24, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整
parent
ad9f3379
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
app/Http/Controllers/CronController.php
app/Model/PayLogModel.php
app/Http/Controllers/CronController.php
View file @
d56bef73
...
@@ -33,8 +33,8 @@ class CronController extends Controller
...
@@ -33,8 +33,8 @@ class CronController extends Controller
// 查询联营、自营线上支付记录
// 查询联营、自营线上支付记录
$pay_log_list
=
$PayLogModel
->
getPayLog
(
$start_time
,
$end_time
);
$pay_log_list
=
$PayLogModel
->
getPayLog
(
$start_time
,
$end_time
);
$pay_log
=
$this
->
filterFake
(
$pay_log_list
);
// 过滤数据
//
$pay_log = $this->filterFake($pay_log_list); // 过滤数据
$pay_log_amount
=
$this
->
countByCurrency
(
$pay_log
);
// 统计金额
$pay_log_amount
=
$this
->
countByCurrency
(
$pay_log
_list
);
// 统计金额
// 联营线下支付记录
// 联营线下支付记录
$joint_offline_list
=
$ErpPayLogModel
->
getErpPayLog
(
$start_time
,
$end_time
);
$joint_offline_list
=
$ErpPayLogModel
->
getErpPayLog
(
$start_time
,
$end_time
);
...
@@ -62,7 +62,7 @@ class CronController extends Controller
...
@@ -62,7 +62,7 @@ class CronController extends Controller
$user
=
$UserMainModel
->
getUserAccount
(
$k
);
// 获取用户账号
$user
=
$UserMainModel
->
getUserAccount
(
$k
);
// 获取用户账号
if
(
$user
)
{
if
(
$user
)
{
$data
[
'account'
]
=
isset
(
$user
[
'mobile'
])
?
$user
[
'mobile'
]
:
$user
[
'email'
];
$data
[
'account'
]
=
$user
[
'mobile'
]
?
$user
[
'mobile'
]
:
$user
[
'email'
];
}
}
$data
[
'rmb_amount'
]
=
isset
(
$v
[
'rmb'
])
?
$v
[
'rmb'
]
:
0
;
$data
[
'rmb_amount'
]
=
isset
(
$v
[
'rmb'
])
?
$v
[
'rmb'
]
:
0
;
...
...
app/Model/PayLogModel.php
View file @
d56bef73
...
@@ -16,12 +16,15 @@ class PayLogModel extends Model
...
@@ -16,12 +16,15 @@ class PayLogModel extends Model
// 获取联营、自营线上支付记录
// 获取联营、自营线上支付记录
public
function
getPayLog
(
$start_time
,
$end_time
)
public
function
getPayLog
(
$start_time
,
$end_time
)
{
{
$field
=
[
'pay_log_id'
,
'order_id'
,
'order_sn'
,
'user_id'
,
'pay_type'
,
'is_paid'
,
'pay_amount'
,
'pay_time'
];
$field
=
[
'p.pay_log_id'
,
'p.order_id'
,
'p.order_sn'
,
'p.user_id'
,
'p.pay_type'
,
'p.is_paid'
,
'p.pay_amount'
,
'p.pay_time'
,
'o.currency'
];
$data
=
$this
->
where
(
'is_paid'
,
1
)
$data
=
$this
->
from
(
'lie_pay_log as p'
)
->
whereBetween
(
'pay_time'
,
[
$start_time
,
$end_time
])
->
leftJoin
(
'lie_order as o'
,
'p.order_id'
,
'='
,
'o.order_id'
)
->
where
(
'p.is_paid'
,
1
)
->
whereBetween
(
'p.pay_time'
,
[
$start_time
,
$end_time
])
->
where
(
'o.is_type'
,
0
)
->
select
(
$field
)
->
select
(
$field
)
// ->select('user_id', DB::raw('sum(pay_amount) as pay_amount'))
// ->select('user_id', DB::raw('sum(pay_amount) as pay_amount'))
->
orderBy
(
'pay_time'
,
'desc'
)
->
orderBy
(
'p
.p
ay_time'
,
'desc'
)
// ->groupBy('user_id')
// ->groupBy('user_id')
->
get
()
->
get
()
->
toArray
();
->
toArray
();
...
...
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