fix:短信验证码的每日发送条数不正确

This commit is contained in:
YunaiV
2022-07-29 00:56:17 +08:00
parent 8a6c48f236
commit e5a7b8474f
3 changed files with 23 additions and 6 deletions

View File

@ -1,5 +1,7 @@
package cn.iocoder.yudao.framework.common.util.date;
import cn.hutool.core.date.DateUtil;
import java.time.Duration;
import java.util.Calendar;
import java.util.Date;
@ -120,4 +122,17 @@ public class DateUtils {
return c.getTime();
}
/**
* 是否今天
*
* @param date 日期
* @return 是否
*/
public static boolean isToday(Date date) {
if (date == null) {
return false;
}
return DateUtil.isSameDay(date, new Date());
}
}