xiongzhu 4 лет назад
Родитель
Сommit
61af91934b

+ 3 - 3
src/main/java/com/izouma/nineth/service/OrderService.java

@@ -159,8 +159,7 @@ public class OrderService {
             Asset asset = assetRepo.findById(collection.getAssetId()).orElseThrow(new BusinessException("资产不存在"));
             asset.setStatus(AssetStatus.TRADING);
             assetRepo.save(asset);
-            collection.setOnShelf(false);
-            collectionRepo.save(collection);
+            collectionRepo.setOnShelf(collection.getId(), false);
         }
         order = orderRepo.save(order);
         if (order.getTotalPrice().equals(BigDecimal.ZERO)) {
@@ -450,11 +449,12 @@ public class OrderService {
                 asset.setStatus(AssetStatus.NORMAL);
                 assetRepo.save(asset);
             }
-            collection.setOnShelf(true);
+            collectionRepo.setOnShelf(collection.getId(), true);
         }
         collectionRepo.increaseSale(collection.getId(), -order.getQty());
         collectionRepo.increaseStock(collection.getId(), order.getQty());
 
+
         order.setStatus(OrderStatus.CANCELLED);
         order.setCancelTime(LocalDateTime.now());
         orderRepo.save(order);

+ 1 - 1
src/main/nine-space/src/mixins/product.js

@@ -43,7 +43,7 @@ export default {
             startTime: '',
             sortOptions: {
                 精选盲盒: 'soldOut;sort,desc',
-                本期推荐: 'soldOut;sale,desc;sort,desc',
+                本期推荐: 'soldOut;sort,desc',
                 最HOT收藏品: 'soldOut;likes,desc;sort,desc;createdAt,desc',
                 更多藏品: 'soldOut;source,asc;sale,desc;likes,desc'
             },

+ 1 - 1
src/main/nine-space/src/views/Discover.vue

@@ -74,7 +74,7 @@
         <div class="box" v-if="products.length > 0">
             <page-title
                 title="本期推荐"
-                :to="{ path: '/productList', query: { type: 'DEFAULT', title: '本期推荐' } }"
+                :to="{ path: '/productList', query: { type: 'DEFAULT', title: '本期推荐', source: 'OFFICIAL' } }"
             ></page-title>
             <div class="box-list">
                 <template v-for="(item, index) in products" :key="item.id">