wangqifan il y a 5 ans
Parent
commit
1ff66e9f36

+ 11 - 0
src/main/java/com/izouma/tcg/web/card/CardBoxController.java

@@ -95,5 +95,16 @@ public class CardBoxController extends BaseController {
         }
         return result;
     }
+
+    @GetMapping("/test")
+    public void test() {
+        List<CardBox> all = cardBoxRepo.findAll();
+        all.forEach(cardBox -> {
+            if (cardBox.getUserId() != null & cardBox.getOrderInfoId() != null) {
+                cardBox.setSold(true);
+                cardBoxRepo.save(cardBox);
+            }
+        });
+    }
 }
 

+ 4 - 2
src/main/vue/src/views/CardCaseEdit.vue

@@ -211,7 +211,9 @@ export default {
             rules: {},
             type: null,
             showBox: false,
-            boxFormData: {},
+            boxFormData: {
+                name: ''
+            },
             collectionOptions: [],
             caseStatusOptions: [
                 { label: '未审核', value: 'UNDO' },
@@ -268,7 +270,7 @@ export default {
                     .then(res => {
                         this.showBox = true;
                         if (res.bindName) {
-                            this.boxFormData.name = res.bindName;
+                            this.$set(this.boxFormData, 'name', res.bindName);
                         }
                         if (res.orderInfoId) {
                             this.boxFormData.orderInfoId = res.orderInfoId;