1234567891011121314151617181920212223 |
- 'use strict';
- const { CrudService } = require('naf-framework-mongoose/lib/service');
- const { BusinessError, ErrorCode } = require('naf-core').Error;
- const _ = require('lodash');
- const assert = require('assert');
- const moment = require('moment');
- // 研发补贴,奖励兑换订单
- class Reward_orderService extends CrudService {
- constructor(ctx) {
- super(ctx, 'reward_order');
- this.model = this.ctx.model.RewardOrder;
- }
- async create(body) {
- const no = `${moment().format('YYYYMMDD')}${moment().format('x')}DF`;
- const create_time = moment().format('YYYY-MM-DD HH:mm:ss');
- body = { ...body, no, create_time };
- return await this.model.create(body);
- }
- }
- module.exports = Reward_orderService;
|