13693261870
2022-09-20 a666b5f9741ef9b21f547d3b2141752a0383c70c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;
 
/**
 * @author Tanbin
 * @date   2018-12-12
 */
@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();
    }
 
}