1. 程式人生 > >kuai100物流資訊查詢介面

kuai100物流資訊查詢介面

可以自定義物流列舉:

/***
 * @Description 自定義列舉
 */
public enum  LogisticsCompany {
    SF("順豐", 1, "shunfeng"),
    ZT("中通", 2, "zhongtong"),
    ST("申通", 3, "shentong"),
    YT("圓通", 4, "yuantong"),
    HT("匯通", 5, "huitongkuaidi"),
    YD("韻達", 6, "yunda"),
    YZ("郵政包裹/平郵", 7, "youzhengguonei"),
    EMS("EMS", 8, "ems"),
    TT("天天", 9, "tiantian"),
    DB("德邦", 10, "debangwuliu");

    private String name;
    private int value;
    private String type;

    private LogisticsCompany(String name, int value, String type){
        this.name = name;
        this.value = value;
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}

效果圖: 在這裡插入圖片描述