package com.corewing.app.modules.app;

import com.corewing.app.common.Result;
import com.corewing.app.dto.AccessStatisticsRequest;
import com.corewing.app.service.AppAccessStatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@Api(tags = "APP访问统计")
@RestController
@RequestMapping("/api/app/access_statistics")
public class AppAccessStatisticsController {

    @Resource
    private AppAccessStatisticsService appAccessStatisticsService;

    @ApiOperation("访问统计接口")
    @GetMapping("/accumulate")
    private Result<String> accumulate(@Valid AccessStatisticsRequest accessStatisticsRequest) {
        return Result.isBool(appAccessStatisticsService.accumulate(accessStatisticsRequest));
    }

}
