spec_pull.js 589 B

12345678910111213141516171819202122232425262728293031
  1. 'use strict';
  2. /**
  3. *
  4. *
  5. * @author Mai
  6. * @date 2018/9/26
  7. * @version
  8. */
  9. module.exports = app => {
  10. class SpecPull extends app.BaseService {
  11. /**
  12. * 构造函数
  13. *
  14. * @param {Object} ctx - egg全局变量
  15. * @return {void}
  16. */
  17. constructor(ctx) {
  18. super(ctx);
  19. this.tableName = 's2b_spec_pull';
  20. }
  21. async syncLedger (pid) {
  22. const pull = await this.getDataByCondition({ pid, valid: 1, pull_type: 'sync-ledger' });
  23. return pull;
  24. }
  25. }
  26. return SpecPull;
  27. };