GlobalStatus.java 2.56 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 UserStatusEnum {
        /**
         * 微信登录
         */
        WX_LOGIN(1, "微信登录"),
        /**
         * 普通登录
         */
        NORMAL_LOGIN(0, "普通登录"),
        NORMAL_USER(0, "普通用户"),
        DRIVER_USER(1, "驾驶员用户");

        private Integer status;
        private String description;

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

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

        UserStatusEnum(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, "新订单"),
        HANDLE_ORDER(1, "被接单"),
        ACTIVE_ORDER(2, "处理中"),
        SUCCESS_ORDER(3, "完成订单"),
        FAIL_ORDER(4, "订单处理失败"),
        CANCEL_FLAG_NO(0,"未取消订单"),
        IMAGE_TYPE_CURRENT(0,"现场图片"),
        IMAGE_TYPE_PUT_ON(1,"装车图片"),
        IMAGE_TYPE_PUT_DOWN(2,"卸车图片");

        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;
        }
    }
}