All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.binarywang.wx.miniapp.bean.express.result.WxMaExpressOrderInfoResult Maven / Gradle / Ivy

There is a newer version: 4.6.7.B
Show newest version
package cn.binarywang.wx.miniapp.bean.express.result;

import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.common.util.json.GsonParser;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 
 * 运单信息返回结果对象
 * 
* @author xiaoyu * @since 2019-11-26 */ @Data @NoArgsConstructor @AllArgsConstructor public class WxMaExpressOrderInfoResult extends WxMaExpressInfoResult implements Serializable { private static final long serialVersionUID = -9166603059965942285L; /** * 订单ID */ @SerializedName("order_id") private String orderId; /** * 运单ID */ @SerializedName("waybill_id") private String waybillId; /** * 运单 html 的 BASE64 结果 */ @SerializedName("print_html") private String printHtml; /** * 运单信息 */ @SerializedName("waybill_data") private List> waybillData; public static WxMaExpressOrderInfoResult fromJson(String json) { return WxMaGsonBuilder.create().fromJson(json, WxMaExpressOrderInfoResult.class); } public static List toList(String json) { JsonObject jsonObject = GsonParser.parse(json); return WxMaGsonBuilder.create().fromJson(jsonObject.get("order_list").toString(), new TypeToken>() { }.getType()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy