package com.njcn.device.pq.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.device.pq.mapper.PqsTerminalLogsMapper;
import com.njcn.device.pq.pojo.param.LogsListParam;
import com.njcn.device.pq.pojo.po.PqsTerminalLogs;
import com.njcn.device.pq.pojo.vo.LogsListVO;
import com.njcn.device.pq.service.IPqsTerminalLogsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author hongawen
 * @since 2023-04-13
 */
@Service
@AllArgsConstructor
public class PqsTerminalLogsServiceImpl extends ServiceImpl<PqsTerminalLogsMapper, PqsTerminalLogs> implements IPqsTerminalLogsService {

    private final PqsTerminalLogsMapper pqsTerminalLogsMapper;

    @Override
    public boolean saveLogs(PqsTerminalLogs pqsTerminalLogs) {
        return this.save(pqsTerminalLogs);
    }

    /**
     * 运维日志页面展示
     *
     * @author zbj
     * @date 2023/4/13
     */
    @Override
    public List<LogsListVO> getList(LogsListParam logsListParam) {
        return  pqsTerminalLogsMapper.getList(new Page<LogsListVO>(logsListParam.getPageNum(), logsListParam.getPageSize()),logsListParam);

    }
}
