| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.mybatis.core.page.PageQuery; |
| | |
| | | LambdaQueryWrapper<SysNotice> lqw = new LambdaQueryWrapper<SysNotice>() |
| | | .like(StringUtils.isNotBlank(notice.getNoticeTitle()), SysNotice::getNoticeTitle, notice.getNoticeTitle()) |
| | | .eq(StringUtils.isNotBlank(notice.getNoticeType()), SysNotice::getNoticeType, notice.getNoticeType()) |
| | | .like(StringUtils.isNotBlank(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy()); |
| | | .like(ObjectUtil.isNotNull(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy()); |
| | | Page<SysNotice> page = baseMapper.selectPage(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(page); |
| | | } |
| | |
| | | return baseMapper.selectList(new LambdaQueryWrapper<SysNotice>() |
| | | .like(StringUtils.isNotBlank(notice.getNoticeTitle()), SysNotice::getNoticeTitle, notice.getNoticeTitle()) |
| | | .eq(StringUtils.isNotBlank(notice.getNoticeType()), SysNotice::getNoticeType, notice.getNoticeType()) |
| | | .like(StringUtils.isNotBlank(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy())); |
| | | .like(ObjectUtil.isNotNull(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy())); |
| | | } |
| | | |
| | | /** |