|
|
@ -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]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|