无效客户举报图文
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace app\crmAdmin\service;
|
||||
|
||||
use app\common\model\CustomerAudit;
|
||||
use app\common\model\InquiryLog;
|
||||
use app\common\model\User;
|
||||
use app\common\service\OssService;
|
||||
@@ -139,6 +140,10 @@ class CustomerService
|
||||
if ($scene == 'audit') { //审核时查询举报人姓名
|
||||
$customerHis = CustomerHis::where('customer_id', $item->id)->orderBy('id', 'desc')->first(['user_his']);
|
||||
$item['user_name'] = empty($customerHis['user_his']) ? '' : User::where('id',$customerHis['user_his'])->value('name');
|
||||
$item['audit'] = CustomerAudit::where('customer_id', $item->id)->orderBy('id', 'desc')->first();
|
||||
if (!empty($item['audit'])&&!empty($item['audit']['img'])) {
|
||||
$item['audit']['img'] = explode(',', $item['audit']['img']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -287,9 +292,14 @@ class CustomerService
|
||||
$id = $params['id'];
|
||||
|
||||
$logic = new CustomerLogic();
|
||||
$audit = CustomerAudit::where('customer_id', $id)->orderBy('id', 'desc')->first();
|
||||
if ($params['scene'] == 'delete') {
|
||||
$audit->status = 3;
|
||||
$audit->save();
|
||||
return $logic->forceDelete($params['id']);
|
||||
} else {
|
||||
$audit->status = 2;
|
||||
$audit->save();
|
||||
return $logic->status($params['id'], 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user