|
|
@@ -2,6 +2,9 @@ package com.uas.platform.b2c.prod.product.brand.dao;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
+import com.uas.platform.b2c.prod.product.brand.modal.BrandMostSimpleInfo;
|
|
|
+import org.springframework.data.domain.Page;
|
|
|
+import org.springframework.data.domain.Pageable;
|
|
|
import org.springframework.data.jpa.repository.JpaRepository;
|
|
|
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
|
|
import org.springframework.data.jpa.repository.Query;
|
|
|
@@ -67,4 +70,12 @@ public interface BrandDao extends JpaSpecificationExecutor<Brand>, JpaRepository
|
|
|
*/
|
|
|
@Query("select b from Brand b where upper(b.nameCn)=upper(:nameCn)")
|
|
|
public List<Brand> findByUpperNameCn(@Param("nameCn") String nameCn);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页根据首字母获取品牌信息
|
|
|
+ * @param initals
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @Query(value = "select b from Brand b where b.inital in :initals and b.nameEn like :key")
|
|
|
+ public Page<Brand> findInInitalsPage(@Param("initals") String[] initals ,@Param("key") String keyword, Pageable pageable);
|
|
|
}
|