From 7574bc899a54a19d3171103f022241d0f1401d8d Mon Sep 17 00:00:00 2001 From: lanyuanxiaoyao Date: Mon, 4 Nov 2024 18:46:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E7=9A=84=E8=A1=A8=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lanyuanxiaoyao/digtal/market/Entity.kt | 31 +------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/main/kotlin/com/lanyuanxiaoyao/digtal/market/Entity.kt b/src/main/kotlin/com/lanyuanxiaoyao/digtal/market/Entity.kt index 6ae80b8..9231830 100644 --- a/src/main/kotlin/com/lanyuanxiaoyao/digtal/market/Entity.kt +++ b/src/main/kotlin/com/lanyuanxiaoyao/digtal/market/Entity.kt @@ -3,7 +3,6 @@ package com.lanyuanxiaoyao.digtal.market import jakarta.persistence.Column import jakarta.persistence.Entity import jakarta.persistence.Id -import java.io.Serializable import java.util.Date import org.springframework.data.jpa.repository.JpaRepository import org.springframework.data.jpa.repository.JpaSpecificationExecutor @@ -40,34 +39,6 @@ interface ArticleRepository : JpaRepository, JpaSpecificationEx @Query("update Article article set article.pushed = :pushed where article.id = :id") fun updatePushedById(@Param("id") id: String, @Param("pushed") pushed: Boolean) - @Query("select article.id from Article article") + @Query("select article.id from Article article where article.description is not null and article.subtitle is not null and article.score is not null") fun findAllId(): List } - -@Entity -class Link( - @Id var hash: String, - var source: String, - var category: String, -) - -@Repository -interface LinkRepository : JpaRepository { - @Query("select link.hash from Link link") - fun findAllId(): List -} - -data class CategoryId( - val id: String, - val name: String, -) : Serializable - -@Entity -class Category( - @Id var id: CategoryId, - var url: String, - var updateTime: Date?, -) - -@Repository -interface CategoryRepository : JpaRepository