This commit is contained in:
cjw 2024-06-18 14:18:03 +08:00
parent 4eefdb279d
commit 0cff3ff8bd
3 changed files with 6 additions and 4 deletions

View File

@ -105,12 +105,12 @@ public class SysOssTextbookController extends BaseController {
} }
/** /**
* 审核 * 复制
* *
* @param bo 主键串 * @param bo 主键串
*/ */
@SaCheckPermission("file:textbook:copy") @SaCheckPermission("file:textbook:copy")
@Log(title = "审核同步教材】", businessType = BusinessType.UPDATE) @Log(title = "复制同步教材】", businessType = BusinessType.UPDATE)
@PutMapping("/copy") @PutMapping("/copy")
public R<Void> copy(@RequestBody SysOssTextbookBo bo) { public R<Void> copy(@RequestBody SysOssTextbookBo bo) {
return toAjax(sysOssTextbookService.copyByBo(bo)); return toAjax(sysOssTextbookService.copyByBo(bo));

View File

@ -25,6 +25,8 @@ public class SysOssTextbookVo implements Serializable {
@Serial @Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Long id;
/** /**
* *
*/ */

View File

@ -84,10 +84,10 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
wrapper.eq(ObjectUtil.isNotNull(bo.getType()), "ot.type", bo.getType()) wrapper.eq(ObjectUtil.isNotNull(bo.getType()), "ot.type", bo.getType())
.eq(ObjectUtil.isNotNull(bo.getStatus()), "ot.status", bo.getStatus()) .eq(ObjectUtil.isNotNull(bo.getStatus()), "ot.status", bo.getStatus())
.and(ObjectUtil.isNotNull(bo.getCatalogId()), w -> { .and(ObjectUtil.isNotNull(bo.getCatalogId()), w -> {
List<SysCatalogTextbook> deptList = catalogService.selectList(new LambdaQueryWrapper<SysCatalogTextbook>() List<SysCatalogTextbook> list = catalogService.selectList(new LambdaQueryWrapper<SysCatalogTextbook>()
.select(SysCatalogTextbook::getCatalogId) .select(SysCatalogTextbook::getCatalogId)
.apply(DataBaseHelper.findInSet(bo.getCatalogId(), "ancestors"))); .apply(DataBaseHelper.findInSet(bo.getCatalogId(), "ancestors")));
List<Long> ids = StreamUtils.toList(deptList, SysCatalogTextbook::getCatalogId); List<Long> ids = StreamUtils.toList(list, SysCatalogTextbook::getCatalogId);
ids.add(bo.getCatalogId()); ids.add(bo.getCatalogId());
w.in("ot.catalog_id", ids); w.in("ot.catalog_id", ids);
}); });