VodLabelDictServiceImpl.java
1.23 KB
package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.subsidy.dto.label.VodLabelPageDTO;
import com.subsidy.model.VodLabelDictDO;
import com.subsidy.mapper.VodLabelDictMapper;
import com.subsidy.service.VodLableDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
/**
* <p>
* 视频库类目表 服务实现类
* </p>
*
* @author DengMin
* @since 2022-07-19
*/
@Service
public class VodLabelDictServiceImpl extends ServiceImpl<VodLabelDictMapper, VodLabelDictDO> implements VodLableDictService {
@Override
public IPage<VodLabelDictDO> queryVodLabelPage(VodLabelPageDTO vodLabelPageDTO) {
Page page = new Page(vodLabelPageDTO.getPageNum(), vodLabelPageDTO.getPageSize());
return this.baseMapper.selectPage(page, new QueryWrapper<VodLabelDictDO>()
.lambda().like(StringUtils.isNotBlank(vodLabelPageDTO.getLabelName()),
VodLabelDictDO::getLabelName, vodLabelPageDTO.getLabelName()));
}
}