package com.community.huiju.controller;

import com.community.commom.mode.ResponseBean;
import com.community.huiju.common.base.BaseController;
import com.community.huiju.service.ITaUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
@RequestMapping("/")
@Api(value = " App 用户 控制器")
public class AppUserController extends BaseController {

    @Autowired
    private ITaUserService iTaUserService;

    @ApiOperation(value = "获取用户人数", notes = "获取用户人数")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
    })
    @RequestMapping(value = "/user/count",method = RequestMethod.GET)
    public ResponseBean getUserCount() {
        ResponseBean response = new ResponseBean();
        response = iTaUserService.getByUserTypeCount();
        return response;
    }


}
