package dataStatistics

import (
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
	"log-server/global"
	"log-server/model/dataStatistics/request"
	"log-server/model/log/response"
)

type ApiWeChatScannerDetailed struct {
}

func (s *ApiWeChatScannerDetailed) GetWeChatScannerDetailedList(c *gin.Context) {
	var paramsInfo request.WeChatScannerDetailedRequest
	_ = c.ShouldBindJSON(&paramsInfo)
	/*if err := utils.Verify(paramsInfo.PageInfo, utils.PageInfoVerify); err != nil {
		response.FailWithMessage(err.Error(), c)
		return
	}*/
	list, total, err := ServiceWeChatScannerDetailed.WeChatScannerDetailedList(c, paramsInfo.WeChatScannerDetailed, paramsInfo.PageInfo, paramsInfo.OrderKey, paramsInfo.Desc)
	if err != nil {
		global.GVA_LOG.Error("获取失败!", zap.Error(err))
		response.FailWithMessage("获取失败", c)
	} else {
		response.OkWithDetailed(response.PageResult{
			List:     list,
			Total:    total,
			Page:     paramsInfo.Page,
			PageSize: paramsInfo.PageSize,
		}, "获取成功", c)
	}
}
