repository中添加新的数据库操作

package gxlu.flow.module.demo.respository;


import java.util.List;


import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;


import gxlu.flow.module.demo.entity.SupplierEnclosure;
@Repository
public interface SupplierEnclosureRespository extends JpaRepository, JpaSpecificationExecutor{


@Query(value = "select * from D_IOT_SUPPLIER_Enclosure where supplier_id =:supplierId", nativeQuery = true)
List findAllBySupplierId (@Param("supplierId") Long supplierId);
}

你可能感兴趣的:(java,web,开发备忘,Spring)