package com.tmerclub.cloud.systemtest.api.store;


import com.alibaba.fastjson2.JSON;
import com.tmerclub.cloud.common.product.vo.SkuVO;
import com.moyuer.cloud.systemtest.constants.Constant;
import com.moyuer.cloud.systemtest.util.HttpUtil;
import com.moyuer.cloud.systemtest.util.UrlEnum;

import java.util.List;

/**
 * @author Tu
 */
public class SkuApi {
    public static List<SkuVO> getAllSkuList(Long prodId){
        String url = Constant.API_URL + "/tmerclub_product/m/sku/get_all_skuList?prodId="+prodId;
        List list = HttpUtil.get(url, List.class, UrlEnum.SHOP);
        List<SkuVO> skuList = JSON.parseArray(JSON.toJSONString(list), SkuVO.class);
        return skuList;
    }
}
