'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 RewardService extends CrudService { constructor(ctx) { super(ctx, 'reward'); this.model = this.ctx.model.Reward; this.order = this.ctx.model.RewardOrder; } // async update({ id }, body) { // const data = await this.model.findById(id); // if (!data) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '未找到数据'); // await this.model.updateOne({ _id: id }, body); // const { status } = body; // if (status === '1') { // } // } } module.exports = RewardService;