lrf 2 years ago
parent
commit
97cb6488cf
2 changed files with 2 additions and 1 deletions
  1. 1 1
      app/model/user/userCoupon.js
  2. 1 0
      app/service/user/userCoupon.js

+ 1 - 1
app/model/user/userCoupon.js

@@ -6,7 +6,7 @@ const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
 const userCoupon = {
   customer: { type: String, required: false, zh: '顾客', ref: 'User.User' }, //
   shop: { type: String, required: false, zh: '发行店铺', ref: 'Shop.Shop' }, //
-  coupon: { type: String, required: false, zh: '优惠券' }, //
+  coupon: { type: Object, required: false, zh: '优惠券' }, //
   status: { type: String, required: false, default: '0', zh: '是否使用' }, //
 };
 const schema = new Schema(userCoupon, { toJSON: { getters: true, virtuals: true } });

+ 1 - 0
app/service/user/userCoupon.js

@@ -505,6 +505,7 @@ class UserCouponService extends CrudService {
   }
   async afterQuery(filter, data) {
     data = JSON.parse(JSON.stringify(data));
+    console.log(data);
     data = this.makeShowData(data);
     return data;
   }