//tag规则 release-v188.10.*  商标交易  同步阿里需求信息
//任务名tmtransferneed 拉取
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class TmtransactionTask extends TaskBase {
  constructor() {
    super(TaskBase.getServiceName(TmtransactionTask));
    this.restclient = system.getObject("util.restClient");
    this.centerChannelUrl = settings.centerChannelUrl();
  }
  async beforeTask(params) {
    console.log("前置操作......", this.serviceName);
  }
  // 2020 1012 lin 新增 调用QueryTradeIntentionUserList没有测过
  async subDoTask() {
    console.log("--------------");
    console.log("QueryTradeIntentionUserList.....");
    var obj = {
      "actionType": "QueryTradeIntentionUserList",
      "actionBody": {
      }
    }
    try {
      var url = this.centerChannelUrl + "api/auth/taskapi/QueryTradeIntentionUserList";
      var transferinfo = await this.restclient.execPost(obj, url);
      console.log(transferinfo);
      return transferinfo;
    } catch (error) {
      console.log(error);
      return null;
    }
  }
}
module.exports = TmtransactionTask;