lrf %!s(int64=2) %!d(string=hai) anos
pai
achega
3f0a2e1185
Modificáronse 2 ficheiros con 8 adicións e 7 borrados
  1. 1 1
      app/service/trade/afterSale.js
  2. 7 6
      app/service/util/install.js

+ 1 - 1
app/service/trade/afterSale.js

@@ -101,7 +101,7 @@ class AfterSaleService extends CrudService {
 
     // 退款请求
     const refundRes = await this.ctx.service.trade.pay.refund(obj);
-    console.log(refundRes);
+    // console.log(refundRes);
   }
 }
 

+ 7 - 6
app/service/util/install.js

@@ -16,7 +16,7 @@ class InstallService extends CrudService {
     await this.initDict();
     await this.initAdmin();
     await this.initSelfShop();
-    await this.initTestCustomer();
+    // await this.initTestCustomer();
     await this.initGoodsTags();
   }
 
@@ -41,11 +41,12 @@ class InstallService extends CrudService {
    */
   async initTestCustomer() {
     const model = this.ctx.model.User.User;
-    const num = await model.count({ code: 'self' });
-    if (num > 0) return;
-    const p = path.resolve(this.dataIndex, 'user.js');
-    const data = require(p);
-    await model.create(data);
+    await model.deleteMany({ name: '测试用户', phone: '11111111111' });
+    // const num = await model.count({ code: 'self' });
+    // if (num > 0) return;
+    // const p = path.resolve(this.dataIndex, 'user.js');
+    // const data = require(p);
+    // await model.create(data);
   }