Quartz
- 调度器:Scheduler
- 任务:JobDetail
- 触发器:Trigger,包括SimpleTrigger和CronTrigger
配置->数据库->调用
1 | // 刷新帖子分数任务 |
帖子分数刷新的任务
1 | public class PostScoreRefreshJob implements Job, CommunityConstant { |
计算帖子分数
log(评论数10+点赞数2)+现在时间-牛客纪元
点赞
1 | public String like(int entityType, int entityId, int entityUserId, int postId) { |
评论
1 | // 计算帖子分数 |