区分待审核和通过审核的列表

This commit is contained in:
cjw 2024-06-18 14:52:08 +08:00
parent 0cff3ff8bd
commit 00626819c6
5 changed files with 46 additions and 4 deletions

View File

@ -36,7 +36,7 @@ public class SysOssTextbookController extends BaseController {
private final ISysOssTextbookService sysOssTextbookService; private final ISysOssTextbookService sysOssTextbookService;
/** /**
* 查询请填写功能名称列表 * 查询列表
*/ */
@SaCheckPermission("file:textbook:pageList") @SaCheckPermission("file:textbook:pageList")
@GetMapping("/pageList") @GetMapping("/pageList")
@ -44,6 +44,15 @@ public class SysOssTextbookController extends BaseController {
return sysOssTextbookService.queryPageList(bo, pageQuery); return sysOssTextbookService.queryPageList(bo, pageQuery);
} }
/**
* 待审核查询列表
*/
@SaCheckPermission("file:textbook:awaitList")
@GetMapping("await/pageList")
public TableDataInfo<SysOssTextbookVo> awaitList(SysOssTextbookBo bo, PageQuery pageQuery) {
return sysOssTextbookService.queryAwaitPageList(bo, pageQuery);
}
/** /**
* 获取请填写功能名称详细信息 * 获取请填写功能名称详细信息

View File

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.dromara.common.mybatis.annotation.DataColumn;
import org.dromara.common.mybatis.annotation.DataPermission;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus; import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.system.domain.SysOssTextbook; import org.dromara.system.domain.SysOssTextbook;
import org.dromara.system.domain.vo.SysOssTextbookVo; import org.dromara.system.domain.vo.SysOssTextbookVo;
@ -18,6 +20,11 @@ import org.dromara.system.domain.vo.SysOssTextbookVo;
*/ */
@Mapper @Mapper
public interface SysOssTextbookMapper extends BaseMapperPlus<SysOssTextbook, SysOssTextbookVo> { public interface SysOssTextbookMapper extends BaseMapperPlus<SysOssTextbook, SysOssTextbookVo> {
Page<SysOssTextbookVo> selectPageUserList(@Param("page") Page<SysOssTextbook> page, Page<SysOssTextbookVo> selectPageList(@Param("page") Page<SysOssTextbook> page,
@Param(Constants.WRAPPER) Wrapper<SysOssTextbook> queryWrapper);
@DataPermission({
@DataColumn(key = "userName", value = "create_by")
})
Page<SysOssTextbookVo> selectPageAwaitList(@Param("page") Page<SysOssTextbook> page,
@Param(Constants.WRAPPER) Wrapper<SysOssTextbook> queryWrapper); @Param(Constants.WRAPPER) Wrapper<SysOssTextbook> queryWrapper);
} }

View File

@ -34,6 +34,15 @@ public interface ISysOssTextbookService {
*/ */
TableDataInfo<SysOssTextbookVo> queryPageList(SysOssTextbookBo bo, PageQuery pageQuery); TableDataInfo<SysOssTextbookVo> queryPageList(SysOssTextbookBo bo, PageQuery pageQuery);
/**
* 待审核查询列表
*
* @param bo 查询条件
* @param pageQuery 分页参数
* @return 请填写功能名称分页列表
*/
TableDataInfo<SysOssTextbookVo> queryAwaitPageList(SysOssTextbookBo bo, PageQuery pageQuery);
/** /**
* 查询符合条件的请填写功能名称列表 * 查询符合条件的请填写功能名称列表
* *

View File

@ -64,7 +64,16 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
*/ */
@Override @Override
public TableDataInfo<SysOssTextbookVo> queryPageList(SysOssTextbookBo bo, PageQuery pageQuery) { public TableDataInfo<SysOssTextbookVo> queryPageList(SysOssTextbookBo bo, PageQuery pageQuery) {
Page<SysOssTextbookVo> result = baseMapper.selectPageUserList(pageQuery.build(), this.buildQueryWrapper(bo)); bo.setStatus(1);
Page<SysOssTextbookVo> result = baseMapper.selectPageList(pageQuery.build(), this.buildQueryWrapper(bo));
return TableDataInfo.build(result);
}
@Override
public TableDataInfo<SysOssTextbookVo> queryAwaitPageList(SysOssTextbookBo bo, PageQuery pageQuery) {
QueryWrapper<SysOssTextbook> wrapper = Wrappers.query();
wrapper.le("ot.status",0);
Page<SysOssTextbookVo> result = baseMapper.selectPageAwaitList(pageQuery.build(), wrapper);
return TableDataInfo.build(result); return TableDataInfo.build(result);
} }

View File

@ -4,7 +4,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.system.mapper.SysOssTextbookMapper"> <mapper namespace="org.dromara.system.mapper.SysOssTextbookMapper">
<select id="selectPageUserList" resultType="org.dromara.system.domain.vo.SysOssTextbookVo"> <select id="selectPageList" resultType="org.dromara.system.domain.vo.SysOssTextbookVo">
select ot.*,o.file_suffix,o.volume
from sys_oss_textbook ot
left join sys_catalog_textbook ct on ct.catalog_id = ot.catalog_id
left join sys_oss o on o.oss_id = ot.oss_id
${ew.getCustomSqlSegment}
</select>
<select id="selectPageAwaitList" resultType="org.dromara.system.domain.vo.SysOssTextbookVo">
select ot.*,o.file_suffix,o.volume select ot.*,o.file_suffix,o.volume
from sys_oss_textbook ot from sys_oss_textbook ot
left join sys_catalog_textbook ct on ct.catalog_id = ot.catalog_id left join sys_catalog_textbook ct on ct.catalog_id = ot.catalog_id