Merge branch 'develop'
# Conflicts: # app/common/service/StockOrdersService.php
This commit is contained in:
@@ -73,4 +73,18 @@ class CrawlService
|
||||
});
|
||||
return $href;
|
||||
}
|
||||
|
||||
/**
|
||||
* 关键词搜索的更多页面,通过面包屑抓取品牌与系列
|
||||
* @param $series
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function crawlBrandSeries($series)
|
||||
{
|
||||
$url = "https://www.dongchedi.com/auto/series/" . $series . "?anchorId=carModels";
|
||||
$ql = QueryList::get($url);
|
||||
$result = $ql->find('div.breadcrumb_wrap__2GLeU span')->texts()->all();
|
||||
|
||||
return ['brand' => $result[2], 'series' => $result[3]];
|
||||
}
|
||||
}
|
||||
@@ -1114,5 +1114,17 @@ class StockOrdersService
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function serviceDestroy(Request $request, string $scene = 'destroy')
|
||||
{
|
||||
$config = $this->buildQueryConfig($request, $scene);
|
||||
$item = $this->logicShow($config);
|
||||
if (!$item) {
|
||||
throw new BusinessException('数据不存在');
|
||||
}
|
||||
if ($item->approval_status == 1 || $item->approval_status == 2) {
|
||||
throw new BusinessException('审核中或者已审核的订单不能删除');
|
||||
}
|
||||
$deleted = $this->logicDeleteBy($config);
|
||||
return $this->postProcess(ucfirst($scene), $deleted);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user