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
08254505
authored
Jul 30, 2019
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_activity_20190718'
parents
742af80f
f15e8097
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
app/Http/Controllers/CronController.php
app/Model/OrderRefundModel.php
app/Http/Controllers/CronController.php
View file @
08254505
...
@@ -115,7 +115,7 @@ class CronController extends Controller
...
@@ -115,7 +115,7 @@ class CronController extends Controller
return
$RedisModel
->
get
(
'api_lx_activity_user_rank'
);
return
$RedisModel
->
get
(
'api_lx_activity_user_rank'
);
}
}
// 过滤掉联营账期
// 过滤掉联营账期
(账期从ERP支付记录中获取)
public
function
filterJointAccounts
(
$data
)
public
function
filterJointAccounts
(
$data
)
{
{
if
(
!
$data
)
return
false
;
if
(
!
$data
)
return
false
;
...
@@ -243,7 +243,7 @@ class CronController extends Controller
...
@@ -243,7 +243,7 @@ class CronController extends Controller
$UserAmountModel
=
new
UserAmountModel
();
$UserAmountModel
=
new
UserAmountModel
();
$RedisModel
=
new
RedisModel
();
$RedisModel
=
new
RedisModel
();
$UserAmountModel
->
truncate
();
// 清空数据
//
$UserAmountModel->truncate(); // 清空数据
$RedisModel
->
set
(
'api_lx_activity_user_rank'
,
null
);
$RedisModel
->
set
(
'api_lx_activity_user_rank'
,
null
);
}
}
...
...
app/Model/OrderRefundModel.php
View file @
08254505
...
@@ -315,13 +315,16 @@ class OrderRefundModel extends Model
...
@@ -315,13 +315,16 @@ class OrderRefundModel extends Model
return
$tmp
;
return
$tmp
;
}
}
// 获取活动期间已完成退款的用户金额
// 获取活动期间已完成退款的用户金额
(过滤掉联营账期)
public
function
getJointReturnAmount
(
$user_id
,
$start_time
,
$end_time
)
public
function
getJointReturnAmount
(
$user_id
,
$start_time
,
$end_time
)
{
{
return
$this
->
where
(
'user_id'
,
$user_id
)
return
$this
->
from
(
'lie_order_refund as r'
)
->
where
(
'status'
,
10
)
->
leftJoin
(
'lie_order as o'
,
'r.order_id'
,
'='
,
'o.order_id'
)
->
whereBetween
(
'refund_time'
,
[
$start_time
,
$end_time
])
->
where
(
'r.user_id'
,
$user_id
)
->
select
(
'user_id'
,
'currency'
,
'pay_amount'
,
'price_fall'
)
->
where
(
'r.status'
,
10
)
->
whereBetween
(
'r.refund_time'
,
[
$start_time
,
$end_time
])
->
where
(
'o.order_pay_type'
,
'<>'
,
3
)
->
select
(
'r.user_id'
,
'r.currency'
,
'r.pay_amount'
,
'r.price_fall'
)
->
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