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
cb3b2bd5
authored
Mar 19, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整样片列表申请数量(过滤已取消订单)
parent
2a7ddcec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
app/Model/UserSampleApplyModel.php
app/Model/UserSampleApplyModel.php
View file @
cb3b2bd5
...
...
@@ -110,7 +110,13 @@ class UserSampleApplyModel extends Model
// 获取指定字段的总数
public
function
getSampleApplySum
(
$user_id
,
$field
=
'apply_num'
)
{
return
$this
->
where
(
'user_id'
,
$user_id
)
->
sum
(
$field
);
return
$this
->
from
(
'lie_user_sample_apply as s'
)
->
join
(
'lie_order as o'
,
's.order_id'
,
'='
,
'o.order_id'
)
->
where
(
's.user_id'
,
'='
,
$user_id
)
->
where
(
'o.status'
,
'<>'
,
'-1'
)
->
sum
(
'apply_num'
);
// return $this->where('user_id', $user_id)->sum($field);
}
// 获取指定用户申请的样片消耗总人数
...
...
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