优化笔记删除

This commit is contained in:
wangxulei 2025-01-08 10:33:12 +08:00
parent 2e49061caa
commit cdd5cbcfd9

View File

@ -17,6 +17,7 @@ import com.dd.admin.business.upNotes.domain.UpNotesVo;
import com.dd.admin.business.upNotes.service.UpNotesService;
import com.dd.admin.common.aop.operationLog.aop.OperLog;
import com.dd.admin.common.aop.operationLog.aop.OperType;
import com.dd.admin.common.exception.ApiException;
import com.dd.admin.common.model.result.ResultBean;
import com.dd.admin.common.security.SecurityUtil;
import com.dd.admin.common.security.jwt.JwtTokenUtil;
@ -103,7 +104,9 @@ public class ApiController {
noteDto.setFollowId(followId);
}
NoteVo noteVo = noteService.selectNoteDetail(noteDto);
if(noteVo==null){
throw new ApiException("笔记不存在");
}
NoteImgDto noteImgDto = new NoteImgDto();
noteImgDto.setNoteId(noteVo.getNoteId());
List<NoteImgVo> noteImgVos = noteImgService.selectNoteImgList(noteImgDto);