소스 검색

修改提现审核

zs 1 년 전
부모
커밋
6a0aa78801
2개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      app/controller/user/config/.cashOut.js
  2. 2 0
      app/model/user/cashOut.js

+ 3 - 2
app/controller/user/config/.cashOut.js

@@ -1,6 +1,6 @@
 module.exports = {
   create: {
-    requestBody: ['card_name', 'card_bank', 'card', '!money', '!customer', '!apply_time', '!apply_reason', 'deal_person', 'exam_time', 'exam_reason', 'status'],
+    requestBody: ['shop', 'card_name', 'card_bank', 'card', '!money', '!customer', '!apply_time', '!apply_reason', 'deal_person', 'exam_time', 'exam_reason', 'status'],
   },
   destroy: {
     params: ['!id'],
@@ -8,7 +8,7 @@ module.exports = {
   },
   update: {
     params: ['!id'],
-    requestBody: ['card_name', 'card_bank', 'card', 'money', 'customer', 'apply_time', 'apply_reason', 'deal_person', 'exam_time', 'exam_reason', 'status'],
+    requestBody: ['shop', 'card_name', 'card_bank', 'card', 'money', 'customer', 'apply_time', 'apply_reason', 'deal_person', 'exam_time', 'exam_reason', 'status'],
   },
   show: {
     parameters: {
@@ -21,6 +21,7 @@ module.exports = {
       query: {
         'meta.createdAt@start': 'meta.createdAt@start',
         'meta.createdAt@end': 'meta.createdAt@end',
+        shop: 'shop',
         customer: 'customer',
         apply_time: 'apply_time',
         deal_person: 'deal_person',

+ 2 - 0
app/model/user/cashOut.js

@@ -5,6 +5,7 @@ const MoneyPlugin = require('naf-framework-mongoose-free/lib/model/type-money-pl
 
 // 提现表
 const cashOut = {
+  shop: { type: String, required: false, zh: '店铺id' }, //
   customer: { type: String, required: false, zh: '申请人', ref: 'User.User' }, //
   apply_time: { type: String, required: true, zh: '申请时间' }, //
   apply_reason: { type: String, required: true, zh: '申请理由' }, //
@@ -20,6 +21,7 @@ const schema = new Schema(cashOut, { toJSON: { getters: true, virtuals: true } }
 schema.index({ id: 1 });
 schema.index({ 'meta.createdAt': 1 });
 schema.index({ customer: 1 });
+schema.index({ shop: 1 });
 schema.index({ apply_time: 1 });
 schema.index({ deal_person: 1 });
 schema.index({ exam_time: 1 });