var APIBase = require("../../api.base");
var system = require("../../../system");

class TestAPI extends APIBase {
  constructor() {
    super();
    // this.orderSve = system.getObject("service.order.orderSve");
    // this.platformUtils = system.getObject("util.businessManager.opPlatformUtils");
    this.invoiceSve = system.getObject("service.invoice.invoiceSve");
  }

  async test(pobj, query, req) {
    // var tmp = await this.orderSve.createLicense(pobj.action_body);
    //获取验证码
    // await this.platformUtils.fetchVCode(pobj.action_body.mobile);
    //创建用户
    // var result = await this.platformUtils.createUserInfo("13075556691", "13075556693", "9366");
    //创建用户
    // var result = await this.platformUtils.login("13075556691", "9366");
    var result = {};
    try {
      await this.invoiceSve.sendInvoiceToDz({id: "11665025426002758"});
    } catch (e) {
      console.log(e);
    }
    return result;
  }

  exam() {
    return "";
  }

  classDesc() {
    return {
      groupName: "",
      groupDesc: "",
      name: "",
      desc: "",
      exam: "",
    };
  }

  methodDescs() {
    return [
      {
        methodDesc: "",
        methodName: "",
        paramdescs: [
          {
            paramDesc: "",
            paramName: "",
            paramType: "",
            defaultValue: "",
          }
        ],
        rtnTypeDesc: "",
        rtnType: ""
      }
    ];
  }
}

module.exports = TestAPI;