Commit 46ce6fd1 authored by jiawei's avatar jiawei

Merge remote-tracking branch 'origin/dev'

parents 03c4b026 e82d56ae
......@@ -195,14 +195,9 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
// //修改对应审核项中的信息
// updateRefItemByRefItemId = updateRefItemByRefItemId(audit);
// }
//通过与不通过时 都修改
boolean updateRefItemByRefItemId = updateRefItemByRefItemId(audit);
if (AuditOperationEnum.REMOVE.name().equals(audit.getOperation())) {
return updateRefItemByRefItemId;
}
if (AuditOperationEnum.EDIT.name().equals(audit.getOperation())) {
//todo
}
int update = auditMapper.updateById(audit);
return updateRefItemByRefItemId && update >= 1;
}
......@@ -262,7 +257,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(queryWrapper, Object::toString);
if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) {
this.exhibitionBoardService.removeByIds(exhibitionBoardIdList);
this.auditMapper.delete(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, exhibitionBoardIdList));
this.assetMapper.delete(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList));
final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardIdList);
......@@ -282,7 +276,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
this.learningContentBoardService.remove(deleteWrapper1);
}
}
this.auditMapper.delete(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, videoContentId));
this.assetMapper.delete(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, videoContentId));
update = this.videoContentService.removeById(videoContentId);
break;
......@@ -340,7 +333,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
LambdaUpdateWrapper<LearningContentBoard> learningContentBoardLambdaUpdateWrapper = Wrappers.<LearningContentBoard>lambdaUpdate().eq(LearningContentBoard::getExhibitionBoardId, exhibitionBoardId);
this.learningContentBoardService.remove(learningContentBoardLambdaUpdateWrapper);
}
this.auditMapper.delete(Wrappers.<Audit>lambdaUpdate().eq(Audit::getRefItemId, exhibitionBoardId));
this.assetMapper.delete(Wrappers.<Asset>lambdaUpdate().eq(Asset::getRefItemId, exhibitionBoardId));
update = this.exhibitionBoardService.removeById(exhibitionBoardId);
break;
......@@ -383,7 +375,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
update = this.learningContentService.updateById(learningContent);
break;
case REMOVE:
this.auditMapper.delete(Wrappers.<Audit>lambdaUpdate().eq(Audit::getRefItemId, learningContentId));
this.learningContentBoardService.remove(Wrappers.<LearningContentBoard>lambdaUpdate().eq(LearningContentBoard::getLearningContentId, learningContentId));
this.learningContentBoardCatService.remove(Wrappers.<LearningContentBoardCat>lambdaUpdate().eq(LearningContentBoardCat::getLearningContentId, learningContentId));
this.learningContentCopyrightOwnerService.remove(Wrappers.<LearningContentCopyrightOwner>lambdaUpdate().eq(LearningContentCopyrightOwner::getLearningContentId, learningContentId));
......
......@@ -146,20 +146,6 @@ public class AuditController extends BaseController {
return getFailResult();
}
@DeleteMapping("/delete/{id}")
@RequiresAuthentication //@RequiresPermissions("/audit/delete")
@ApiOperation(value = "根据ID删除禁用审核", notes = "根据ID删除禁用审核")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "id", value = "标识ID", paramType = "path", dataType = "String")
})
public Map<String, Object> deleteAudit(@PathVariable("id") String id) {
boolean result = auditService.removeById(id);
if (result) {
return getSuccessResult();
}
return getFailResult();
}
// @GetMapping("/getList")
// @RequiresAuthentication //@RequiresPermissions("/audit/getList")
// @ApiOperation(value = "获取禁用审核全部列表(无分页)", notes = "获取禁用审核全部列表(无分页)")
......
......@@ -68,8 +68,6 @@ public class CopyrightOwnerController extends BaseController {
@Resource
private LearningContentBoardCatService learningContentBoardCatService;
@Resource
private AuditService auditService;
@Resource
private AssetService assetService;
@PostMapping("/save")
......@@ -301,14 +299,12 @@ public class CopyrightOwnerController extends BaseController {
final List<String> videoContentIdList = this.videoContentService.listObjs(videoContentLambdaQueryWrapper, Object::toString);
if (videoContentIdList != null && !videoContentIdList.isEmpty()) {
this.videoContentService.removeByIds(videoContentIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, videoContentIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, videoContentIdList));
final LambdaQueryWrapper<ExhibitionBoard> exhibitionBoardLambdaQueryWrapper = Wrappers.<ExhibitionBoard>lambdaQuery().in(ExhibitionBoard::getVideoContentId, videoContentIdList).select(ExhibitionBoard::getId);
final List<String> ExhibitionBoardIdList = this.exhibitionBoardService.listObjs(exhibitionBoardLambdaQueryWrapper, Object::toString);
if (ExhibitionBoardIdList != null && !ExhibitionBoardIdList.isEmpty()) {
this.exhibitionBoardService.removeByIds(ExhibitionBoardIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, ExhibitionBoardIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, ExhibitionBoardIdList));
final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, ExhibitionBoardIdList);
......@@ -333,7 +329,6 @@ public class CopyrightOwnerController extends BaseController {
final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(exhibitionBoardLambdaQueryWrapper, Object::toString);
if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) {
this.exhibitionBoardService.removeByIds(exhibitionBoardIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, exhibitionBoardIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList));
final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardIdList);
......
......@@ -64,8 +64,6 @@ public class ExhibitionBoardCatController extends BaseController {
@Resource
private LearningContentCopyrightOwnerService learningContentCopyrightOwnerService;
@Resource
private AuditService auditService;
@Resource
private AssetService assetService;
@PostMapping("/save")
......@@ -213,7 +211,6 @@ public class ExhibitionBoardCatController extends BaseController {
final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(exhibitionBoardLambdaQueryWrapper, Object::toString);
if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) {
this.exhibitionBoardService.removeByIds(exhibitionBoardIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, exhibitionBoardIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList));
final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardIdList);
......
......@@ -62,8 +62,6 @@ public class VideoContentCatController extends BaseController {
@Resource
private LearningContentService learningContentService;
@Resource
private AuditService auditService;
@Resource
private AssetService assetService;
@PostMapping(value = "/save")
......@@ -187,14 +185,12 @@ public class VideoContentCatController extends BaseController {
final List<String> videoContentIdList = this.videoContentService.listObjs(lambdaQueryWrapper, Object::toString);
if (videoContentIdList != null && !videoContentIdList.isEmpty()) {
this.videoContentService.removeByIds(videoContentIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, videoContentIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, videoContentIdList));
final LambdaQueryWrapper<ExhibitionBoard> queryWrapper = Wrappers.<ExhibitionBoard>lambdaQuery().in(ExhibitionBoard::getVideoContentId, videoContentIdList).select(ExhibitionBoard::getId);
final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(queryWrapper, Object::toString);
if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) {
this.exhibitionBoardService.removeByIds(exhibitionBoardIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, exhibitionBoardIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList));
final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardIdList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment