package cn.com.oa.controller;

import cn.com.v2.common.base.BaseController;
import cn.com.oa.common.constant.DataService;
import cn.com.v2.common.domain.AjaxResult;
import cn.com.oa.model.Company;
import cn.com.oa.service.IUserLoginService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/api/userLogin")
public class UserLoginController extends BaseController {
    @Autowired
    private IUserLoginService userLoginService;

    @ApiOperation(value = "获取今日登录人数", notes = "获取今日登录人数")
    @GetMapping("/getUserLoginCount")
    @ResponseBody
    public AjaxResult getUserLoginCount()
    {
        Map<String,Object> userLoginCount = userLoginService.getUserLoginCount();
        //return userLoginCount;
        //Map<String,Object> userLoginCountMap = new HashMap<>();
        //userLoginCountMap.put("userLoginCount",userLoginCount);
        return AjaxResult.successData(200,userLoginCount).put("msg","获取成功");
    }
}
