k.e.book.ddh.service.CcVersionService Maven / Gradle / Ivy
package k.e.book.ddh.service;
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 k.e.book.ddh.entity.CcVersionDO;
import k.e.book.ddh.entity.CcVersionQueryDTO;
import k.e.book.ddh.mapper.CcVersionMapper;
import org.springframework.stereotype.Service;
/**
* @author kk
* @date 2023-05-21 11:04
*/
@Service
public class CcVersionService extends ServiceImpl {
public IPage selectProductPage(CcVersionQueryDTO dto) {
LambdaQueryWrapper qr = new LambdaQueryWrapper<>();
if(dto.getId() != null){
qr.eq(CcVersionDO::getId, dto.getId());
}
if(dto.getOldversion() != null){
qr.eq(CcVersionDO::getOldversion, dto.getOldversion());
}
if(dto.getNewversion() != null){
qr.eq(CcVersionDO::getNewversion, dto.getNewversion());
}
if(dto.getPackagesize() != null){
qr.eq(CcVersionDO::getPackagesize, dto.getPackagesize());
}
if(dto.getContent() != null){
qr.eq(CcVersionDO::getContent, dto.getContent());
}
if(dto.getDownloadurl() != null){
qr.eq(CcVersionDO::getDownloadurl, dto.getDownloadurl());
}
if(dto.getDownloadurlios() != null){
qr.eq(CcVersionDO::getDownloadurlios, dto.getDownloadurlios());
}
if(dto.getEnforce() != null){
qr.eq(CcVersionDO::getEnforce, dto.getEnforce());
}
if(dto.getVersionType() != null){
qr.eq(CcVersionDO::getVersionType, dto.getVersionType());
}
if(dto.getPatchUpdate() != null){
qr.eq(CcVersionDO::getPatchUpdate, dto.getPatchUpdate());
}
if(dto.getCreatetime() != null){
qr.eq(CcVersionDO::getCreatetime, dto.getCreatetime());
}
if(dto.getUpdatetime() != null){
qr.eq(CcVersionDO::getUpdatetime, dto.getUpdatetime());
}
if(dto.getWeigh() != null){
qr.eq(CcVersionDO::getWeigh, dto.getWeigh());
}
if(dto.getStatus() != null){
qr.eq(CcVersionDO::getStatus, dto.getStatus());
}
qr.orderByDesc(CcVersionDO::getId);
IPage page = new Page<>();
page.setCurrent(dto.getPage());
page.setSize(dto.getLimit());
return baseMapper.selectPage(page, qr);
}
}