reward.js 813 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. const { CrudService } = require('naf-framework-mongoose-free/lib/service');
  3. const { BusinessError, ErrorCode } = require('naf-core').Error;
  4. const _ = require('lodash');
  5. const assert = require('assert');
  6. const moment = require('moment');
  7. // 研发补贴,奖励兑现申领
  8. class RewardService extends CrudService {
  9. constructor(ctx) {
  10. super(ctx, 'reward');
  11. this.model = this.ctx.model.Cysci.Reward;
  12. // this.order = this.ctx.model.RewardOrder;
  13. }
  14. // async update({ id }, body) {
  15. // const data = await this.model.findById(id);
  16. // if (!data) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '未找到数据');
  17. // await this.model.updateOne({ _id: id }, body);
  18. // const { status } = body;
  19. // if (status === '1') {
  20. // }
  21. // }
  22. }
  23. module.exports = RewardService;