同步教材添加用户名搜索

This commit is contained in:
cjw 2024-07-23 16:43:27 +08:00
parent 40c6e3b3cb
commit 761138a6b3
2 changed files with 4 additions and 2 deletions

View File

@ -93,11 +93,11 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
@Override @Override
public TableDataInfo<SysOssTextbookVo> queryAwaitPageList(SysOssTextbookBo bo, PageQuery pageQuery) { public TableDataInfo<SysOssTextbookVo> queryAwaitPageList(SysOssTextbookBo bo, PageQuery pageQuery) {
QueryWrapper<SysOssTextbook> wrapper = Wrappers.query(); QueryWrapper<SysOssTextbook> wrapper = Wrappers.query();
wrapper.le("ot.status", 0) wrapper.le("ot.status", 0)
.eq("ot.del_flag", 0) .eq("ot.del_flag", 0)
.eq(StringUtils.isNotEmpty(bo.getFileSuffix()), "ot.file_suffix", bo.getFileSuffix()) .eq(StringUtils.isNotEmpty(bo.getFileSuffix()), "ot.file_suffix", bo.getFileSuffix())
.like(StringUtils.isNotEmpty(bo.getFileName()), "ot.file_name", bo.getFileName()) .like(StringUtils.isNotEmpty(bo.getFileName()), "ot.file_name", bo.getFileName())
//.or().like(StringUtils.isNotEmpty(bo.getFileName()), "ot.file_name", bo.getFileName())
.orderByDesc("ot.create_time"); .orderByDesc("ot.create_time");
Page<SysOssTextbookVo> result = baseMapper.selectPageAwaitList(pageQuery.build(), wrapper); Page<SysOssTextbookVo> result = baseMapper.selectPageAwaitList(pageQuery.build(), wrapper);
return TableDataInfo.build(result); return TableDataInfo.build(result);
@ -145,7 +145,7 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
Integer format = bo.getFormatSuffix(); Integer format = bo.getFormatSuffix();
List<String> list = processFormatSuffixQuery(format); List<String> list = processFormatSuffixQuery(format);
w.in(ArrayUtil.isEmpty(list), "ot.file_suffix", list); w.in(ArrayUtil.isEmpty(list), "ot.file_suffix", list);
}); }).orderByAsc("ot.create_time");
return wrapper; return wrapper;
} }
@ -158,6 +158,7 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
.eq(ObjectUtil.isNotNull(bo.getCreateBy()), "ot.create_by", bo.getCreateBy()) .eq(ObjectUtil.isNotNull(bo.getCreateBy()), "ot.create_by", bo.getCreateBy())
.eq(ObjectUtil.isNotNull(bo.getOssType()), "ot.oss_type", bo.getOssType()) .eq(ObjectUtil.isNotNull(bo.getOssType()), "ot.oss_type", bo.getOssType())
.like(StringUtils.isNotEmpty(bo.getFileName()), "ot.file_name", bo.getFileName()) .like(StringUtils.isNotEmpty(bo.getFileName()), "ot.file_name", bo.getFileName())
.or().like(StringUtils.isNotEmpty(bo.getFileName()), "u.nick_name", bo.getFileName())
.and(ObjectUtil.isNotNull(bo.getCatalogId()), w -> { .and(ObjectUtil.isNotNull(bo.getCatalogId()), w -> {
List<SysCatalogTextbook> list = catalogService.selectList(new LambdaQueryWrapper<SysCatalogTextbook>() List<SysCatalogTextbook> list = catalogService.selectList(new LambdaQueryWrapper<SysCatalogTextbook>()
.select(SysCatalogTextbook::getCatalogId) .select(SysCatalogTextbook::getCatalogId)

View File

@ -14,6 +14,7 @@
select ot.*, o.volume select ot.*, o.volume
from sys_oss_textbook ot from sys_oss_textbook ot
left join sys_oss o on o.oss_id = ot.oss_id left join sys_oss o on o.oss_id = ot.oss_id
left join sys_user u on u.user_id = ot.create_by
${ew.getCustomSqlSegment} ${ew.getCustomSqlSegment}
</select> </select>