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
2763d3d2
authored
Sep 09, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整
parent
1950f629
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
app/Http/Controllers/AddOrderController.php
app/Http/Controllers/OrderController.php
app/Model/CrmModel.php
app/Http/Controllers/AddOrderController.php
View file @
2763d3d2
...
...
@@ -186,7 +186,7 @@ Class AddOrderController extends Controller
if
(
$order_user_limit
)
{
$count
=
$CrmModel
->
getSaleOrderUserCount
(
$request
->
user
->
userId
);
if
(
$count
>
=
$order_user_limit
)
return
[
'errcode'
=>
11001
,
'errmsg'
=>
'你已达到成交用户上限,请先释放你跟进的已下单用户或联系主管重新分配当前用户'
];
if
(
$count
>
$order_user_limit
)
return
[
'errcode'
=>
11001
,
'errmsg'
=>
'你已达到成交用户上限,请先释放你跟进的已下单用户或联系主管重新分配当前用户'
];
}
$res
=
$CrmModel
->
isBind
(
$user
->
user_id
,
$operator_id
);
...
...
app/Http/Controllers/OrderController.php
View file @
2763d3d2
...
...
@@ -934,7 +934,7 @@ Class OrderController extends Controller
if
(
$order_user_limit
)
{
$count
=
$CrmModel
->
getSaleOrderUserCount
(
$request
->
user
->
userId
);
if
(
$count
>
=
$order_user_limit
)
return
[
'errcode'
=>
11001
,
'errmsg'
=>
'你已达到成交用户上限,请先释放你跟进的已下单用户或联系主管重新分配当前用户'
];
if
(
$count
>
$order_user_limit
)
return
[
'errcode'
=>
11001
,
'errmsg'
=>
'你已达到成交用户上限,请先释放你跟进的已下单用户或联系主管重新分配当前用户'
];
}
$perm
=
new
PermController
;
...
...
app/Model/CrmModel.php
View file @
2763d3d2
...
...
@@ -52,7 +52,7 @@ class CrmModel extends Model
if
(
empty
(
$users
))
return
0
;
return
OrderModel
::
whereIn
(
'user_id'
,
$users
)
->
groupBy
(
'user_id'
)
->
get
()
->
count
();
// 去重+统计 laravel需要先get()
return
OrderModel
::
whereIn
(
'user_id'
,
$users
)
->
where
(
'status'
,
'<>'
,
-
1
)
->
groupBy
(
'user_id'
)
->
get
()
->
count
();
// 去重+统计 laravel需要先get()
}
...
...
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