Browse Source

企业端-预告搜索查询修改

dev-V1.10.0
niujiyi 12 hours ago
parent
commit
e16063d642
  1. 16
      zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EfcodeCpNoticeServiceImpl.java

16
zdxt-modules/zdxt-enforcement-code/src/main/java/com/zdxt/enforcementcode/service/impl/EfcodeCpNoticeServiceImpl.java

@ -115,10 +115,8 @@ public class EfcodeCpNoticeServiceImpl implements IEfcodeCpNoticeService {
@Override @Override
public TableDataInfo<EfcodeCpNoticeVo> entQueryMyPageList(EfcodeCpNoticeBo bo, PageQuery pageQuery) { public TableDataInfo<EfcodeCpNoticeVo> entQueryMyPageList(EfcodeCpNoticeBo bo, PageQuery pageQuery) {
LambdaQueryWrapper<EfcodeCpNotice> lqw = buildQueryWrapper(bo); LambdaQueryWrapper<EfcodeCpNotice> lqw = buildQueryWrapper(bo);
lqw.eq(EfcodeCpNotice::getEnterpriseNumber,bo.getEnterpriseNumber()); // 企业端只查询已发布(待执法)的预告
lqw.eq(EfcodeCpNotice::getStatus, 1L); lqw.eq(EfcodeCpNotice::getStatus, 1L);
// 过滤已删除
lqw.eq(EfcodeCpNotice::getIsDelete, 0);
// 按创建时间倒序 // 按创建时间倒序
lqw.orderByDesc(EfcodeCpNotice::getCreateTime); lqw.orderByDesc(EfcodeCpNotice::getCreateTime);
Page<EfcodeCpNoticeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); Page<EfcodeCpNoticeVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
@ -354,14 +352,18 @@ public class EfcodeCpNoticeServiceImpl implements IEfcodeCpNoticeService {
lqw.like(StringUtils.isNotBlank(bo.getEnterpriseName()), EfcodeCpNotice::getEnterpriseName, bo.getEnterpriseName()); lqw.like(StringUtils.isNotBlank(bo.getEnterpriseName()), EfcodeCpNotice::getEnterpriseName, bo.getEnterpriseName());
lqw.eq(bo.getStatus() != null, EfcodeCpNotice::getStatus, bo.getStatus()); lqw.eq(bo.getStatus() != null, EfcodeCpNotice::getStatus, bo.getStatus());
lqw.eq(bo.getIsDelete() != null, EfcodeCpNotice::getIsDelete, bo.getIsDelete()); lqw.eq(bo.getIsDelete() != null, EfcodeCpNotice::getIsDelete, bo.getIsDelete());
//企业统一信用代码(为空时不作为查询条件)
lqw.eq(StringUtils.isNotBlank(bo.getEnterpriseNumber()), EfcodeCpNotice::getEnterpriseNumber, bo.getEnterpriseNumber());
lqw.eq(bo.getStatus() != null, EfcodeCpNotice::getStatus, bo.getStatus());
// 过滤已删除
lqw.eq(EfcodeCpNotice::getIsDelete, 0);
// 搜索值(多字段模糊匹配) // 搜索值(多字段模糊匹配)
if (StringUtils.isNotBlank(bo.getSearchValue())) { if (StringUtils.isNotBlank(bo.getSearchValue())) {
String sv = bo.getSearchValue(); String sv = bo.getSearchValue();
lqw.and(wrapper -> wrapper lqw.and(wrapper -> wrapper
.like(StringUtils.isNotBlank(bo.getBureauDeptName()), EfcodeCpNotice::getBureauDeptName, sv) .like(EfcodeCpNotice::getBureauDeptName, sv)
.or().like(StringUtils.isNotBlank(bo.getEnterpriseName()), EfcodeCpNotice::getEnterpriseName, sv) .or().like(EfcodeCpNotice::getEnterpriseName, sv)
.or().like(StringUtils.isNotBlank(bo.getEnforceContent()), EfcodeCpNotice::getEnforceContent, sv) .or().like(EfcodeCpNotice::getEnforceContent, sv)
); );
} }

Loading…
Cancel
Save