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