package com.ruoyi.system.task; import com.ruoyi.system.domain.SysTaskAttachment; import com.ruoyi.system.mapper.SysTaskAttachmentMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class TaskAttachmentServiceImpl implements ITaskAttachmentService{ @Autowired private SysTaskAttachmentMapper taskAttachmentMapper; /** * 检查附件是否已同步 */ @Override public boolean isAttachmentSynced(Long attachmentId) { if (attachmentId == null) { return false; } SysTaskAttachment attachment = taskAttachmentMapper.selectSysTaskAttachmentByAttachmentId(attachmentId); if (attachment == null) { return false; } return attachment.getSyncedToImageData() != null && attachment.getSyncedToImageData() == 1; } @Override public boolean updateAttachment(SysTaskAttachment attachment) { return taskAttachmentMapper.updateSysTaskAttachment(attachment) > 0; } }