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 ...@@ -195,14 +195,9 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
// //修改对应审核项中的信息 // //修改对应审核项中的信息
// updateRefItemByRefItemId = updateRefItemByRefItemId(audit); // updateRefItemByRefItemId = updateRefItemByRefItemId(audit);
// } // }
//通过与不通过时 都修改 //通过与不通过时 都修改
boolean 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); int update = auditMapper.updateById(audit);
return updateRefItemByRefItemId && update >= 1; return updateRefItemByRefItemId && update >= 1;
} }
...@@ -262,7 +257,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements ...@@ -262,7 +257,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(queryWrapper, Object::toString); final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(queryWrapper, Object::toString);
if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) { if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) {
this.exhibitionBoardService.removeByIds(exhibitionBoardIdList); this.exhibitionBoardService.removeByIds(exhibitionBoardIdList);
this.auditMapper.delete(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, exhibitionBoardIdList));
this.assetMapper.delete(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList)); this.assetMapper.delete(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList));
final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardIdList); final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardIdList);
...@@ -282,7 +276,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements ...@@ -282,7 +276,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
this.learningContentBoardService.remove(deleteWrapper1); this.learningContentBoardService.remove(deleteWrapper1);
} }
} }
this.auditMapper.delete(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, videoContentId));
this.assetMapper.delete(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, videoContentId)); this.assetMapper.delete(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, videoContentId));
update = this.videoContentService.removeById(videoContentId); update = this.videoContentService.removeById(videoContentId);
break; break;
...@@ -340,7 +333,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements ...@@ -340,7 +333,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
LambdaUpdateWrapper<LearningContentBoard> learningContentBoardLambdaUpdateWrapper = Wrappers.<LearningContentBoard>lambdaUpdate().eq(LearningContentBoard::getExhibitionBoardId, exhibitionBoardId); LambdaUpdateWrapper<LearningContentBoard> learningContentBoardLambdaUpdateWrapper = Wrappers.<LearningContentBoard>lambdaUpdate().eq(LearningContentBoard::getExhibitionBoardId, exhibitionBoardId);
this.learningContentBoardService.remove(learningContentBoardLambdaUpdateWrapper); this.learningContentBoardService.remove(learningContentBoardLambdaUpdateWrapper);
} }
this.auditMapper.delete(Wrappers.<Audit>lambdaUpdate().eq(Audit::getRefItemId, exhibitionBoardId));
this.assetMapper.delete(Wrappers.<Asset>lambdaUpdate().eq(Asset::getRefItemId, exhibitionBoardId)); this.assetMapper.delete(Wrappers.<Asset>lambdaUpdate().eq(Asset::getRefItemId, exhibitionBoardId));
update = this.exhibitionBoardService.removeById(exhibitionBoardId); update = this.exhibitionBoardService.removeById(exhibitionBoardId);
break; break;
...@@ -383,7 +375,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements ...@@ -383,7 +375,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
update = this.learningContentService.updateById(learningContent); update = this.learningContentService.updateById(learningContent);
break; break;
case REMOVE: case REMOVE:
this.auditMapper.delete(Wrappers.<Audit>lambdaUpdate().eq(Audit::getRefItemId, learningContentId));
this.learningContentBoardService.remove(Wrappers.<LearningContentBoard>lambdaUpdate().eq(LearningContentBoard::getLearningContentId, learningContentId)); this.learningContentBoardService.remove(Wrappers.<LearningContentBoard>lambdaUpdate().eq(LearningContentBoard::getLearningContentId, learningContentId));
this.learningContentBoardCatService.remove(Wrappers.<LearningContentBoardCat>lambdaUpdate().eq(LearningContentBoardCat::getLearningContentId, learningContentId)); this.learningContentBoardCatService.remove(Wrappers.<LearningContentBoardCat>lambdaUpdate().eq(LearningContentBoardCat::getLearningContentId, learningContentId));
this.learningContentCopyrightOwnerService.remove(Wrappers.<LearningContentCopyrightOwner>lambdaUpdate().eq(LearningContentCopyrightOwner::getLearningContentId, learningContentId)); this.learningContentCopyrightOwnerService.remove(Wrappers.<LearningContentCopyrightOwner>lambdaUpdate().eq(LearningContentCopyrightOwner::getLearningContentId, learningContentId));
......
...@@ -146,20 +146,6 @@ public class AuditController extends BaseController { ...@@ -146,20 +146,6 @@ public class AuditController extends BaseController {
return getFailResult(); 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") // @GetMapping("/getList")
// @RequiresAuthentication //@RequiresPermissions("/audit/getList") // @RequiresAuthentication //@RequiresPermissions("/audit/getList")
// @ApiOperation(value = "获取禁用审核全部列表(无分页)", notes = "获取禁用审核全部列表(无分页)") // @ApiOperation(value = "获取禁用审核全部列表(无分页)", notes = "获取禁用审核全部列表(无分页)")
......
...@@ -68,8 +68,6 @@ public class CopyrightOwnerController extends BaseController { ...@@ -68,8 +68,6 @@ public class CopyrightOwnerController extends BaseController {
@Resource @Resource
private LearningContentBoardCatService learningContentBoardCatService; private LearningContentBoardCatService learningContentBoardCatService;
@Resource @Resource
private AuditService auditService;
@Resource
private AssetService assetService; private AssetService assetService;
@PostMapping("/save") @PostMapping("/save")
...@@ -301,14 +299,12 @@ public class CopyrightOwnerController extends BaseController { ...@@ -301,14 +299,12 @@ public class CopyrightOwnerController extends BaseController {
final List<String> videoContentIdList = this.videoContentService.listObjs(videoContentLambdaQueryWrapper, Object::toString); final List<String> videoContentIdList = this.videoContentService.listObjs(videoContentLambdaQueryWrapper, Object::toString);
if (videoContentIdList != null && !videoContentIdList.isEmpty()) { if (videoContentIdList != null && !videoContentIdList.isEmpty()) {
this.videoContentService.removeByIds(videoContentIdList); this.videoContentService.removeByIds(videoContentIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, videoContentIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::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 LambdaQueryWrapper<ExhibitionBoard> exhibitionBoardLambdaQueryWrapper = Wrappers.<ExhibitionBoard>lambdaQuery().in(ExhibitionBoard::getVideoContentId, videoContentIdList).select(ExhibitionBoard::getId);
final List<String> ExhibitionBoardIdList = this.exhibitionBoardService.listObjs(exhibitionBoardLambdaQueryWrapper, Object::toString); final List<String> ExhibitionBoardIdList = this.exhibitionBoardService.listObjs(exhibitionBoardLambdaQueryWrapper, Object::toString);
if (ExhibitionBoardIdList != null && !ExhibitionBoardIdList.isEmpty()) { if (ExhibitionBoardIdList != null && !ExhibitionBoardIdList.isEmpty()) {
this.exhibitionBoardService.removeByIds(ExhibitionBoardIdList); this.exhibitionBoardService.removeByIds(ExhibitionBoardIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, ExhibitionBoardIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, ExhibitionBoardIdList)); this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, ExhibitionBoardIdList));
final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, ExhibitionBoardIdList); final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, ExhibitionBoardIdList);
...@@ -333,7 +329,6 @@ public class CopyrightOwnerController extends BaseController { ...@@ -333,7 +329,6 @@ public class CopyrightOwnerController extends BaseController {
final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(exhibitionBoardLambdaQueryWrapper, Object::toString); final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(exhibitionBoardLambdaQueryWrapper, Object::toString);
if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) { if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) {
this.exhibitionBoardService.removeByIds(exhibitionBoardIdList); this.exhibitionBoardService.removeByIds(exhibitionBoardIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, exhibitionBoardIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList)); this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList));
final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardIdList); final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardIdList);
......
...@@ -64,8 +64,6 @@ public class ExhibitionBoardCatController extends BaseController { ...@@ -64,8 +64,6 @@ public class ExhibitionBoardCatController extends BaseController {
@Resource @Resource
private LearningContentCopyrightOwnerService learningContentCopyrightOwnerService; private LearningContentCopyrightOwnerService learningContentCopyrightOwnerService;
@Resource @Resource
private AuditService auditService;
@Resource
private AssetService assetService; private AssetService assetService;
@PostMapping("/save") @PostMapping("/save")
...@@ -213,7 +211,6 @@ public class ExhibitionBoardCatController extends BaseController { ...@@ -213,7 +211,6 @@ public class ExhibitionBoardCatController extends BaseController {
final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(exhibitionBoardLambdaQueryWrapper, Object::toString); final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(exhibitionBoardLambdaQueryWrapper, Object::toString);
if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) { if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) {
this.exhibitionBoardService.removeByIds(exhibitionBoardIdList); this.exhibitionBoardService.removeByIds(exhibitionBoardIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, exhibitionBoardIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList)); this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList));
final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardIdList); final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, exhibitionBoardIdList);
......
...@@ -62,8 +62,6 @@ public class VideoContentCatController extends BaseController { ...@@ -62,8 +62,6 @@ public class VideoContentCatController extends BaseController {
@Resource @Resource
private LearningContentService learningContentService; private LearningContentService learningContentService;
@Resource @Resource
private AuditService auditService;
@Resource
private AssetService assetService; private AssetService assetService;
@PostMapping(value = "/save") @PostMapping(value = "/save")
...@@ -187,14 +185,12 @@ public class VideoContentCatController extends BaseController { ...@@ -187,14 +185,12 @@ public class VideoContentCatController extends BaseController {
final List<String> videoContentIdList = this.videoContentService.listObjs(lambdaQueryWrapper, Object::toString); final List<String> videoContentIdList = this.videoContentService.listObjs(lambdaQueryWrapper, Object::toString);
if (videoContentIdList != null && !videoContentIdList.isEmpty()) { if (videoContentIdList != null && !videoContentIdList.isEmpty()) {
this.videoContentService.removeByIds(videoContentIdList); this.videoContentService.removeByIds(videoContentIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, videoContentIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::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 LambdaQueryWrapper<ExhibitionBoard> queryWrapper = Wrappers.<ExhibitionBoard>lambdaQuery().in(ExhibitionBoard::getVideoContentId, videoContentIdList).select(ExhibitionBoard::getId);
final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(queryWrapper, Object::toString); final List<String> exhibitionBoardIdList = this.exhibitionBoardService.listObjs(queryWrapper, Object::toString);
if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) { if (exhibitionBoardIdList != null && !exhibitionBoardIdList.isEmpty()) {
this.exhibitionBoardService.removeByIds(exhibitionBoardIdList); this.exhibitionBoardService.removeByIds(exhibitionBoardIdList);
this.auditService.remove(Wrappers.<Audit>lambdaUpdate().in(Audit::getRefItemId, exhibitionBoardIdList));
this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList)); this.assetService.remove(Wrappers.<Asset>lambdaUpdate().in(Asset::getRefItemId, exhibitionBoardIdList));
final LambdaQueryWrapper<LearningContentBoard> learningContentBoardLambdaQueryWrapper = Wrappers.<LearningContentBoard>lambdaQuery().in(LearningContentBoard::getExhibitionBoardCatId, 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