package com.hzs.member.statis.controller.api;

import com.hzs.common.core.constant.CacheConstants;
import com.hzs.common.core.enums.ETop30Type;
import com.hzs.common.core.service.RedisService;
import com.hzs.common.core.web.domain.AjaxResult;
import com.hzs.common.domain.member.ext.CuMemberHonorWallExt;
import com.hzs.common.security.utils.SecurityUtils;
import com.hzs.member.statis.param.DirectStatisticsTop30QueryParam;
import com.hzs.member.statis.service.IMemberStatisticsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 统计
 */
@Slf4j
@RequestMapping("/api/member-statistics")
@RestController
public class MemberStatisticsController {

    @Resource
    private IMemberStatisticsService memberStatisticsService;
    @PostMapping("/topPeople")
    public AjaxResult topPeople(@RequestBody DirectStatisticsTop30QueryParam param) {
        return AjaxResult.success(memberStatisticsService.getDirectStatisticsNumberOfPeople(param));
    }

    @PostMapping("/topAmount")
    public AjaxResult topAmount(@RequestBody DirectStatisticsTop30QueryParam param) {
        return AjaxResult.success(memberStatisticsService.getDirectStatisticsNumberOfAmount(param));
    }
}
