新商机修复

pull/28/head
张萌 2 years ago
parent 597b5d2d3f
commit ca3af5f387

@ -609,14 +609,13 @@ class Message extends ApiCommon
unset($param['type']); unset($param['type']);
unset($param['isSub']); unset($param['isSub']);
$businessModel = model('Business'); $businessModel = model('Business');
$param['owner_user_id'] = $userInfo['id']; // $param['owner_user_id'] = $userInfo['id'];
if ($isSub) { if ($isSub) {
$param['owner_user_id'] = array('in', getSubUserId(false)); $param['owner_user_id'] = array('in', getSubUserId(false));
} }
$businessIdArray = db('crm_dealt_relation')->where(['types' => ['eq', 'crm_business_new'], 'user_id' => ['eq', $param['user_id']]])->column('types_id'); $businessIdArray = db('crm_dealt_relation')->where(['types' => ['eq', 'crm_business_new'], 'user_id' => ['eq', $userInfo['id']]])->column('types_id');
$param['businessIdArray'] = !empty($businessIdArray) ? $businessIdArray : -1; $param['businessIdArray'] = !empty($businessIdArray) ? $businessIdArray : -1;
$data = $businessModel->getDataList($param); $data = $businessModel->getDataList($param);
// p($contractModel->getLastSql());
if ($types == 'list') { if ($types == 'list') {
return resultArray(['data' => $data]); return resultArray(['data' => $data]);
} }

@ -438,7 +438,8 @@ class Business extends Common
db('crm_business_data')->insertAll($businessData); db('crm_business_data')->insertAll($businessData);
//站内信 //站内信
$send_user_id = stringToArray(getUserSuperior($param['create_user_id'])); $userInfo = db('admin_user')->where(['id' => $param['create_user_id']])->find();
$send_user_id = stringToArray(getUserSuperior($userInfo['structure_id'],0));
(new Message())->send( (new Message())->send(
Message::CUSTOMER_CHECK_TO_DO, Message::CUSTOMER_CHECK_TO_DO,
[ [

Loading…
Cancel
Save