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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
app/Http/Controllers/CronController.php
app/Model/PayLogModel.php
config/params.php
app/Http/Controllers/CronController.php
View file @
7a9d3521
...
...
@@ -56,6 +56,8 @@ class CronController extends Controller
// 保存用户金额数据
if
(
!
empty
(
$resp
))
{
$cur_rate
=
$this
->
getRate
();
foreach
(
$resp
as
$k
=>
$v
)
{
$data
=
[];
...
...
@@ -67,7 +69,7 @@ class CronController extends Controller
$data
[
'rmb_amount'
]
=
isset
(
$v
[
'rmb'
])
?
$v
[
'rmb'
]
:
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'
];
$res
=
$UserAmountModel
->
updateOrCreate
([
'user_id'
=>
$k
],
$data
);
...
...
app/Model/PayLogModel.php
View file @
7a9d3521
...
...
@@ -21,6 +21,7 @@ class PayLogModel extends Model
->
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.status'
,
'>'
,
2
)
->
where
(
'o.is_type'
,
0
)
->
select
(
$field
)
// ->select('user_id', DB::raw('sum(pay_amount) as pay_amount'))
...
...
config/params.php
View file @
7a9d3521
...
...
@@ -89,8 +89,8 @@
// 猎芯活动用户金额统计时间
'lx_activity_time'
=>
[
'start_time'
=>
'201
8-10-1
'
,
'end_time'
=>
'201
8
-10-31 23:59:59'
,
'start_time'
=>
'201
9-7-24
'
,
'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