From d5e5f727da2268bb343fadc5fe4b5f7d1ffc4c9f Mon Sep 17 00:00:00 2001 From: chaosBreaking Date: Mon, 30 Sep 2019 11:35:52 +0800 Subject: [PATCH] targetAddress --- src/modules/action/action.handler.js | 4 ++-- src/modules/ticket/ticket.handler.js | 4 ++-- src/modules/ticket/ticket.model.js | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/modules/action/action.handler.js b/src/modules/action/action.handler.js index 34932f0..8995377 100644 --- a/src/modules/action/action.handler.js +++ b/src/modules/action/action.handler.js @@ -59,7 +59,7 @@ function createGroupRewardAction(data = {}) { function createWithdrawAction(data = {}) { // 体现 vic or usdt - const { userId, amount, remain, tokenType } = data; + const { userId, amount, remain, tokenType, detail } = data; return new Action({ userId, type: 3, @@ -67,7 +67,7 @@ function createWithdrawAction(data = {}) { amount, remain, tokenType, - detail: {} + detail }); } diff --git a/src/modules/ticket/ticket.handler.js b/src/modules/ticket/ticket.handler.js index e10ac4b..30e96e0 100644 --- a/src/modules/ticket/ticket.handler.js +++ b/src/modules/ticket/ticket.handler.js @@ -11,9 +11,9 @@ const name2type = { function createTicket (name, data) { const type = name2type[name]; const status = 'created'; - const { userId, handler, action, coinId, option } = data; + const { userId, handler, action, coinId, option, targetAddress } = data; return new Ticket({ - status, type, userId, handler, action, option, coinId + status, type, userId, handler, action, option, coinId, targetAddress }); } diff --git a/src/modules/ticket/ticket.model.js b/src/modules/ticket/ticket.model.js index bbe2c19..71ef7d6 100644 --- a/src/modules/ticket/ticket.model.js +++ b/src/modules/ticket/ticket.model.js @@ -18,7 +18,8 @@ const TicketSchema = new mongoose.Schema({ type: Number }, targetAddress: { - type: String + type: String, + default: '' }, status: { type: String