Commit 6f640e30 by 王栋源

wdy

parent 84f2c680
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class TaskPushPublicService extends TaskBase {
constructor() {
super(TaskBase.getServiceName(AliicapiTask));
this.restclient = system.getObject("util.restClient");
}
async beforeTask(params) {
console.log("前置操作......", this.serviceName);
//this.isThrough=true;
//console.log(this.cacheManager);
}
async subDoTask() {
console.log("--------------");
console.log("TestTask1.....");
var obj = {
"actionType": "taskpolicyneed2fq",
"actionBody": {
"limit": 100 //推送数据条数 默认100条
}
}
try {
var url = settings.centerChannelUrl() + "api/auth/taskapi/taskPushPublicService";
var icinfo = await this.restclient.execPost(obj, url);
console.log(icinfo);
return icinfo;
} catch (error) {
console.log(error);
return null;
}
}
}
module.exports = AliicapiTask;
// var a=new AliicapiTask();
// a.subDoTask();
\ No newline at end of file
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