|
|
|
@ -68,6 +68,10 @@ public class JSmartRemindersServiceImpl extends ServiceImpl<JSmartRemindersMappe
|
|
|
|
|
if (jSmartReminders.getAlertManner() == 2) {
|
|
|
|
|
throw new ServiceException("不可新增不定期提醒!");
|
|
|
|
|
}
|
|
|
|
|
LocalDateTime nt = LocalDateTime.now().plusMinutes(5);
|
|
|
|
|
if(jSmartRemindersDq.getAlertTime().isBefore(nt)){
|
|
|
|
|
throw new ServiceException("提醒时间必须在当前时间5分钟后!");
|
|
|
|
|
}
|
|
|
|
|
save(jSmartReminders);
|
|
|
|
|
updateAndAdd(jSmartReminders, true);
|
|
|
|
|
return jSmartReminders.getId();
|
|
|
|
|