code review:积分、优惠劵、佣金等逻辑

This commit is contained in:
YunaiV
2023-10-01 23:31:07 +08:00
parent 057952bdeb
commit d4417d2474
27 changed files with 47 additions and 74 deletions

View File

@ -146,9 +146,7 @@ public class LocalDateTimeUtils {
* @return 月份的开始时间
*/
public static LocalDateTime beginOfMonth(LocalDateTime date) {
return date
.with(TemporalAdjusters.firstDayOfMonth())
.with(LocalTime.MIN);
return date.with(TemporalAdjusters.firstDayOfMonth()).with(LocalTime.MIN);
}
/**
@ -159,8 +157,7 @@ public class LocalDateTimeUtils {
* @return 月份的结束时间
*/
public static LocalDateTime endOfMonth(LocalDateTime date) {
return date
.with(TemporalAdjusters.lastDayOfMonth())
.with(LocalTime.MAX);
return date.with(TemporalAdjusters.lastDayOfMonth()).with(LocalTime.MAX);
}
}