maven
2025-10-10 173f44a1f9a59509996192e3446cbd26f2613b5e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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<KeyCoalLocksMapper, KeyCoalLocks> implements KeyCoalLocksService {
 
    @Autowired
    private KeyCoalLocksMapper keyCoalLocksMapper;
 
    @Override
    public IPage<KeyCoalLocks> getListPage(Page<KeyCoalLocks> page, KeyCoalLocks keyCoalLocks) {
        LambdaQueryWrapper<KeyCoalLocks> 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);}
}