licailing 3 лет назад
Родитель
Сommit
b458405aa7

+ 1 - 1
src/main/java/com/izouma/nineth/repo/CollectionRepo.java

@@ -169,5 +169,5 @@ public interface CollectionRepo extends JpaRepository<Collection, Long>, JpaSpec
     @Query("select c from Collection c join c.tags t on t.id = ?1 ")
     Page<Collection> byTag(Long tagId, Pageable pageable);
 
-    Integer countAllBySourceAndNameLike(CollectionSource source, String name);
+    int countAllBySourceAndNameLike(CollectionSource source, String name);
 }

+ 1 - 1
src/main/java/com/izouma/nineth/service/ShowroomService.java

@@ -342,7 +342,7 @@ public class ShowroomService {
                                         String name = StringUtils.isEmpty(collection.getPrefixName()) ?
                                                 collection.getName() : collection.getPrefixName();
                                         showroom.setNum(collectionRepo
-                                                .countAllBySourceAndNameLike(CollectionSource.TRANSFER, name));
+                                                .countAllBySourceAndNameLike(CollectionSource.TRANSFER, '%' + name + '%'));
                                     }
                                 }
                             });