|
|
@@ -18,20 +18,19 @@ class ProductService extends BaseService
|
|
|
const OFTEN_CLASS_ID = '-2';
|
|
|
|
|
|
//组装分类花材数据
|
|
|
- public static function assembleData($classIds, $itemInfoData, $showSale = false)
|
|
|
+ public static function assembleData($classIds, $itemInfoData, $showSale = false)
|
|
|
{
|
|
|
$saleItem = []; //今日特价
|
|
|
|
|
|
if ($itemInfoData) {
|
|
|
foreach ($itemInfoData as $v) {
|
|
|
$v['classId'] = self::ALL_CLASS_ID;
|
|
|
- if ($v['discountPrice'] > 0) {
|
|
|
+ if (isset($v['discountPrice']) && $v['discountPrice'] > 0) {
|
|
|
$saleItem[] = $v;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //classId=>itemId
|
|
|
$classMapItem = [];
|
|
|
if ($itemInfoData) {
|
|
|
foreach ($itemInfoData as $v) {
|