flow_id 解决

pull/21/head
张萌 2 years ago
parent 7148df93bf
commit cb1a21e799

@ -119,15 +119,15 @@ class Customer extends ApiCommon
//判断是否客户池数据
$wherePool = $customerModel->getWhereByPool();
$resPool = db('crm_customer')->alias('customer')->where(['customer_id' => $param['id']])->where($wherePool)->find();
if (!$resPool && !in_array($data['owner_user_id'], $auth_user_ids) && !$roPre && !$rwPre) {
if (!$resPool && !in_array($data['owner_user_id'], $auth_user_ids) && !$roPre && !$rwPre) {
$authData['dataAuth'] = (int)0;
return resultArray(['data' => $authData]);
}
// 判断是否有客户捞取审批
$customerCheck = db('crm_customer_check')->where(['customer_id' => $param['id']])->where(['check_status'=>0])->find();
if(!$customerCheck){
$data['flow_id']=$customerCheck['flow_id'];
}
// 判断是否有客户捞取审批
$customerCheck = db('crm_customer_check')->where(['customer_id' => $param['id']])->where(['check_status' => 0])->find();
if (!empty($customerCheck)) {
$data['flow_id'] = $customerCheck['flow_id'];
}
return resultArray(['data' => $data]);
}
@ -888,7 +888,7 @@ class Customer extends ApiCommon
*/
public function top()
{
$customerModel=model('Customer');
$customerModel = model('Customer');
$param = $this->param;
$userInfo = $this->userInfo;
$param['create_role_id'] = $userInfo['id'];

@ -108,7 +108,7 @@ class CustomerCheck extends Common
->where($partMap)
->where($dealtWhere)
->limit($request['offset'], $request['length'])
->field('customer_check.*,customer.name as name'.$customerField)
->field('customer_check.*,customer.name as name,'.$customerField)
->orderRaw($order)
->select();

Loading…
Cancel
Save