提交 3f1dc15e 作者: 洪东保

每天清空三个月前的会议记录-日志

父级 f2b10133
......@@ -368,7 +368,10 @@ public class CmeetingJob {
*/
@Scheduled(cron = "0 30 0 * * ? ")
public void deleteDataAfterThan3Months() {
meetingInfoService.deleteDataAfterThan3Months(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
String date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
log.info("删除3个月前的数据开始,开始时间: {}", date);
int count = meetingInfoService.deleteDataAfterThan3Months(date);
log.info("删除3个月前的数据结束,删除数量: {}", count);
}
......
......@@ -46,5 +46,5 @@ public interface MeetingInfoService extends IService<MeetingInfo> {
*/
void exportRecordTemplateUsingInfo(String searchValue, Date createTimeStart, Date createTimeEnd, HttpServletResponse response);
boolean deleteDataAfterThan3Months(String date);
int deleteDataAfterThan3Months(String date);
}
......@@ -422,8 +422,8 @@ public class MeetingInfoServiceImpl extends ServiceImpl<MeetingInfoMapper, Meeti
}
@Override
public boolean deleteDataAfterThan3Months(String date) {
return baseMapper.deleteDataAfterThan3Months(date) != 0;
public int deleteDataAfterThan3Months(String date) {
return baseMapper.deleteDataAfterThan3Months(date);
}
/**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论