Commit ea7dc7fa by 朱继来

Merge branch 'zjl_crm_v3_20210903' into development

parents b05db47b 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);
......
......@@ -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;
......
......@@ -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()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment