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
ea7dc7fa
authored
Sep 09, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'zjl_crm_v3_20210903' into development
parents
b05db47b
2763d3d2
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 @
ea7dc7fa
...
...
@@ -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 @
ea7dc7fa
...
...
@@ -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 @
ea7dc7fa
...
...
@@ -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