Commit 172a53c2 by 朱继来

调整

parent e1f76d05
Showing with 12 additions and 10 deletions
......@@ -119,16 +119,18 @@ Class AddOrderController extends Controller
// if ($last_sale_id && $operator_id != $last_sale_id) return ['errcode' => -1, 'errmsg' => '暂不能跟进该客户,请联系主管重新指派'];
// }
// 若用户已分配,则判断当前登录客服是否能给用户下单,若没分配,按之前流程,订单生成时分配给当前登录客服
$CrmModel = new CrmModel();
$sale_id = $CrmModel->getSaleId($user->user_id);
if ($sale_id && $sale_id != $operator_id) {
$CmsModel = new CmsModel();
$sale_name = $CmsModel->getUserName($sale_id);
return ['errcode' => -1, 'errmsg' => '该客户由 '.$sale_name.' 跟进,请联系主管重新指派'];
}
if (strpos($_SERVER['HTTP_HOST'], 'sz') === false) { // 非测试环境下执行
// 若用户已分配,则判断当前登录客服是否能给用户下单,若没分配,按之前流程,订单生成时分配给当前登录客服
$CrmModel = new CrmModel();
$sale_id = $CrmModel->getSaleId($user->user_id);
if ($sale_id && $sale_id != $operator_id) {
$CmsModel = new CmsModel();
$sale_name = $CmsModel->getUserName($sale_id);
return ['errcode' => -1, 'errmsg' => '该客户由 '.$sale_name.' 跟进,请联系主管重新指派'];
}
}
$address = DB::connection('order')->table('lie_user_address')->where('user_id', $user->user_id)->get(); // 收货地址
$invoice = DB::connection('order')->table('lie_taxinfo')->where('user_id', $user->user_id)->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