wangqifan 4 éve
szülő
commit
e71649e040

+ 10 - 3
src/main/java/com/izouma/tcg/service/card/CardCaseService.java

@@ -132,11 +132,18 @@ public class CardCaseService {
                             .getName() + cardCase.getCode());
             cardCaseDTO.setImage(cardCase.getCollection().getImages().get(0));
             cardCaseDTO.setEndTime(cardCase.getStartTime());
-            cardCaseDTO.setPrice(cardCase.getBoxPrice());
-            cardCaseDTO.setTotal(cardCase.getCardBoxList().size());
             cardCaseDTO.setCaseStatus(cardCase.getCaseStatus().toString());
             Integer preorderCount = cardBoxRepo.countAllByCardCaseIdAndUserIdNotNull(cardCase.getId());
-            cardCaseDTO.setPreorder(preorderCount);
+
+            cardCaseDTO.setPrice(cardCase.getBoxPrice());
+            if (cardCase.isSpecial()) {
+                cardCaseDTO.setTotal(cardCase.getCardBoxList().size() / 2);
+                cardCaseDTO.setPreorder(preorderCount / 2);
+            } else {
+                cardCaseDTO.setPreorder(preorderCount);
+                cardCaseDTO.setTotal(cardCase.getCardBoxList().size());
+            }
+
             result.add(cardCaseDTO);
         });
         return result;

+ 1 - 0
src/main/java/com/izouma/tcg/service/customizeStore/StoreAuthenticationService.java

@@ -62,5 +62,6 @@ public class StoreAuthenticationService {
         StoreAuthentication storeAuthentication = storeAuthenticationRepo.findById(id)
                 .orElseThrow(new BusinessException("暂无信息"));
         storeAuthentication.setStatus(StoreAuthStatus.DENY);
+        storeAuthenticationRepo.save(storeAuthentication);
     }
 }

+ 4 - 1
src/main/java/com/izouma/tcg/service/orderInfo/OrderInfoService.java

@@ -84,7 +84,10 @@ public class OrderInfoService {
                     .collect(Collectors.groupingBy(CardBox::getGroupCode));
             List<CardBox> AList = stringListMap.get("A");
             List<CardBox> BList = stringListMap.get("B");
-            return AList.size() == BList.size();
+            if (AList != null & BList != null) {
+                return AList.size() == BList.size();
+            }
+            return false;
         }
         return true;
     }