//tag规则 release-v188.6.*
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class Taskcustomer2fq extends TaskBase {
  constructor() {
    super(TaskBase.getServiceName(Taskcustomer2fq));
    this.restclient = system.getObject("util.restClient");
    this.fqbossUrl = settings.fqbossUrl();
  }
  async beforeTask(params) {
    console.log("前置操作......", this.serviceName);
    //this.isThrough=true; 
    //console.log(this.cacheManager);
  }
  //商标联系人地址修改后推送到阿里任务
  async subDoTask() {
    console.log("--------------");
    console.log("TestTask1.....");
    var obj = {
      "actionType": "Taskalitmupdate",
      "actionBody": {
        "limit": 100 //推送数据条数 默认100条
      }
    }
    try {
      var url = this.fqbossUrl + "web/customerInfoPusherCtl/pushInfo";
      var rtn = await this.restclient.execPost(obj, url);
      console.log(rtn);
      return rtn;
    } catch (error) {
      console.log(error);
      return null;
    }
  }
}
module.exports = Taskcustomer2fq;