package com.kmall.admin.controller;

import com.kmall.admin.entity.WxOrderEntity;
import com.kmall.common.utils.ResponseData;
import com.kmall.common.utils.JacksonUtils;
import com.kmall.common.utils.OkHttpUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author zengjunlin
 * @version 1.0
 * 2019-11-07 14:37
 */
public class test {
    public static void main(String[] args) {

        Map map = new HashMap();
//        map.put("data", '1');
//        String requestData = JacksonUtil.toJson(map);
        String url = "http://192.168.1.68:8888/wx/wxOrderResendQueryAll ";
        // 同步访问,返回结果字符串
        String response = OkHttpUtils.post(map, url, "SSL");
        ResponseData responseData = JacksonUtils.fromStringJson(response, ResponseData.class);
        System.out.println(response);
        System.out.println(responseData.getCode());
        System.out.println(responseData.getMsg());
        System.out.println(responseData.getData().getRows().size());
        if(responseData.getCode().equalsIgnoreCase("0")){
            List<WxOrderEntity> list = responseData.getData().getRows();
            System.out.println(list);
        }
    }
}
