123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- package com.kmall.admin.haikong.constant;
- import java.util.Arrays;
- /**
- * 常量类
- * @author lhm
- * @createDate 2021-10-30
- */
- public class Constants {
- public static final String MEMBER_SYS_ACCESS_TOKEN_REDIS_KEY = "haikong_memberSys_accessToken";
- public static final String MEMBER_SYS_REFRESH_TOKEN_REDIS_KEY = "haikong_memberSys_refreshToken";
- /**
- * 活动主题枚举
- */
- public enum ActivityTopicEnum {
- /**
- * 满赠活动
- */
- MZ("mz", "满赠", 3),
- /**
- * 限时特价活动
- */
- LSCX("lscx", "限时特价", 1),
- /**
- * 优惠券活动
- */
- YHQ("yhq", "优惠券", 5)
- ;
- private final String topicCode;
- private final String topicName;
- private final Integer priority;
- ActivityTopicEnum(String topicCode, String topicName, Integer priority) {
- this.topicCode = topicCode;
- this.topicName = topicName;
- this.priority = priority;
- }
- public String getTopicCode() {
- return topicCode;
- }
- public String getTopicName() {
- return topicName;
- }
- public Integer getPriority() {
- return priority;
- }
- }
- /**
- * 活动类型
- */
- public enum ActivityType {
- /**
- * 按品牌参加活动
- */
- BRAND("0", "商品品牌"),
- /**
- * 按分类参加活动
- */
- CATEGORY("1", "商品分类"),
- /**
- * 按单个商品参加活动
- */
- PRODUCT("2", "商品")
- ;
- private final String activityTypeCode;
- private final String activityType;
- ActivityType(String activityTypeCode, String activityType) {
- this.activityTypeCode = activityTypeCode;
- this.activityType = activityType;
- }
- public String getActivityTypeCode() {
- return activityTypeCode;
- }
- public String getActivityType() {
- return activityType;
- }
- public static ActivityType customValueOf(String val) {
- for (ActivityType value : ActivityType.values()) {
- if (val.equals(value.getActivityTypeCode())) {
- return value;
- }
- }
- return null;
- }
- }
- }
|