@@ -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);
}
@@ -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 + '%'));
});