package com.wzj.soopin.statistics.controller;

import com.wzj.soopin.statistics.entity.dos.MemberStatisticsData;
import com.wzj.soopin.statistics.entity.dto.StatisticsQueryParam;
import com.wzj.soopin.statistics.service.MemberStatisticsService;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.dromara.common.core.domain.R;
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.RestController;

import java.util.List;

/**
 * 管理端,会员统计接口
 *
 * @author Bulbasaur
 * @since 2020/12/9 19:04
 */
@Tag(name = "管理端,会员统计接口")
@RestController
@RequestMapping("/manager/statistics/member")
public class MemberStatisticsManagerController {
    @Autowired
    private MemberStatisticsService memberStatisticsService;

    @Operation(summary = "获取会员统计")
    @GetMapping
    public R<List<MemberStatisticsData>> getByList(StatisticsQueryParam statisticsQueryParam) {
        return R.ok(memberStatisticsService.statistics(statisticsQueryParam));
    }
}
