卡属性匹配

This commit is contained in:
邓皓元 2019-12-16 19:06:48 +08:00
parent 24853b53ad
commit eeda3e782a

View File

@ -40,7 +40,9 @@ class CardExport extends AbstractExport implements FromQuery, WithHeadings, With
$this->conditions['type'] = 0;
// 添加卡属性匹配查找
CardService::propConditions($this->conditions);
if (isset($this->conditions['prop_product']) || isset($this->conditions['prop_package'])) {
CardService::propConditions($this->conditions);
}
return app(OrderCardPartitionRepository::class)->selectRaw("COUNT(*) AS count")->withConditions($this->conditions)->first()->count;
}
@ -50,7 +52,9 @@ class CardExport extends AbstractExport implements FromQuery, WithHeadings, With
$this->conditions['type'] = 0;
// 添加卡属性匹配查找
CardService::propConditions($this->conditions);
if (isset($this->conditions['prop_product']) || isset($this->conditions['prop_package'])) {
CardService::propConditions($this->conditions);
}
$builder = app(OrderCardPartitionRepository::class)->forceNoReset()->skipCache()->withConditions($this->conditions)->orderBy('sim')->applyConditions();