时间精度问题

This commit is contained in:
2025-09-26 14:32:38 +08:00
parent 25a7ac1f68
commit 59a779b5b8
3 changed files with 4 additions and 6 deletions

View File

@@ -177,7 +177,7 @@ public class MkShopCouponRecordServiceImpl extends ServiceImpl<MkShopCouponRecor
if (coupon.getDaysToTakeEffect() != null && coupon.getDaysToTakeEffect() > 0) {
start = LocalDateTimeUtil.offset(start, coupon.getDaysToTakeEffect(), ChronoUnit.DAYS).with(LocalTime.MIN);
}
end = LocalDateTimeUtil.offset(start, coupon.getValidDays(), ChronoUnit.DAYS).with(LocalTime.MAX);
end = LocalDateTimeUtil.offset(start, coupon.getValidDays(), ChronoUnit.DAYS).with(LocalTime.MAX).truncatedTo(ChronoUnit.SECONDS);
} else if ("custom".equals(coupon.getValidType())) {
//自定义时间
start = coupon.getValidStartTime();