|
@@ -7,7 +7,6 @@ import org.springframework.data.jpa.repository.Modifying;
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
|
|
|
|
|
import javax.transaction.Transactional;
|
|
import javax.transaction.Transactional;
|
|
|
-import java.util.List;
|
|
|
|
|
|
|
|
|
|
public interface AttachmentRepo extends JpaRepository<Attachment, Long>, JpaSpecificationExecutor<Attachment> {
|
|
public interface AttachmentRepo extends JpaRepository<Attachment, Long>, JpaSpecificationExecutor<Attachment> {
|
|
|
@Query("update Attachment t set t.del = true where t.id = ?1")
|
|
@Query("update Attachment t set t.del = true where t.id = ?1")
|
|
@@ -17,6 +16,6 @@ public interface AttachmentRepo extends JpaRepository<Attachment, Long>, JpaSpec
|
|
|
|
|
|
|
|
@Query(nativeQuery = true, value = "select ifnull(max(attachment.version + 1),1) " +
|
|
@Query(nativeQuery = true, value = "select ifnull(max(attachment.version + 1),1) " +
|
|
|
"from attachment " +
|
|
"from attachment " +
|
|
|
- "where del = true and patent_id = ?2 and attachment_name like '%'+ ?1 + '%'")
|
|
|
|
|
|
|
+ "where del = true and patent_id = ?2 and attachment_name like ?1")
|
|
|
int findVersion(String attachmentName, Long patentId);
|
|
int findVersion(String attachmentName, Long patentId);
|
|
|
}
|
|
}
|