|
|
|
@ -735,7 +735,7 @@ class Message extends ApiCommon
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# 处理待审核合同、回款、发票
|
|
|
|
|
if (in_array($type, ['checkContract', 'checkReceivables', 'checkInvoice'])) {
|
|
|
|
|
if (in_array($type, ['checkContract', 'checkReceivables', 'checkInvoice','checkBusiness'])) {
|
|
|
|
|
$where['check_status'] = ['lt', '2'];
|
|
|
|
|
$where['check_user_id'] = ['like', ',%' . $userId . '%,'];
|
|
|
|
|
|
|
|
|
@ -754,6 +754,11 @@ class Message extends ApiCommon
|
|
|
|
|
$invoiceId = !empty($typeId) ? $typeId : Db::name('crm_invoice')->where($where)->column('invoice_id');
|
|
|
|
|
db('crm_dealt_relation')->where('user_id', $userId)->where('types', 'crm_invoice')->whereIn('types_id', $invoiceId)->delete();
|
|
|
|
|
}
|
|
|
|
|
# 商机
|
|
|
|
|
if ($type == 'checkBusiness') {
|
|
|
|
|
$invoiceId = !empty($typeId) ? $typeId : Db::name('crm_business')->where($where)->column('business_id');
|
|
|
|
|
db('crm_dealt_relation')->where('user_id', $userId)->where('types', 'crm_business')->whereIn('types_id', $invoiceId)->delete();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|