|
|
@@ -50,10 +50,10 @@ class CollectionServiceTest extends ApplicationTests {
|
|
|
|
|
|
@Test
|
|
|
public void batchUpload() throws IOException {
|
|
|
- AtomicInteger num = new AtomicInteger(2001);
|
|
|
+ AtomicInteger num = new AtomicInteger(3001);
|
|
|
List<BlindBoxItem> items = new ArrayList<>();
|
|
|
String jsonStr = FileUtils.readFileToString(new File("/Users/drew/Downloads/003.json"), "UTF-8");
|
|
|
- Arrays.stream(new File("/Users/drew/Downloads/s3-1000").listFiles())
|
|
|
+ Arrays.stream(new File("/Users/drew/Downloads/s4-1000").listFiles())
|
|
|
.filter(f -> Pattern.matches("^BJ.*\\.png$", f.getName()))
|
|
|
.parallel().forEach(file -> {
|
|
|
try {
|
|
|
@@ -66,9 +66,10 @@ class CollectionServiceTest extends ApplicationTests {
|
|
|
collection.setMinterId(8666L);
|
|
|
collection.setOnShelf(false);
|
|
|
collection.setSalable(false);
|
|
|
- collection.setPic(Collections.singletonList(new FileObject("", "https://raex-meta.oss-cn-shenzhen.aliyuncs.com/image/s3/" + file.getName(), null, "png")));
|
|
|
+ collection.setPic(Collections.singletonList(new FileObject("", "https://raex-meta.oss-cn-shenzhen.aliyuncs.com/image/s4/" + file.getName(), null, "png")));
|
|
|
|
|
|
collectionRepo.save(collection);
|
|
|
+ System.out.println("保存成功" + collection.getId());
|
|
|
|
|
|
items.add(BlindBoxItem
|
|
|
.builder()
|
|
|
@@ -88,7 +89,7 @@ class CollectionServiceTest extends ApplicationTests {
|
|
|
public void createBlindBox() throws IOException {
|
|
|
List<Collection> items = collectionRepo.findByNameLike("MAYBEMAN #%").stream().filter(i -> {
|
|
|
int num = Integer.parseInt(i.getName().substring("MAYBEMAN #".length()));
|
|
|
- return num > 2000 && num <= 3000;
|
|
|
+ return num > 3000 && num <= 4000;
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
String jsonStr = FileUtils.readFileToString(new File("/Users/drew/Downloads/003.json"), "UTF-8");
|
|
|
@@ -98,7 +99,7 @@ class CollectionServiceTest extends ApplicationTests {
|
|
|
blindBox.setOnShelf(false);
|
|
|
blindBox.setSalable(false);
|
|
|
blindBox.setMinterId(8666L);
|
|
|
- blindBox.setName("MAYBEMAN潮流艺术限定盲盒S3");
|
|
|
+ blindBox.setName("MAYBEMAN潮流艺术限定盲盒S4");
|
|
|
blindBox.setPic(Arrays.asList(new FileObject(null, "https://raex-meta.oss-cn-shenzhen.aliyuncs.com/nft/2022-01-07-10-08-30DpIYYBOv.jpg", null, null)));
|
|
|
collectionService.createBlindBox(new CreateBlindBox(blindBox, items.stream().map(i -> {
|
|
|
BlindBoxItem item = new BlindBoxItem();
|