Merge branch 'feature/audit'
# Conflicts: # app/crmAdmin/service/CustomerService.php
This commit is contained in:
@@ -142,15 +142,17 @@ 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']);
|
||||
}
|
||||
$audit = CustomerAudit::where('customer_id', $item->id)->orderBy('id', 'desc')->first();
|
||||
if (!empty($audit)&&!empty($audit['img'])) {
|
||||
$audit = $audit?$audit->toArray():'';
|
||||
$audit['img'] = explode(',', $audit['img']);
|
||||
|
||||
$ossservice = new OssService();
|
||||
foreach ($item['audit']['img'] as $k => $img) {
|
||||
$item['audit']['img'][$k] = $ossservice->generatePrivateUrl($img);
|
||||
$ossservice = new OssService();
|
||||
foreach ($audit['img'] as $k => $img) {
|
||||
$audit['img'][$k] = $ossservice->generatePrivateUrl($img);
|
||||
}
|
||||
}
|
||||
$item['audit'] = $audit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user