DracConstant.java 5.38 KB
package cn.com.glsx.entmicro.constants;

import lombok.Getter;

/**
 * @author wangxw
 * @version 1.0.0
 * @ClassName constants.java
 * @description: 引流获客-常量值
 * @createTime 2021年11月10日 16:42:00
 */
public class DracConstant {

    /**
     * 欢迎语素材类型
     */
    public static class AttType {
        public static final Integer TEXT = 1;
        public static final Integer IMAGE = 2;
        public static final Integer VEDIO = 3;
        public static final Integer URI = 4;
        public static final Integer MINIPROGRAM = 5;
        public static final Integer FILE = 6;
        public static final Integer ACTIVITY = 7;
    }

    /**
     * 欢迎语素材类型
     */
    public static class QyAttType {
        public static final String TEXT = "text";
        public static final String IMAGE = "image";
        public static final String VEDIO = "video";
        public static final String URI = "link";
        public static final String MINIPROGRAM = "miniprogram";
        public static final String FILE = "file";
        public static final String ACTIVITY = "activity";
    }

    /**
     * 数据删除状态
     */
    public static class DelFlag {
        public static final Byte OK = 0;
        public static final Byte DEL = -1;
    }

    /**
     * 模板可用状态
     */
    public static class TemplateStatus {
        public static final Byte OK = 1;
        public static final Byte FORBIDDEN = 2;
    }

    /**
     * 欢迎语desc配置
     */
    public static class WelcomeDesc {

        /**
         * 一客一群
         */
        public static final String ONEGROUP = "ONE_GROUP";

        /**
         * 客户群发
         */
        public static final String MASS = "MASS_GROUP";

        /**
         * 活码
         */
        public static final String CODE = "CODE_GROUP";

        /**
         * 营销
         */
        public static final String DRAC = "DRAC";

        /**
         * 朋友圈
         */
        public static final String MOMENT = "MOMENT";

        /**
         * 轻改运营专家
         */
        public static final String OPERATION = "OPERATION";

        /**
         * 活动配置
         */
        public static final String ACTIVITY = "ACTIVITY";

        /**
         * 道路救援卡
         */
        public static final String RESCUE = "RESCUE";

        /**
         * AI智能外呼
         */
        public static final String OUTBOUND = "OUT_BOUND";

        /**
         * 智能名片
         */
        public static final String BUSINESS_CARD = "BUSINESS_CARD";

        /**
         * 高级群发api朋友圈群发
         */
        public static final String BATCH_MOMENT = "BATCH_MOMENT";

        /**
         * 企微高级群发api消息群发
         */
        public static final String BATCH_MESSAGING = "BATCH_MESSAGING";

        /**
         * 入群欢迎语
         */
        public static final String CHAT_GROUP_WELCOME_MESSAGE = "CHAT_GROUP_WELCOME_MESSAGE";

    }

    /**
     * 客户群发状态:-1创建失败 0创建成功 1发送成功 2发送失败 3待发送
     */
    public static class MassStatus {
        public static final Byte FAILURE = -1;
        public static final Byte SUCCESS = 0;
        public static final Byte SENDER = 1;
        public static final Byte SEND_FAILURE = 2;
        public static final Byte UNSEND = 3;
    }

    /**
     * 客户群发状态:-1创建失败 0创建成功 1发送成功 2发送失败
     */
    public static class MassSenderStatus {
        /**
         * 未发送
         */
        public static final Integer UN_SENDER = 0;

        /**
         * 已发送
         */
        public static final Integer SENDER = 1;

        /**
         * 不是好友 - 发送失败
         */
        public static final Integer FAILURE_SENDER = 2;

        /**
         * 已经接收 - 发送失败
         */
        public static final Integer FAILURE_RECIVER = 3;
    }

    /**
     * 营销活动类型
     * 1优惠券,2权益试用,3服务套餐,4活码
     */
    public static class WelcomeActivity {
        public static final Integer COUPON = 1;
        public static final Integer EQUITY = 2;
        public static final Integer SERVICE_PACKAGE = 3;
        public static final Integer QY_CODE = 4;
    }


    @Getter
    public enum EquityType {
        BOUTIQUE_COUPON(1, "精品券"),
        MALL_COUPON(2, "商城券"),
        CARD_TRIAL(3, "权益卡试用"),
        CARD_PACKAGE(4, "权益套餐"),
        SECKILL_ACTIVITY(5, "秒杀活动"),
        EXCLUSIVE_EQUITY(6, "无忧车主专属权益"),
        SURVEY_QUESTIONNAIRE(7, "调查问卷"),
        STRATEGY(9, "攻略"),
        GROUP_CHAIN(10, "群接龙"),
        RED_PACKET_ACTIVITY(11, "红包活动");

        private int code;
        private String description;

        EquityType(int code, String description) {
            this.code = code;
            this.description = description;
        }

        public int getCode() {
            return code;
        }

        public String getDescription() {
            return description;
        }

        public static EquityType fromCode(int code) {
            for (EquityType type : values()) {
                if (type.code == code) {
                    return type;
                }
            }
            throw new IllegalArgumentException("Invalid EquityType code: " + code);
        }

    }
}