xiongzhu 4 лет назад
Родитель
Сommit
6ec00b1b79

+ 3 - 0
src/main/java/com/izouma/nineth/repo/AssetRepo.java

@@ -36,4 +36,7 @@ public interface AssetRepo extends JpaRepository<Asset, Long>, JpaSpecificationE
 
     @Query("select a from Asset a join Order o on o.assetId = a.id join Asset aa on aa.orderId = o.id where a.id = ?1")
     Optional<Asset> findChild(Long id);
+
+    @Query("select a from Asset a join User u on a.userId = u.id where a.consignment = true and u.settleAccountId is null")
+    List<Asset> findNoAccount();
 }

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

@@ -101,7 +101,7 @@
         <div class="box">
             <page-title title="更多藏品" :isLink="false"></page-title>
             <van-list
-                style="padding-bottom: 100px;"
+                style="padding-bottom: 100px"
                 class="box-list"
                 v-model:loading="loading"
                 :finished="finished"

+ 3 - 3
src/main/nine-space/src/views/Givesubmit.vue

@@ -60,7 +60,7 @@
 </template>
 
 <script>
-const path = require('path');
+import resolveUrl from 'resolve-url';
 import { add } from 'mathjs';
 import { mapState } from 'vuex';
 import product from '../mixins/product';
@@ -151,7 +151,7 @@ export default {
                             this.$nextTick(() => {
                                 if (this.payType === 'ALIPAY') {
                                     document.location.replace(
-                                        path.resolve(this.$baseUrl, 'payOrder/gift/alipay?id=' + res.id)
+                                        resolveUrl(this.$baseUrl, 'payOrder/gift/alipay?id=' + res.id)
                                     );
                                 } else if (this.payType === 'WEIXIN') {
                                     if (this.inWeixin) {
@@ -185,7 +185,7 @@ export default {
                                             });
                                     } else {
                                         document.location.replace(
-                                            path.resolve(this.$baseUrl, 'payOrder/gift/weixin_h5?id=' + res.id)
+                                            resolveUrl(this.$baseUrl, 'payOrder/gift/weixin_h5?id=' + res.id)
                                         );
                                     }
                                 }

+ 2 - 2
src/main/nine-space/src/views/Submit.vue

@@ -59,10 +59,10 @@
 </template>
 
 <script>
-const path = require('path');
 import product from '../mixins/product';
 import coupon from '../mixins/coupon';
 import { mapState } from 'vuex';
+import resolveUrl from 'resolve-url';
 let inWeixin = /micromessenger/i.test(navigator.userAgent);
 let inApp = /#cordova#/i.test(navigator.userAgent);
 export default {
@@ -212,7 +212,7 @@ export default {
                         this.$nextTick(() => {
                             if (this.payType === 'ALIPAY') {
                                 if (this.inWeixin) {
-                                    window.open(path.resolve(this.$baseUrl, '/payOrder/alipay_wx?id=' + res.id));
+                                    window.open(resolveUrl(this.$baseUrl, '/payOrder/alipay_wx?id=' + res.id));
                                 } else {
                                     this.$http
                                         .get(`/payOrder/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res.id}`)

+ 2 - 2
src/main/nine-space/src/views/asset/Detail.vue

@@ -147,7 +147,7 @@
                     <div class="prive" v-if="init.length > 0">
                         <div class="prive1" :class="{ opened: item.opened }" v-for="(item, index) in init" :key="index">
                             <img v-if="!item.opened" class="img" :src="item.icon[0]" alt="" />
-                            <div style="margin-top: 4px;" v-if="item.icon[2]">
+                            <div style="margin-top: 4px" v-if="item.icon[2]">
                                 <img v-if="item.opened" class="img" :src="item.icon[2]" alt="" />
                             </div>
                             <!-- <img class="img" v-else :src="item.icon[0]" alt="" /> -->
@@ -190,7 +190,7 @@
                             <div class="text4">{{ item.createdAt.substr(0, 16) }}</div>
                         </div>
                     </div>
-                    <div v-else style="display: flex; justify-content: center;">暂无购买记录</div>
+                    <div v-else style="display: flex; justify-content: center">暂无购买记录</div>
                 </van-collapse-item>
             </van-collapse>
 

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

@@ -66,8 +66,13 @@ class AssetServiceTest extends ApplicationTests {
 
     @Test
     public void cancelCon() {
-        for (Asset asset : assetRepo.findByConsignmentTrue()) {
-            assetService.cancelConsignment(asset.getId());
+        for (Asset asset : assetRepo.findNoAccount()) {
+            try {
+                assetService.cancelConsignment(asset.getId());
+            } catch (Exception e) {
+
+            }
         }
     }
+
 }

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

@@ -73,7 +73,7 @@ public class OrderServiceTest extends ApplicationTests {
 
     @Test
     public void cancel() {
-        orderService.cancel(9892L);
+        orderService.cancel(6721L);
     }
 
     @Test