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
7a9d3521
authored
Jul 26, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://119.23.72.7/zhujilai/Order
into zjl_iteration_20190723
parents
c975c3e3
4ec7ebb2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
app/Http/Controllers/CronController.php
app/Model/PayLogModel.php
config/params.php
app/Http/Controllers/CronController.php
View file @
7a9d3521
...
@@ -47,15 +47,17 @@ class CronController extends Controller
...
@@ -47,15 +47,17 @@ class CronController extends Controller
$self_accounts
=
$this
->
filterFake
(
$self_accounts_list
);
// 过滤数据
$self_accounts
=
$this
->
filterFake
(
$self_accounts_list
);
// 过滤数据
$self_accounts_amount
=
$this
->
countByCurrency
(
$self_accounts
,
'checkout_paid_amount'
);
// 统计金额
$self_accounts_amount
=
$this
->
countByCurrency
(
$self_accounts
,
'checkout_paid_amount'
);
// 统计金额
$resp
=
[];
$resp
=
[];
// 合并用户
// 合并用户
$resp
=
$this
->
mergeUser
(
$pay_log_amount
,
$joint_offline_amount
);
$resp
=
$this
->
mergeUser
(
$pay_log_amount
,
$joint_offline_amount
);
$resp
=
$this
->
mergeUser
(
$resp
,
$self_accounts_amount
);
$resp
=
$this
->
mergeUser
(
$resp
,
$self_accounts_amount
);
// 保存用户金额数据
// 保存用户金额数据
if
(
!
empty
(
$resp
))
{
if
(
!
empty
(
$resp
))
{
$cur_rate
=
$this
->
getRate
();
foreach
(
$resp
as
$k
=>
$v
)
{
foreach
(
$resp
as
$k
=>
$v
)
{
$data
=
[];
$data
=
[];
...
@@ -67,7 +69,7 @@ class CronController extends Controller
...
@@ -67,7 +69,7 @@ class CronController extends Controller
$data
[
'rmb_amount'
]
=
isset
(
$v
[
'rmb'
])
?
$v
[
'rmb'
]
:
0
;
$data
[
'rmb_amount'
]
=
isset
(
$v
[
'rmb'
])
?
$v
[
'rmb'
]
:
0
;
$data
[
'usd_amount'
]
=
isset
(
$v
[
'usd'
])
?
$v
[
'usd'
]
:
0
;
$data
[
'usd_amount'
]
=
isset
(
$v
[
'usd'
])
?
$v
[
'usd'
]
:
0
;
$data
[
'cur_rate'
]
=
$
this
->
getRate
()
;
$data
[
'cur_rate'
]
=
$
cur_rate
;
$data
[
'amount'
]
=
$data
[
'rmb_amount'
]
+
$data
[
'usd_amount'
]
*
$data
[
'cur_rate'
];
$data
[
'amount'
]
=
$data
[
'rmb_amount'
]
+
$data
[
'usd_amount'
]
*
$data
[
'cur_rate'
];
$res
=
$UserAmountModel
->
updateOrCreate
([
'user_id'
=>
$k
],
$data
);
$res
=
$UserAmountModel
->
updateOrCreate
([
'user_id'
=>
$k
],
$data
);
...
...
app/Model/PayLogModel.php
View file @
7a9d3521
...
@@ -21,6 +21,7 @@ class PayLogModel extends Model
...
@@ -21,6 +21,7 @@ class PayLogModel extends Model
->
leftJoin
(
'lie_order as o'
,
'p.order_id'
,
'='
,
'o.order_id'
)
->
leftJoin
(
'lie_order as o'
,
'p.order_id'
,
'='
,
'o.order_id'
)
->
where
(
'p.is_paid'
,
1
)
->
where
(
'p.is_paid'
,
1
)
->
whereBetween
(
'p.pay_time'
,
[
$start_time
,
$end_time
])
->
whereBetween
(
'p.pay_time'
,
[
$start_time
,
$end_time
])
->
where
(
'o.status'
,
'>'
,
2
)
->
where
(
'o.is_type'
,
0
)
->
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'))
...
...
config/params.php
View file @
7a9d3521
...
@@ -89,8 +89,8 @@
...
@@ -89,8 +89,8 @@
// 猎芯活动用户金额统计时间
// 猎芯活动用户金额统计时间
'lx_activity_time'
=>
[
'lx_activity_time'
=>
[
'start_time'
=>
'201
8-10-1
'
,
'start_time'
=>
'201
9-7-24
'
,
'end_time'
=>
'201
8
-10-31 23:59:59'
,
'end_time'
=>
'201
9
-10-31 23:59:59'
,
],
],
...
...
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