zhaowenyu
2026-03-10 2bc58be7a80281d157d914fe5777fbda21862d69
ard-sample/src/main/java/com/ard/sample/annotation/service/impl/AnnotationServiceImpl.java
@@ -35,8 +35,8 @@
     * 新增:修改标注显示状态
     */
    @Override
    public boolean updateAnnotationVisible(String id, Integer isTrue) {
        if (id == null || id.isEmpty() || isTrue == null || (isTrue != 0 && isTrue != 1)) {
    public boolean updateAnnotationVisible(String id, Boolean isTrue) {
        if (id == null || id.isEmpty() || isTrue == null) {
            log.error("修改标注显示状态失败:参数非法,id={}, isTrue={}", id, isTrue);
            return false;
        }
@@ -76,4 +76,18 @@
        }
        return lambdaQuery().eq(AnnotationEntity::getDirectoryId, directoryId).list();
    }
    /**
     * 按标注ID获取详细信息(核心实现)
     */
    @Override
    public AnnotationEntity getAnnotationById(String id) {
        // 1. 参数校验
        if (id == null || id.isEmpty()) {
            log.error("按ID查询标注失败:标注ID为空");
            return null;
        }
        // 2. MyBatis-Plus通用查询(根据主键ID查询)
        return getById(id);
    }
}