package com.zhongshu.card.server.core.controller.user;

import com.github.microservice.auth.security.annotations.ResourceAuth;
import com.github.microservice.auth.security.helper.AuthHelper;
import com.github.microservice.auth.security.type.AuthType;
import com.github.microservice.net.ResultContent;
import com.zhongshu.card.client.model.userStatistics.PlatformUserStatisModel;
import com.zhongshu.card.server.core.service.statistics.UserStatisticsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author TRX
 * @date 2024/6/4
 */
@RestController
@RequestMapping("userStatistics")
@Tag(name = "用户统计")
public class UserStatisticsController {

    @Autowired
    private AuthHelper authHelper;

    @Autowired
    private UserStatisticsService userStatisticsService;

    @ResourceAuth(value = "user", type = AuthType.User)
    @Operation(summary = "平台用户信息统计", description = "用户信息统计")
    @RequestMapping(value = {"statisticsPlatformUserInfo"}, method = {RequestMethod.GET})
    public ResultContent<PlatformUserStatisModel> statisticsPlatformUserInfo() {
        return userStatisticsService.statisticsPlatformUserInfo();
    }

}
