作者 赵彬吉

update

... ... @@ -72,7 +72,7 @@ class AdsController extends BaseController
if($item['fob_pro']){
$fb_projects = ReInquiryCount::getFobProjects();
foreach ($item['fob_pro'] as $k => $fob_pro){
$repeat = ReInquiryTask::where('fob_pro', 'like', '%'.$fob_pro.'%')->where('id', '<>', $item['id'])->first();
$repeat = ReInquiryTask::where('fob_pro', 'like', '%"'.$fob_pro.'"%')->where('id', '<>', $item['id'])->first();
$fob_info = collect($fb_projects)->where('postid', $fob_pro)->first();
$item['fob_pro_list'][$k] = [
'is_repeat' => $repeat ? 1 : 0,
... ... @@ -82,7 +82,7 @@ class AdsController extends BaseController
}
if($item['shop_site']) {
foreach ($item['shop_site'] as $k => $site) {
$repeat = ReInquiryTask::where('target', 'like', '%' . $site . '%')->where('id', '<>', $item['id'])->first();
$repeat = ReInquiryTask::where('target', 'like', '%"' . $site . '"%')->where('id', '<>', $item['id'])->first();
$item['shop_site_list'][$k] = [
'is_repeat' => $repeat ? 1 : 0,
'url' => $site,
... ... @@ -90,7 +90,7 @@ class AdsController extends BaseController
}
}
foreach ($item['target'] as $k=>$target){
$repeat = ReInquiryTask::where('target', 'like', '%'.$target['url'].'%')->where('id', '<>', $item['id'])->first();
$repeat = ReInquiryTask::where('target', 'like', '%"'.$target['url'].'"%')->where('id', '<>', $item['id'])->first();
$item['target'][$k]['is_repeat'] = $repeat ? 1 : 0;
}
$item['cost'] = ReInquiryCost::getCostByAdIds($item['ad_id']);
... ...