xiongzhu 3 years ago
parent
commit
6e648f7fd7

+ 0 - 2
src/main/java/com/izouma/nineth/service/AssetService.java

@@ -25,7 +25,6 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.context.ApplicationContext;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
-import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
@@ -268,7 +267,6 @@ public class AssetService {
         assetRepo.save(asset);
     }
 
-    @Async
     public void transfer(Asset asset, BigDecimal price, User toUser, String reason, Long orderId) {
         log.info("转让藏品 fromAssetId={} toUser={}", asset.getId(), toUser.getId());
         Asset newAsset = new Asset();

+ 1 - 1
src/test/java/com/izouma/nineth/service/AssetServiceTest.java

@@ -98,7 +98,7 @@ class AssetServiceTest extends ApplicationTests {
         List<Asset> assets = assetRepo.findByStatusIn(Arrays.asList(AssetStatus.GIFTING, AssetStatus.TRADING));
         System.out.println(assets.size());
         for (Asset asset : assets) {
-            if (asset.getCreatedAt().isAfter(LocalDateTime.of(2022, 3, 6, 0, 0, 0))) continue;
+            if (asset.getModifiedAt().isAfter(LocalDateTime.of(2022, 3, 10, 16, 0, 0))) continue;
             if (assetRepo.findByFromAssetId(asset.getId()).isEmpty()) {
                 if (asset.getStatus() == AssetStatus.GIFTING) {
                     List<GiftOrder> list = giftOrderRepo.findByAssetIdAndStatusIn(asset.getId(), Arrays.asList(OrderStatus.PROCESSING, OrderStatus.FINISH));