|
@@ -3,6 +3,7 @@
|
|
|
namespace app\common\Service\Goods;
|
|
|
use app\common\model\Goods;
|
|
|
use app\common\Enum\GoodsEnum;
|
|
|
+use app\common\model\GoodsSkuSpec;
|
|
|
class GoodService
|
|
|
{
|
|
|
/**
|
|
@@ -35,4 +36,13 @@ class GoodService
|
|
|
$arrGoods = collection($goodsList)->toArray();
|
|
|
return $arrGoods;
|
|
|
}
|
|
|
+ // 查询商品关联规格
|
|
|
+ public static function getGoodsCustomizedSpec($goods_id = 0, $type = 0)
|
|
|
+ {
|
|
|
+ $goodsSkuSpec = GoodsSkuSpec::where('id', $goods_id)
|
|
|
+ ->where('type', $type)
|
|
|
+ ->find();
|
|
|
+
|
|
|
+ return $goodsSkuSpec;
|
|
|
+ }
|
|
|
}
|