Compare commits

...

2 Commits

Author SHA1 Message Date
李一帆 a868168463 fix(sms):修正重置标记逻辑以避免不必要的更新
- 在重置生日发送标记时添加条件判断
- 在重置节假日发送标记时添加条件判断
- 避免将未设置标记的数据错误地更新为0
2025-09-29 09:16:46 +08:00
李一帆 dcb0107fa6 fix(sms): 调整定时任务执行时间避免冲突
- 将生日短信发送标志重置时间从0点调整为0点1分
- 将节假日短信发送标志重置时间从0点调整为0点1分
- 避免两个定时任务在同一时间点执行可能产生的资源竞争
2025-09-29 09:14:34 +08:00
3 changed files with 6 additions and 6 deletions

View File

@ -11,9 +11,9 @@ import org.apache.ibatis.annotations.Update;
* @since 2025-09-23
*/
public interface SmsSpecialistMapper extends BaseMapper<SmsSpecialist> {
@Update("update specialist set flag_birthday_sent_today = 0")
@Update("update specialist set flag_birthday_sent_today = 0 where flag_birthday_sent_today = 1")
void resetFlagBirthdaySentToday();
@Update("update specialist set flag_holiday_sent_today = 0")
@Update("update specialist set flag_holiday_sent_today = 0 where flag_holiday_sent_today = 1")
void resetFlagHolidaySentToday();
}

View File

@ -187,9 +187,9 @@ public class SmsBirthdayServiceImpl extends ServiceImpl<SmsBirthdayMapper, SmsBi
}
/**
* 0flagBirthdaySentToday0
* 01flagBirthdaySentToday0
*/
@Scheduled(cron = "0 0 0 * * ?")
@Scheduled(cron = "1 0 0 * * ?")
public void resetFlagBirthdaySentToday() {
specialistMapper.resetFlagBirthdaySentToday();
}

View File

@ -271,9 +271,9 @@ public class SmsHolidayServiceImpl extends ServiceImpl<SmsHolidayMapper, SmsHoli
}
/**
* 0flagHolidaySentToday0
* 01flagHolidaySentToday0
*/
@Scheduled(cron = "0 0 0 * * ?")
@Scheduled(cron = "1 0 0 * * ?")
public void resetFlagHolidaySentToday() {
specialistMapper.resetFlagHolidaySentToday();
}