//tag规则 release-v188.12.*
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class TmreportTask extends TaskBase {
  constructor() {
    super(TaskBase.getServiceName(TmreportTask));
    this.restclient = system.getObject("util.restClient");
    this.igirlWeburl = settings.igirlWeburl();
  }
  async beforeTask(params) {
    console.log("前置操作......", this.serviceName);
  }
  async subDoTask() {
    console.log("--------------");
    console.log("TestTask1.....");
    try {
      var url = this.igirlWeburl + "api/tmtransactionApi/tmreport";
      this.restclient.execGet(null, url);
      return system.getResultSuccess();
    } catch (error) {
      console.log(error);
      return null;
    }
  }
}
module.exports = TmreportTask;