package org.yeshi.utils.statistic; /** * @author hxh * @title: StatisticSpan * @description: 统计的时间粒度 * @date 2021/11/18 18:21 */ public enum StatisticTimeSpan { minute("%Y-%m-%d %H %i", "yyyy-MM-dd HH mm"), hour("%Y-%m-%d %H", "yyyy-MM-dd HH"), day("%Y-%m-%d", "yyyy-MM-dd"), month("%Y-%m", "yyyy-MM"), year("%Y", "yyyy"); private String sqlTimeFormat; private String localTimeFormat; private StatisticTimeSpan(String sqlTimeFormat, String localTimeFormat) { this.sqlTimeFormat = sqlTimeFormat; this.localTimeFormat = localTimeFormat; } public String getSqlTimeFormat() { return sqlTimeFormat; } public String getLocalTimeFormat() { return localTimeFormat; } }