Commit 8be9f23b authored by luhongguang's avatar luhongguang

update:提供给tcc的商品列表接口

parent fc8664e0
......@@ -1337,20 +1337,28 @@ class GoodsService
return $info;
}
/**
* 获取 GoodsSku 列表
* @param $params
* @return array
* @throws GoodsException
* @return \Api\PhpUtils\Mysql\MysqlBase|array
*/
public static function getGoodsSkuList($params)
{
$where = [];
if (empty($params)) {
return [];
}
$marketingType = !empty($params['marketing_type']) ? $params['marketing_type'] : 0;
if ($marketingType == Marketing::MARKETING_TYPE_PINDAN) {
return self::generalGetPindanGoodsSkuList($params);
} else {
return self::generalGetGoodsSkuList($params);
}
}
private static function generalGetGoodsSkuList($params)
{
$where = [];
if (!empty($params['goods_sku_id'])) {
$where['goods_sku_id'] = $params['goods_sku_id'];
}
......@@ -1375,6 +1383,16 @@ class GoodsService
return $list;
}
private static function generalGetPindanGoodsSkuList($params)
{
$where = [];
if (!empty($params['goods_sku_id'])) {
$where['goods_sku_id'] = $params['goods_sku_id'];
}
return PindanGoodsSku::getRecords($where);
}
/**
* 获取 GoodsSpu 列表
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment