|  | @@ -0,0 +1,31 @@
 | 
	
		
			
				|  |  | +'use strict';
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/**
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + *
 | 
	
		
			
				|  |  | + * @author Mai
 | 
	
		
			
				|  |  | + * @date 2018/9/26
 | 
	
		
			
				|  |  | + * @version
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +module.exports = app => {
 | 
	
		
			
				|  |  | +    class SpecPull extends app.BaseService {
 | 
	
		
			
				|  |  | +        /**
 | 
	
		
			
				|  |  | +         * 构造函数
 | 
	
		
			
				|  |  | +         *
 | 
	
		
			
				|  |  | +         * @param {Object} ctx - egg全局变量
 | 
	
		
			
				|  |  | +         * @return {void}
 | 
	
		
			
				|  |  | +         */
 | 
	
		
			
				|  |  | +        constructor(ctx) {
 | 
	
		
			
				|  |  | +            super(ctx);
 | 
	
		
			
				|  |  | +            this.tableName = 's2b_spec_pull';
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        async syncLedger (pid) {
 | 
	
		
			
				|  |  | +            const pull = await this.getDataByCondition({ pid, valid: 1, pull_type: 'sync-ledger' });
 | 
	
		
			
				|  |  | +            return pull;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    return SpecPull;
 | 
	
		
			
				|  |  | +};
 |