package com.ktg.iscs.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ktg.iscs.domain.IsCabinetOpenRecord;
import com.ktg.iscs.mapper.IsCabinetOpenRecordMapper;
import com.ktg.iscs.service.IIsCabinetOpenRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 物资柜开关门记录Service业务层处理
 *
 * @author cgj
 * @date 2025-02-14
 */
@Service
public class IsCabinetOpenRecordServiceImpl extends ServiceImpl<IsCabinetOpenRecordMapper, IsCabinetOpenRecord> implements IIsCabinetOpenRecordService {

    @Autowired
    private IsCabinetOpenRecordMapper isCabinetOpenRecordMapper;

    @Override
    public Page<IsCabinetOpenRecord> getIsCabinetOpenRecordPage(Page<IsCabinetOpenRecord> page, IsCabinetOpenRecord isCabinetOpenRecord) {
        Page<IsCabinetOpenRecord> result = page(page, Wrappers.<IsCabinetOpenRecord>lambdaQuery()
                .orderByDesc(IsCabinetOpenRecord::getRecordId));
        return result;
    }

}
