|
|
@@ -2,6 +2,7 @@
|
|
|
|
|
|
namespace biz\goods\classes;
|
|
|
|
|
|
+use biz\goods\services\GoodsCategoryService;
|
|
|
use biz\goods\services\GoodsStyleService;
|
|
|
use common\components\business;
|
|
|
use Yii;
|
|
|
@@ -12,7 +13,7 @@ class GoodsClass extends BaseClass
|
|
|
|
|
|
public static $baseFile = '\biz\goods\models\Goods';
|
|
|
|
|
|
- //获取商品详情 shish 2019.12.3
|
|
|
+ //获取商品完整详情,包括商品的分类 shish 2019.12.3
|
|
|
public static function getGoodsInfo($id)
|
|
|
{
|
|
|
$info = self::getById($id);
|
|
|
@@ -20,7 +21,11 @@ class GoodsClass extends BaseClass
|
|
|
return [];
|
|
|
}
|
|
|
$list = self::groupGoodsBaseInfo([$info]);
|
|
|
- return current($list);
|
|
|
+ $info = current($list);
|
|
|
+ //商品的分类
|
|
|
+ $category = GoodsCategoryService::getGoodsHasCategoryIdList($id);
|
|
|
+ $info['categoryIdList'] = $category;
|
|
|
+ return $info;
|
|
|
}
|
|
|
|
|
|
//组装商品基本信息 shish 2019.12.2
|