package rentComputer

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

type ApiRentComputerLog struct {
}

// QueryRentComputerLogByPcNum 查询详细日志
func (s *ApiRentComputerLog) QueryRentComputerLogByPcNum(c *gin.Context) {
	var paramsInfo rentComputer.RentComputerLog
	_ = c.ShouldBindJSON(&paramsInfo)
	list, err := ServiceRentComputerLog.QueryRentComputerLogByPcNum(paramsInfo)
	if err != nil {
		global.GVA_LOG.Error("获取失败!", zap.Error(err))
		response.FailWithMessage("获取失败", c)
	} else {
		response.OkWithDetailed(response.PageResult{
			List: list,
		}, "获取成功", c)
	}
}
