|
@@ -39,7 +39,7 @@ class BusinessOpportunityService extends Service
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
$old = array_column($old,'file');
|
|
$old = array_column($old,'file');
|
|
BusinessOpportunityInfo::where('del_time',0)
|
|
BusinessOpportunityInfo::where('del_time',0)
|
|
- ->where('customer_id',$data['id'])
|
|
|
|
|
|
+ ->where('business_opportunity_id',$data['id'])
|
|
->update(['del_time' => $time]);
|
|
->update(['del_time' => $time]);
|
|
|
|
|
|
if(! empty($data['customer_contact'])){
|
|
if(! empty($data['customer_contact'])){
|
|
@@ -352,14 +352,14 @@ class BusinessOpportunityService extends Service
|
|
$customer_info = BusinessOpportunityInfo::where('del_time',0)
|
|
$customer_info = BusinessOpportunityInfo::where('del_time',0)
|
|
->whereIn('business_opportunity_id',array_column($data['data'],'id'))
|
|
->whereIn('business_opportunity_id',array_column($data['data'],'id'))
|
|
->whereIn('type',[BusinessOpportunityInfo::type_one])
|
|
->whereIn('type',[BusinessOpportunityInfo::type_one])
|
|
- ->select('contact_type as type','contact_info as info','customer_id','data_id')
|
|
|
|
|
|
+ ->select('contact_type as type','contact_info as info','business_opportunity_id','data_id')
|
|
->get()->toArray();
|
|
->get()->toArray();
|
|
|
|
|
|
//联系方式
|
|
//联系方式
|
|
$customer_info_map = [];
|
|
$customer_info_map = [];
|
|
foreach ($customer_info as $value){
|
|
foreach ($customer_info as $value){
|
|
$value['type_title'] = BusinessOpportunityInfo::$contact_type[$value['type']] ?? "";
|
|
$value['type_title'] = BusinessOpportunityInfo::$contact_type[$value['type']] ?? "";
|
|
- $customer_info_map[$value['customer_id']][] = $value;
|
|
|
|
|
|
+ $customer_info_map[$value['business_opportunity_id']][] = $value;
|
|
}
|
|
}
|
|
|
|
|
|
$address_map = config('address');
|
|
$address_map = config('address');
|