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

import com.alibaba.fastjson2.JSON;
import com.moyuer.cloud.delivery.dto.TransportDTO;
import com.moyuer.cloud.delivery.vo.TransportVO;
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 lpj
 */
public class PlatformTransportApi {
    public static void platformAddTransport(TransportDTO transportDTO){
        String url = Constant.API_URL + "/tmerclub_order/mp/transport";
        HttpUtil.post(url,transportDTO, UrlEnum.PLATFORM);
    }

    public static List<TransportVO> platformInfoTransport(){
        String url = Constant.API_URL + "/tmerclub_order/mp/transport/page?pageSize=10&pageNum=1&transName=";
        return JSON.parseArray(HttpUtil.gets(url,UrlEnum.PLATFORM), TransportVO.class);
    }
}
