package org.springblade.gateway.active_gateway.constant;

import org.apache.commons.lang3.ObjectUtils;

/**
 * @Author: Silent
 * @Description
 * @Date: Created in 13:45 2021/11/10
 * @Modified By:
 */
public interface ActiveNoticeConstant {
	/**
	 * 活动通知缓存key
	 */
	String ACTIVE_NOTICE_CACHE_KEY = "SING:ACTIVE_NOTICE";

	/**
	 * 获取活动通知缓存
	 * @param activeId
	 * @return
	 */
	static String getActiveNoticeCache(Long activeId){
		StringBuilder stringBuilder = new StringBuilder(ACTIVE_NOTICE_CACHE_KEY).append(":");
		if(ObjectUtils.isNotEmpty(activeId)){
			stringBuilder.append(activeId);
		}
		return stringBuilder.toString();
	}
}
