Dao层实现
This commit is contained in:
		@@ -0,0 +1,15 @@
 | 
			
		||||
package com.example.springdemo.dao;
 | 
			
		||||
 | 
			
		||||
import com.example.springdemo.entities.Merchants;
 | 
			
		||||
import org.springframework.data.jpa.repository.JpaRepository;
 | 
			
		||||
import org.springframework.stereotype.Repository;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@Repository
 | 
			
		||||
 | 
			
		||||
public interface MerchantsRepository extends JpaRepository<Merchants, Long> {
 | 
			
		||||
    List<Merchants> findByName(String name);
 | 
			
		||||
 | 
			
		||||
    void deleteById(Long id);
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,4 @@
 | 
			
		||||
@NonNullApi
 | 
			
		||||
package com.example.springdemo.dao;
 | 
			
		||||
 | 
			
		||||
import org.springframework.lang.NonNullApi;
 | 
			
		||||
		Reference in New Issue
	
	Block a user