|
|
@ -23,11 +23,11 @@ public class ActivityCountWorker { |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private IActivityCountMapper countMapper; |
|
|
|
private IActivityCountMapper countMapper; |
|
|
|
|
|
|
|
|
|
|
|
// @Scheduled(cron = "0 * * * * ?")
|
|
|
|
@Scheduled(cron = "0 * * * * ?") |
|
|
|
public void aliveCount() { |
|
|
|
public void aliveCount() { |
|
|
|
ActivityCount count = new ActivityCount(); |
|
|
|
ActivityCount count = new ActivityCount(); |
|
|
|
count.setTime(DateUtil.format()); |
|
|
|
count.setTime(DateUtil.format()); |
|
|
|
count.setNum(WebSocketService.CLIENT_MAP.size()); |
|
|
|
count.setNum(WebSocketService.CLIENT_MAP.keySet().size()); |
|
|
|
count.setType("A"); |
|
|
|
count.setType("A"); |
|
|
|
countMapper.insert(count); |
|
|
|
countMapper.insert(count); |
|
|
|
} |
|
|
|
} |
|
|
|