1
13693261870
2022-09-16 58d012f11dd34564d81b4eb3a6099eb689876597
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package org.apereo.cas.web.landtool.controller;
 
import org.apereo.cas.web.landtool.single.service.SingleLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import com.alibaba.fastjson.JSONObject;
 
@RestController
@RequestMapping("/onlineuser")
public class UserOnlineCountController {
    
    
    
    @RequestMapping("/getOnlineUser")
    public String getOnlineUser(){        
         JSONObject jsonObject=new JSONObject();
         jsonObject.put("data", SingleLoginService.set);
         jsonObject.put("total", SingleLoginService.set.size());
        return jsonObject.toJSONString();
    }
 
}