|
@@ -65,8 +65,11 @@ public class RetrievalFacade extends RetrievalServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<GetRetrievalsByTagDTO> getRetrievalsByTag(GetRetrievalsByTagVO getRetrievalsByTagVO) {
|
|
|
-
|
|
|
- return this.baseMapper.getRetrievalsByTag(getRetrievalsByTagVO);
|
|
|
+ List<GetRetrievalsByTagDTO> retList = baseMapper.getRetrievalsByTag(getRetrievalsByTagVO);
|
|
|
+ if(retList.size()==0){
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS);
|
|
|
+ }
|
|
|
+ return retList;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -78,7 +81,9 @@ public class RetrievalFacade extends RetrievalServiceImpl {
|
|
|
public Boolean delRetrievalsByQuesId(DelRetrievalsByQuesIdVO delRetrievalsByQuesIdVO) {
|
|
|
QueryWrapper<RetrievalMapping> mappingQe = new QueryWrapper<>();
|
|
|
mappingQe.eq("question_id", delRetrievalsByQuesIdVO.getQuestionId());
|
|
|
-
|
|
|
+ if(retrievalMappingFacade.count(mappingQe)==0){
|
|
|
+ throw new CommonException(CommonErrorCode.NOT_EXISTS);
|
|
|
+ }
|
|
|
String userId = UserUtils.getCurrentPrincipleID();
|
|
|
RetrievalMapping retrievalMapping = new RetrievalMapping();
|
|
|
retrievalMapping.setGmtModified(DateUtil.now());
|