GlobalStatus.java 2.79 KB
package com.trash.garbage.global;

/**
 * 全局状态管理
 *
 * @author guzijian
 */
public class GlobalStatus {
    /**
     * 未注销
     */
    public static final int DEL_FLAG_NO = 0;
    /**
     * 已注销
     */
    public static final int DEL_FLAG_YES = 1;

    /**
     * 地址查询类型  当前地址
     */
    public static final String QUERY_ADDRESS_TYPE_CURRENT = "CURRENT";
    /**
     * 地址查询类型 所有
     */
    public static final String QUERY_ADDRESS_TYPE_ALL = "ALL";

    /**
     * 用户状态管理
     */
    public enum GarUserStatusEnum {
        /**
         * 微信登录
         */
        WX_LOGIN(1, "微信登录"),
        /**
         * 普通登录
         */
        NORMAL_LOGIN(0, "普通登录"),
        NORMAL_USER(0, "居民用户"),
        DRIVER_USER(1, "管理负责人");

        private Integer status;
        private String description;

        public Integer getStatus() {
            return this.status;
        }

        public String getDescription() {
            return this.description;
        }

        GarUserStatusEnum(Integer status, String description) {
            this.status = status;
            this.description = description;
        }
    }

    /**
     * 地址
     */
    public enum GarAddressStatus {
        NORMAL_ADDRESS(0, "地址"),
        CURRENT_ADDRESS(1, "当前地址");

        GarAddressStatus(Integer status, String description) {
            this.status = status;
            this.description = description;
        }

        private String description;
        private Integer status;

        public Integer getValue() {
            return this.status;
        }

        public String getDescription() {
            return this.description;
        }
    }

    /**
     * 订单
     */
    public enum GarOrderStatus {
        NEW_ORDER(0, "新订单"),
        ACTIVE_ORDER(1, "处理中"),
        ALL_ORDER(2, "全部订单"),
        SUCCESS_ORDER(3, "已完成"),
        FAIL_ORDER(9, "订单处理失败"),
        CANCEL_FLAG_NO(0, "未取消订单"),
        CANCEL_FLAG_YES(1, "取消订单"),
        IMAGE_TYPE_CURRENT(0, "现场图片"),
        IMAGE_TYPE_PUT_ON(1, "装车图片"),
        IMAGE_TYPE_PUT_DOWN(2, "卸车图片"),
        EVALUATE_TYPE_COMPANY(0,"对公司评价"),
        EVALUATE_TYPE_USER(1,"对用户评价"),
        EVALUATE_ORDER_NO(0,"待评价"),
        EVALUATE_ORDER_YES(1,"已评价");

        GarOrderStatus(Integer status, String description) {
            this.status = status;
            this.description = description;
        }

        private String description;
        private Integer status;

        public Integer getValue() {
            return this.status;
        }

        public String getDescription() {
            return this.description;
        }
    }
}