|
|
@@ -4,6 +4,7 @@ namespace biz\goods\services;
|
|
|
|
|
|
use biz\base\services\BaseService;
|
|
|
use biz\goods\classes\GoodsCategoryClass;
|
|
|
+use biz\goods\classes\GoodsClass;
|
|
|
use Yii;
|
|
|
use linslin\yii2\curl;
|
|
|
|
|
|
@@ -22,7 +23,7 @@ class GoodsCategoryService extends BaseService
|
|
|
}
|
|
|
$ids = array_column($list, 'gId');
|
|
|
$list = GoodsService::getAllByCondition(['id' => ['in', $ids]], 'inTurn DESC', 'goodsName,shopImg,price,sold');
|
|
|
- $data['list'] = GoodsCategoryClass::groupGoodsBaseInfo($list);
|
|
|
+ $data['list'] = GoodsClass::groupGoodsBaseInfo($list);
|
|
|
return $data;
|
|
|
}
|
|
|
|
|
|
@@ -47,7 +48,7 @@ class GoodsCategoryService extends BaseService
|
|
|
}
|
|
|
//查出商品信息
|
|
|
$goodsInfoList = GoodsService::getAllByCondition(['id' => ['in', $goodsList]], 'inTurn DESC', 'goodsName,shopImg,price,sold,id', 'id');
|
|
|
- $goodsInfoList = GoodsCategoryClass::groupGoodsBaseInfo($goodsInfoList);
|
|
|
+ $goodsInfoList = GoodsClass::groupGoodsBaseInfo($goodsInfoList);
|
|
|
|
|
|
//每个分类取的商品数
|
|
|
$getNum = [6, 2, 4];
|