package com.iformall.controller.sys;

import com.github.pagehelper.PageInfo;
import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.WxAdminLog;
import com.iformall.service.WxAdminLogService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("wxAdminLog")
public class WxAdminLogController extends BaseController {
    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private WxAdminLogService wxAdminLogService;

    @ApiOperation("PV计数")
    @PostMapping("pvlog")
    public ResultData pvLog(@RequestBody WxAdminLog wxAdminLog) {
        logger.debug("[" + getIpAddr() + "] WxAdminLogController::pvLog");
        String tenantId = getTenantId();
        wxAdminLog.setTenantId(tenantId);
        wxAdminLogService.saveLogCount(wxAdminLog);
        return new ResultData();
    }

}
