package com.zksy.info.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zksy.info.domain.EAdminLicenseInfo;
import com.zksy.info.service.EAdminLicenseInfoService;
import com.zksy.info.mapper.EAdminLicenseInfoMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Administrator
* @description 针对表【e_admin_license_info(行政许可信息表)】的数据库操作Service实现
* @createDate 2025-06-26 15:47:38
*/
@Service
public class EAdminLicenseInfoServiceImpl extends ServiceImpl<EAdminLicenseInfoMapper, EAdminLicenseInfo>
    implements EAdminLicenseInfoService{

    @Override
    public Page<EAdminLicenseInfo> findByPage(long pageNum, long pageSize, String licenseCertificateName,String licenseNumber,String currentStatuslicenseNumber) {
        Page<EAdminLicenseInfo> page = new Page<>(pageNum,pageSize);
        LambdaQueryWrapper<EAdminLicenseInfo> queryWrapper = new LambdaQueryWrapper();
        queryWrapper.like(EAdminLicenseInfo::getLicenseCertificateName,licenseCertificateName);
        queryWrapper.like(EAdminLicenseInfo::getLicenseNumber,licenseNumber);
        queryWrapper.like(EAdminLicenseInfo::getCurrentStatus,currentStatuslicenseNumber);
        queryWrapper.orderByDesc(EAdminLicenseInfo::getUpdateTime);
        Page<EAdminLicenseInfo> page1 = this.page(page, queryWrapper);
        return page1;
    }

    @Override
    public List<EAdminLicenseInfo> getEAdminLicenseInfoList(String licenseCertificateName,String licenseNumber,String currentStatuslicenseNumber) {
        LambdaQueryWrapper<EAdminLicenseInfo> queryWrapper = new LambdaQueryWrapper();
        queryWrapper.like(EAdminLicenseInfo::getLicenseCertificateName,licenseCertificateName);
        queryWrapper.like(EAdminLicenseInfo::getLicenseNumber,licenseNumber);
        queryWrapper.like(EAdminLicenseInfo::getCurrentStatus,currentStatuslicenseNumber);
        queryWrapper.orderByDesc(EAdminLicenseInfo::getUpdateTime);
        List<EAdminLicenseInfo> list = this.list(queryWrapper);
        return list;
    }
}




