diff --git a/fw-hestia-common/src/main/java/cn/fw/hestia/common/constant/MessageStr.java b/fw-hestia-common/src/main/java/cn/fw/hestia/common/constant/MessageStr.java
new file mode 100644
index 0000000..3e43254
--- /dev/null
+++ b/fw-hestia-common/src/main/java/cn/fw/hestia/common/constant/MessageStr.java
@@ -0,0 +1,12 @@
+package cn.fw.hestia.common.constant;
+
+/**
+ * @author : kurisu
+ * @className : MessageStr
+ * @description : 返回的信息
+ * @date: 2020-08-13 10:09
+ */
+public interface MessageStr {
+ String QUERY_FAILURE = "查询失败";
+ String SAVE_FAILURE = "操作失败";
+}
diff --git a/fw-hestia-common/src/main/java/cn/fw/hestia/common/utils/CoordinateTransformUtil.java b/fw-hestia-common/src/main/java/cn/fw/hestia/common/utils/CoordinateTransformUtil.java
new file mode 100644
index 0000000..e8388b5
--- /dev/null
+++ b/fw-hestia-common/src/main/java/cn/fw/hestia/common/utils/CoordinateTransformUtil.java
@@ -0,0 +1,175 @@
+package cn.fw.hestia.common.utils;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
+/**
+ * 百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换的工具
+ *
+ * create at 2018-10-09
+ *
+ * @author kurisu
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class CoordinateTransformUtil {
+
+ // π
+ private static double PI = Math.PI;
+ private static double X_PI = PI * 3000.0 / 180.0;
+ // 长半轴
+ private static double A = 6378245.0;
+ // 扁率
+ private static double EE = 0.00669342162296594323;
+
+ /**
+ * 百度坐标系(BD-09)转WGS坐标
+ *
+ * @param lng 百度坐标纬度
+ * @param lat 百度坐标经度
+ * @return WGS84坐标数组
+ */
+ public static double[] bd09toWgs84(double lng, double lat) {
+ double[] gcj = bd09toGcj02(lng, lat);
+ return gcj02toWgs84(gcj[0], gcj[1]);
+ }
+
+ /**
+ * WGS坐标转百度坐标系(BD-09)
+ *
+ * @param lng WGS84坐标系的经度
+ * @param lat WGS84坐标系的纬度
+ * @return 百度坐标数组
+ */
+ public static double[] wgs84toBd09(double lng, double lat) {
+ double[] gcj = wgs84toGcj02(lng, lat);
+ return gcj02toBd09(gcj[0], gcj[1]);
+ }
+
+ /**
+ * 火星坐标系(GCJ-02)转百度坐标系(BD-09)
+ * 谷歌、高德——>百度
+ *
+ * @param lng 火星坐标经度
+ * @param lat 火星坐标纬度
+ * @return 百度坐标数组
+ */
+ public static double[] gcj02toBd09(double lng, double lat) {
+ double z = Math.sqrt(lng * lng + lat * lat) + 0.00002 * Math.sin(lat * X_PI);
+ double theta = Math.atan2(lat, lng) + 0.000003 * Math.cos(lng * X_PI);
+ double bd_lng = z * Math.cos(theta) + 0.0065;
+ double bd_lat = z * Math.sin(theta) + 0.006;
+ return new double[]{bd_lng, bd_lat};
+ }
+
+ /**
+ * 百度坐标系(BD-09)转火星坐标系(GCJ-02)
+ * 百度——>谷歌、高德
+ *
+ * @param bd_lon 百度坐标纬度
+ * @param bd_lat 百度坐标经度
+ * @return 火星坐标数组
+ */
+ public static double[] bd09toGcj02(double bd_lon, double bd_lat) {
+ double x = bd_lon - 0.0065;
+ double y = bd_lat - 0.006;
+ double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * X_PI);
+ double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * X_PI);
+ double gg_lng = z * Math.cos(theta);
+ double gg_lat = z * Math.sin(theta);
+ return new double[]{gg_lng, gg_lat};
+ }
+
+ /**
+ * WGS84转GCJ02(火星坐标系)
+ *
+ * @param lng WGS84坐标系的经度
+ * @param lat WGS84坐标系的纬度
+ * @return 火星坐标数组
+ */
+ public static double[] wgs84toGcj02(double lng, double lat) {
+ if (out_of_china(lng, lat)) {
+ return new double[]{lng, lat};
+ }
+ double dlat = transformLat(lng - 105.0, lat - 35.0);
+ double dlng = transformLng(lng - 105.0, lat - 35.0);
+ double radlat = lat / 180.0 * PI;
+ double magic = Math.sin(radlat);
+ magic = 1 - EE * magic * magic;
+ double sqrtmagic = Math.sqrt(magic);
+ dlat = (dlat * 180.0) / ((A * (1 - EE)) / (magic * sqrtmagic) * PI);
+ dlng = (dlng * 180.0) / (A / sqrtmagic * Math.cos(radlat) * PI);
+ double mglat = lat + dlat;
+ double mglng = lng + dlng;
+ return new double[]{mglng, mglat};
+ }
+
+ /**
+ * GCJ02(火星坐标系)转GPS84
+ *
+ * @param lng 火星坐标系的经度
+ * @param lat 火星坐标系纬度
+ * @return WGS84坐标数组
+ */
+ public static double[] gcj02toWgs84(double lng, double lat) {
+ if (out_of_china(lng, lat)) {
+ return new double[]{lng, lat};
+ }
+ double dlat = transformLat(lng - 105.0, lat - 35.0);
+ double dlng = transformLng(lng - 105.0, lat - 35.0);
+ double radlat = lat / 180.0 * PI;
+ double magic = Math.sin(radlat);
+ magic = 1 - EE * magic * magic;
+ double sqrtmagic = Math.sqrt(magic);
+ dlat = (dlat * 180.0) / ((A * (1 - EE)) / (magic * sqrtmagic) * PI);
+ dlng = (dlng * 180.0) / (A / sqrtmagic * Math.cos(radlat) * PI);
+ double mglat = lat + dlat;
+ double mglng = lng + dlng;
+ return new double[]{lng * 2 - mglng, lat * 2 - mglat};
+ }
+
+ /**
+ * 纬度转换
+ *
+ * @param lng 经度
+ * @param lat 纬度
+ * @return 纬度
+ */
+ public static double transformLat(double lng, double lat) {
+ double ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(lng));
+ ret += (20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0 / 3.0;
+ ret += (20.0 * Math.sin(lat * PI) + 40.0 * Math.sin(lat / 3.0 * PI)) * 2.0 / 3.0;
+ ret += (160.0 * Math.sin(lat / 12.0 * PI) + 320 * Math.sin(lat * PI / 30.0)) * 2.0 / 3.0;
+ return ret;
+ }
+
+ /**
+ * 经度转换
+ *
+ * @param lng 经度
+ * @param lat 纬度
+ * @return 经度
+ */
+ public static double transformLng(double lng, double lat) {
+ double ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng));
+ ret += (20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0 / 3.0;
+ ret += (20.0 * Math.sin(lng * PI) + 40.0 * Math.sin(lng / 3.0 * PI)) * 2.0 / 3.0;
+ ret += (150.0 * Math.sin(lng / 12.0 * PI) + 300.0 * Math.sin(lng / 30.0 * PI)) * 2.0 / 3.0;
+ return ret;
+ }
+
+ /**
+ * 判断是否在国内,不在国内不做偏移
+ *
+ * @param lng 经度
+ * @param lat 纬度
+ * @return 是否
+ */
+ public static boolean out_of_china(double lng, double lat) {
+ if (lng < 72.004 || lng > 137.8347) {
+ return true;
+ } else {
+ return lat < 0.8293 || lat > 55.8271;
+ }
+ }
+
+}
diff --git a/fw-hestia-common/src/main/java/cn/fw/hestia/common/utils/DateUtil.java b/fw-hestia-common/src/main/java/cn/fw/hestia/common/utils/DateUtil.java
new file mode 100644
index 0000000..42fb875
--- /dev/null
+++ b/fw-hestia-common/src/main/java/cn/fw/hestia/common/utils/DateUtil.java
@@ -0,0 +1,578 @@
+package cn.fw.hestia.common.utils;
+
+import java.sql.Timestamp;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.*;
+import java.time.temporal.TemporalAdjusters;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Objects;
+
+/**
+ * 日期处理工具
+ *
+ *
+ * @author kurisu
+ */
+public final class DateUtil {
+
+ static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+
+ /**
+ * 默认构造器
+ */
+ private DateUtil() {
+ throw new UnsupportedOperationException();
+ }
+
+
+ public static Date parse(String date) {
+ try {
+ return sdf.parse(date);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ /**
+ * 开始日期处理
+ */
+ public static Date startDate(final Date date) {
+ if (date == null) {
+ return null;
+ }
+ return localDateTime2Date(date2LocalDate(date).atStartOfDay());
+ }
+
+ /**
+ * 最结束日期处理
+ */
+ public static Date endDate(final Date date) {
+ if (date == null) {
+ return null;
+ }
+ return localDateTime2Date(date2LocalDate(date).plusDays(1).atStartOfDay());
+ }
+
+ /**
+ * 处理日期,保留年月日
+ */
+ public static LocalDate date2LocalDate(final Date date) {
+ if (date == null) {
+ return null;
+ }
+ return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()).toLocalDate();
+ }
+
+ public static LocalTime date2LocalTime(final Date date) {
+ if (date == null) {
+ return null;
+ }
+ return LocalTime.of(date.getHours(), date.getMinutes(), date.getSeconds());
+ }
+
+ public static LocalDateTime date2LocalDateTime(final Date date) {
+ Instant instant = date.toInstant();
+ ZoneId zoneId = ZoneId.systemDefault();
+ return instant.atZone(zoneId).toLocalDateTime();
+ }
+
+ /**
+ * convert LocalDateTime to Date
+ */
+ public static Date localDateTime2Date(final LocalDateTime dateTime) {
+ return Date.from(dateTime.atZone(ZoneId.systemDefault()).toInstant());
+ }
+
+ /**
+ * convert LocalDate to Date
+ */
+ public static Date localDate2Date(final LocalDate localDate) {
+ if (localDate == null) {
+ return null;
+ }
+ return Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
+ }
+
+ public static Date getBeginInTime(Date inTime) {
+ if (inTime == null) {
+ return null;
+ }
+ Calendar c = Calendar.getInstance();
+ c.setTime(inTime);
+ c.set(Calendar.HOUR_OF_DAY, 0);
+ c.set(Calendar.MINUTE, 0);
+ c.set(Calendar.SECOND, 0);
+ return c.getTime();
+ }
+
+ public static Date getEndInTime(Date inTime) {
+ if (inTime == null) {
+ return null;
+ }
+ Calendar c = Calendar.getInstance();
+ c.setTime(inTime);
+ c.set(Calendar.HOUR_OF_DAY, 23);
+ c.set(Calendar.MINUTE, 59);
+ c.set(Calendar.SECOND, 59);
+ return c.getTime();
+ }
+
+ /**
+ * 得到本周周一
+ *
+ * @return
+ */
+ public static Date getMondayOfThisWeek(Date inTime) {
+ Calendar c = Calendar.getInstance();
+ c.setTime(inTime);
+ int day_of_week = c.get(Calendar.DAY_OF_WEEK) - 1;
+ if (day_of_week == 0) {
+ day_of_week = 7;
+ }
+ c.add(Calendar.DATE, -day_of_week + 1);
+ return c.getTime();
+ }
+
+ /**
+ * 得到本周周日
+ *
+ * @return
+ */
+ public static Date getSundayOfThisWeek(Date inTime) {
+ Calendar c = Calendar.getInstance();
+ c.setTime(inTime);
+ int day_of_week = c.get(Calendar.DAY_OF_WEEK) - 1;
+ if (day_of_week == 0) {
+ day_of_week = 7;
+ }
+ c.add(Calendar.DATE, -day_of_week + 7);
+ return c.getTime();
+ }
+
+ /**
+ * 得到月初
+ *
+ * @return
+ */
+ public static Date getMonthFirstDay(Date inTime) {
+ Calendar c = Calendar.getInstance();
+ c.setTime(inTime);
+ c.add(Calendar.MONTH, 0);
+ c.set(Calendar.DAY_OF_MONTH, 1);
+ return c.getTime();
+ }
+
+ /**
+ * 获取当月月初时间
+ */
+ public static Date getMonthFirstDay() {
+ return DateUtil.localDate2Date(LocalDateTime.now()
+ .with(TemporalAdjusters.firstDayOfMonth()).toLocalDate());
+ }
+
+ /**
+ * 得到月末
+ *
+ * @return
+ */
+ public static Date getMonthEndDay(Date inTime) {
+ Calendar c = Calendar.getInstance();
+ c.setTime(inTime);
+ c.add(Calendar.MONTH, 1);
+ c.set(Calendar.DAY_OF_MONTH, 0);
+ return c.getTime();
+ }
+
+ /**
+ * 得到月末
+ *
+ * @return
+ */
+ public static Date getMonthEndDay() {
+ return DateUtil.localDate2Date(LocalDateTime.now()
+ .with(TemporalAdjusters.lastDayOfMonth()).toLocalDate());
+ }
+
+ /**
+ * 得到年初
+ *
+ * @return
+ */
+ public static Date getYearFirstDay(Date inTime) {
+ Calendar c = Calendar.getInstance();
+ c.setTime(inTime);
+ int x = c.get(Calendar.YEAR);
+ try {
+ return sdf.parse(x + "-01" + "-01");
+ } catch (Exception e) {
+
+ }
+ return null;
+ }
+
+ /**
+ * 得到年末
+ *
+ * @return
+ */
+ public static Date getYearEndDay(Date inTime) {
+ Calendar c = Calendar.getInstance();
+ c.setTime(inTime);
+ int x = c.get(Calendar.YEAR);
+ try {
+ return sdf.parse(x + "-12" + "-31");
+ } catch (Exception e) {
+
+ }
+ return null;
+ }
+
+ public static Date getThisHourStartTime(Date time) {
+ final LocalDateTime thisHourStart = LocalDateTime.of(DateUtil.date2LocalDateTime(time).getYear(),
+ DateUtil.date2LocalDateTime(time).getMonth(),
+ DateUtil.date2LocalDateTime(time).getDayOfMonth(),
+ DateUtil.date2LocalDateTime(time).getHour(),
+ 0, 0);
+ return DateUtil.localDateTime2Date(thisHourStart);
+ }
+
+ public static Date getThisHourEndTime(Date time) {
+ final LocalDateTime thisHourEnd = LocalDateTime.of(DateUtil.date2LocalDateTime(time).getYear(),
+ DateUtil.date2LocalDateTime(time).getMonth(),
+ DateUtil.date2LocalDateTime(time).getDayOfMonth(),
+ DateUtil.date2LocalDateTime(time).getHour(),
+ 59, 59);
+ return DateUtil.localDateTime2Date(thisHourEnd);
+ }
+
+ /**
+ * 获取当天起始时间
+ *
+ * @return 当天起始时间
+ */
+ public static Date getCurrentDayStartTime() {
+ LocalDateTime now = LocalDateTime.now();
+ LocalDateTime start = LocalDateTime.of(now.getYear(), now.getMonth(), now.getDayOfMonth(), 0, 0, 0);
+ ZoneId zone = ZoneId.systemDefault();
+ Instant instant = start.atZone(zone).toInstant();
+ return Date.from(instant);
+ }
+
+ /**
+ * 获取当天结束时间
+ *
+ * @return 当天结束时间
+ */
+ public static Date getCurrentDayEndTime() {
+ LocalDateTime now = LocalDateTime.now();
+ LocalDateTime end = LocalDateTime.of(now.getYear(), now.getMonth(), now.getDayOfMonth(), 23, 59, 59);
+ ZoneId zone = ZoneId.systemDefault();
+ Instant instant = end.atZone(zone).toInstant();
+ return Date.from(instant);
+ }
+
+
+ /**
+ * 获取短时间字符串
+ *
+ * @param date 需要转换格式的日期
+ * @return 返回短时间字符串格式 yyyy-MM-dd
+ */
+ public static String getStringDateShort(Date date) {
+ if (date == null) {
+ return null;
+ }
+ String dateString = sdf.format(date);
+ return dateString;
+ }
+
+ /**
+ * 获取时间字符串
+ *
+ * @param date 需要转换格式的日期
+ * @return 返回短时间字符串格式 yyyy-MM-dd HH:mm:ss
+ */
+ public static String getFullDateString(Date date) {
+ if (date == null) {
+ return "";
+ }
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ return format.format(date);
+ }
+
+ /**
+ * 获取时间字符串
+ *
+ * @param date 需要转换格式的日期
+ * @return 返回短时间字符串格式 yyyy-MM
+ */
+ public static String getMonthString(Date date) {
+ if (date == null) {
+ return "";
+ }
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM");
+ return format.format(date);
+ }
+
+ /**
+ * 获取时间字符串
+ *
+ * @param date 需要转换格式的日期
+ * @param pattern 时间字符串格式
+ * @return 返回时间字符串
+ */
+ public static String getFormatString(Date date, String pattern) {
+ if (date == null) {
+ return "";
+ }
+ SimpleDateFormat format = new SimpleDateFormat(pattern);
+ return format.format(date);
+ }
+
+ /**
+ * 获取下月月初时间
+ */
+ public static Date getNextMonthStartTime() {
+ return DateUtil.localDate2Date(LocalDateTime.now()
+ .with(TemporalAdjusters.lastDayOfMonth()).plusDays(1L).toLocalDate());
+ }
+
+ /**
+ * @param offsetYear
+ * @return 当前时间 + offsetYear
+ */
+ public static Timestamp getNowExpiredYear(int offsetYear) {
+ Calendar now = Calendar.getInstance();
+ now.add(Calendar.YEAR, offsetYear);
+ return new Timestamp(now.getTime().getTime());
+ }
+
+ /**
+ * @param offset
+ * @return 当前时间 + offsetMonth
+ */
+ public static Timestamp getNowExpiredMonth(int offset) {
+ Calendar now = Calendar.getInstance();
+ now.add(Calendar.MONTH, offset);
+ return new Timestamp(now.getTime().getTime());
+ }
+
+ /**
+ * @param offset
+ * @return 当前时间 + offsetDay
+ */
+ public static Timestamp getNowExpiredDay(int offset) {
+ Calendar now = Calendar.getInstance();
+ now.add(Calendar.DATE, offset);
+ return new Timestamp(now.getTime().getTime());
+ }
+
+ /**
+ * @param offset
+ * @return 当前时间 + offsetDay
+ */
+ public static Timestamp getNowExpiredHour(int offset) {
+ Calendar now = Calendar.getInstance();
+ now.add(Calendar.HOUR, offset);
+ return new Timestamp(now.getTime().getTime());
+ }
+
+ /**
+ * @param offsetSecond
+ * @return 当前时间 + offsetSecond
+ */
+ public static Timestamp getNowExpiredSecond(int offsetSecond) {
+ Calendar now = Calendar.getInstance();
+ now.add(Calendar.SECOND, offsetSecond);
+ return new Timestamp(now.getTime().getTime());
+ }
+
+ /**
+ * @param offset
+ * @return 当前时间 + offset
+ */
+ public static Timestamp getNowExpiredMinute(int offset) {
+ Calendar now = Calendar.getInstance();
+ now.add(Calendar.MINUTE, offset);
+ return new Timestamp(now.getTime().getTime());
+ }
+
+ /**
+ * @param offset
+ * @return 指定时间 + offsetDay
+ */
+ public static Timestamp getExpiredDay(Date givenDate, int offset) {
+ Calendar date = Calendar.getInstance();
+ date.setTime(givenDate);
+ date.add(Calendar.DATE, offset);
+ return new Timestamp(date.getTime().getTime());
+ }
+
+ /**
+ * 实现ORACLE中ADD_MONTHS函数功能
+ *
+ * @param offset
+ * @return 指定时间 + offsetMonth
+ */
+ public static Timestamp getExpiredMonth(Date givenDate, int offset) {
+ Calendar date = Calendar.getInstance();
+ date.setTime(givenDate);
+ date.add(Calendar.MONTH, offset);
+ return new Timestamp(date.getTime().getTime());
+ }
+
+ /**
+ * @param
+ * @return 指定时间 + offsetYear
+ */
+ public static Timestamp getExpiredYear(Date givenDate, int offsetYear) {
+ Calendar date = Calendar.getInstance();
+ date.setTime(givenDate);
+ date.add(Calendar.YEAR, offsetYear);
+ return new Timestamp(date.getTime().getTime());
+ }
+
+ /**
+ * @param second
+ * @return 指定时间 + offsetSecond
+ */
+ public static Timestamp getExpiredSecond(Date givenDate, int second) {
+ Calendar date = Calendar.getInstance();
+ date.setTime(givenDate);
+ date.add(Calendar.SECOND, second);
+ return new Timestamp(date.getTime().getTime());
+ }
+
+ /**
+ * 计算时间差
+ *
+ * @param givenDate 日期
+ * @param offset 2
+ * @param type 日期字段类型
+ * @return
+ */
+ public static Timestamp getExpired(Date givenDate, int offset, Integer type) {
+ Calendar date = Calendar.getInstance();
+ date.setTime(givenDate);
+ date.add(type, offset);
+ return new Timestamp(date.getTime().getTime());
+ }
+
+ /**
+ * 计算日期差
+ *
+ * @param d1 开始日期
+ * @param d2 截止日期
+ * @param type 类型
+ * @return 计算结果
+ */
+ public static Integer sub(Date d1, Date d2, String type) {
+ if (d1 == null || d2 == null) {
+ return null;
+ }
+ long result = 0L;
+ long DAY = 24 * 60 * 60 * 1000;
+ long sub = d1.getTime() - d2.getTime();
+ long daysub = (sub / DAY);
+ long y1 = d1.getYear(), y2 = d2.getYear();
+ long m1 = d1.getMonth(), m2 = d2.getMonth();
+ long monthsub = (y1 - y2) * 12 + (m1 - m2);
+ //月
+ if ("m".equals(type)) {
+ result = monthsub;
+ //年
+ } else if ("y".equals(type)) {
+ result = monthsub / 12;
+ //天
+ } else if ("d".equals(type)) {
+ result = daysub;
+ }
+ return (int) result;
+ }
+
+ /**
+ * 判断是否是凌晨
+ *
+ * @param date
+ * @return
+ */
+ public static boolean isBeforeDawn(Date date) {
+ if (Objects.isNull(date)) {
+ return false;
+ }
+ LocalDateTime dateTime = date2LocalDateTime(date);
+ SimpleDateFormat df = new SimpleDateFormat("HH");
+ String str = df.format(localDateTime2Date(dateTime));
+ int a = Integer.parseInt(str);
+ return a >= 0 && a <= 6;
+ }
+
+ /**
+ * 判断是否是上午
+ *
+ * @param date
+ * @return
+ */
+ public static boolean isMorning(Date date) {
+ if (Objects.isNull(date)) {
+ return false;
+ }
+ LocalDateTime dateTime = date2LocalDateTime(date);
+ SimpleDateFormat df = new SimpleDateFormat("HH");
+ String str = df.format(localDateTime2Date(dateTime));
+ int a = Integer.parseInt(str);
+ return a > 6 && a <= 12;
+ }
+
+ /**
+ * 判断是否是下午
+ *
+ * @param date
+ * @return
+ */
+ public static boolean isAfternoon(Date date) {
+ if (Objects.isNull(date)) {
+ return false;
+ }
+ LocalDateTime dateTime = date2LocalDateTime(date);
+ SimpleDateFormat df = new SimpleDateFormat("HH");
+ String str = df.format(localDateTime2Date(dateTime));
+ int a = Integer.parseInt(str);
+ return a > 12 && a <= 18;
+ }
+
+ /**
+ * 判断是否是晚上
+ *
+ * @param date
+ * @return
+ */
+ public static boolean isEvening(Date date) {
+ if (Objects.isNull(date)) {
+ return false;
+ }
+ LocalDateTime dateTime = date2LocalDateTime(date);
+ SimpleDateFormat df = new SimpleDateFormat("HH");
+ String str = df.format(localDateTime2Date(dateTime));
+ int a = Integer.parseInt(str);
+ return a > 18 && a <= 23;
+ }
+
+ public static void main(String[] args) throws ParseException {
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ Date date = format.parse("2020-09-19 15:45:30");
+
+ Timestamp expired = DateUtil.getExpired(date, 3, Calendar.DATE);
+ if (!isBeforeDawn(expired)) {
+ expired = getExpired(startDate(expired), 1, Calendar.DATE);
+ System.out.println(expired);
+ }
+ System.out.println(getEndInTime(getMonthEndDay()));
+ System.out.println(expired);
+ System.out.println(startDate(DateUtil.getMonthFirstDay(date)));
+ ;
+ }
+}
diff --git a/fw-hestia-common/src/main/java/cn/fw/hestia/common/utils/MessageFormatUtil.java b/fw-hestia-common/src/main/java/cn/fw/hestia/common/utils/MessageFormatUtil.java
new file mode 100644
index 0000000..f99c0d0
--- /dev/null
+++ b/fw-hestia-common/src/main/java/cn/fw/hestia/common/utils/MessageFormatUtil.java
@@ -0,0 +1,31 @@
+package cn.fw.hestia.common.utils;
+
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author kurisu
+ * @description 占位符转换工具
+ * @date 2019/5/30.
+ */
+public class MessageFormatUtil {
+
+ public static String MessageFormatTransfer(String pattern, Object... arguments) {
+ List