Commit b8ddee8f by 王栋源

wdy

parent ea5214e3
const TaskBase=require("../../task.base"); const TaskBase = require("../../task.base");
const system = require("../../../system"); const system = require("../../../system");
var settings = require("../../../../config/settings"); var settings = require("../../../../config/settings");
class TmtransferTask extends TaskBase{ class TmtransferTask extends TaskBase {
constructor(){ constructor() {
super(TaskBase.getServiceName(TmtransferTask)); super(TaskBase.getServiceName(TmtransferTask));
this.restclient = system.getObject("util.restClient"); this.restclient = system.getObject("util.restClient");
this.igirlWeburl = settings.igirlWeburl(); this.igirlWeburl = settings.igirlWeburl();
} }
async beforeTask(params){ async beforeTask(params) {
console.log("前置操作......",this.serviceName); console.log("前置操作......", this.serviceName);
//this.isThrough=true; //this.isThrough=true;
//console.log(this.cacheManager); //console.log(this.cacheManager);
} }
async subDoTask(){ async subDoTask() {
console.log("--------------"); console.log("--------------");
console.log("TestTask1....."); console.log("TestTask1.....");
try {
var url = this.igirlWeburl + "api/tmtransactionApi/tmAuditData"; var url = this.igirlWeburl + "api/tmtransactionApi/tmAuditData";
var transferinfo = await this.restclient.execGet(null, url); var transferinfo = await this.restclient.execGet(null, url);
var result = JSON.parse(transferinfo.stdout); var result = JSON.parse(transferinfo.stdout);
console.log(result); console.log(result);
return result; return result;
} catch (error) {
return null;
}
} }
} }
module.exports=TmtransferTask; module.exports = TmtransferTask;
var a = new TmtransferTask();
var b = a.doTask();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment