package com.ruoyi.business.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.business.entity.InspectionTask; import com.ruoyi.business.entity.KeyCoalLocks; import com.ruoyi.business.mapper.KeyCoalLocksMapper; import com.ruoyi.business.service.KeyCoalLocksService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * @author :yys * @date : 2025/10/10 10:17 */ @Service @Slf4j public class KeyCoalLocksServiceImpl extends ServiceImpl implements KeyCoalLocksService { @Autowired private KeyCoalLocksMapper keyCoalLocksMapper; @Override public IPage getListPage(Page page, KeyCoalLocks keyCoalLocks) { LambdaQueryWrapper keyCoalLocksLambdaQueryWrapper = new LambdaQueryWrapper<>(); if(keyCoalLocks != null){ if(!StringUtils.isEmpty(keyCoalLocks.getCoalName())){ keyCoalLocksLambdaQueryWrapper.like(KeyCoalLocks::getCoalName,keyCoalLocks.getCoalName()); } if(!StringUtils.isEmpty(keyCoalLocks.getLockStatus())){ keyCoalLocksLambdaQueryWrapper.eq(KeyCoalLocks::getLockStatus,keyCoalLocks.getLockStatus()); } if(!StringUtils.isEmpty(keyCoalLocks.getSupplierName())){ keyCoalLocksLambdaQueryWrapper.like(KeyCoalLocks::getSupplierName,keyCoalLocks.getSupplierName()); } if(!StringUtils.isEmpty(keyCoalLocks.getLockTime())){ keyCoalLocksLambdaQueryWrapper.like(KeyCoalLocks::getLockTime,keyCoalLocks.getLockTime()); } } return keyCoalLocksMapper.selectPage(page,keyCoalLocksLambdaQueryWrapper);} }