版本管理 版本重复校验

This commit is contained in:
wangw 2024-04-07 11:22:23 +08:00
parent 34610aace9
commit a11b7ebd2e
1 changed files with 2 additions and 2 deletions

View File

@ -13,6 +13,6 @@ import org.springframework.data.jpa.repository.Query;
**/
public interface TbVersionRepository extends JpaRepository<TbVersion, Integer>, JpaSpecificationExecutor<TbVersion> {
@Query("SELECT count(1) FROM TbVersion WHERE source = :name AND type =:type AND version =:version")
int isExist(@Param("type") String type, @Param("name") String name, @Param("version") String version);
@Query("SELECT count(1) FROM TbVersion WHERE source = :source AND type =:type AND version =:version")
int isExist(@Param("source") String source, @Param("type") String type, @Param("version") String version);
}