Commit 8fdc5d85 by 蒋勇

d

parent 2c6f7107
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class AliicapiTask 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/taskAliIcapi";
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
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class TaskPushPublicService extends TaskBase {
constructor() {
super(TaskBase.getServiceName(TaskPushPublicService));
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 = TaskPushPublicService;
// var a=new AliicapiTask();
// a.subDoTask();
\ No newline at end of file
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class ZcbusinessTask extends TaskBase {
constructor() {
super(TaskBase.getServiceName(ZcbusinessTask));
this.restclient = system.getObject("util.restClient");
this.centerOrderUrl = settings.centerOrderUrl();
}
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 = this.centerOrderUrl + "action/policy/springBoard";
var zcinfo = await this.restclient.execPost(obj, url);
console.log(zcinfo);
var result = JSON.parse(zcinfo.stdout);
console.log(result);
return result;
} catch (error) {
console.log(error);
return null;
}
}
}
module.exports = ZcbusinessTask;
\ No newline at end of file
const TaskBase=require("../../task.base");
const settings=require("../../../../config/settings");
var excel = require('exceljs');
const system = require("../../../system");
const fs = require('fs');
class TestTask extends TaskBase{
constructor(){
super(TaskBase.getServiceName(TestTask));
}
async subBeforeTask(params){
console.log("前置操作......",this.serviceName);
}
async subDoTask(params){
console.log(params);
console.log("TestTask1.....");
}
}
module.exports=TestTask;
\ 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