var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctlms.base");
const logCtl = system.getObject("web.common.oplogCtl");

var cacheBaseComp = null;
class MerchantrechargeCtl extends CtlBase {
  constructor() {
    super();
    this.merchantrechargeSve = system.getObject("service.merchant.merchantrechargeSve");
  }

  async page(pobj, pobj2, req) {
    try {
      return await this.merchantrechargeSve.page(pobj);
    } catch (e) {
      console.log(e);
      return system.getResultFail(500, "接口错误");
    }
  }

  async info(pobj, pobj2, req) {
    try {
      return await this.merchantrechargeSve.info(pobj);
    } catch (e) {
      console.log(e);
      return system.getResultFail(500, "接口错误");
    }
  }

  async audit(pobj, pobj2, req) {
    try {
      var loginUser = req.loginUser;
      pobj.opUser = {
        "ucid": loginUser.ucid,
        "ucname": loginUser.ucname
      }
      return await this.merchantrechargeSve.audit(pobj);
    } catch (e) {
      console.log(e);
      return system.getResultFail(500, "接口错误");
    }
  }
}
module.exports = MerchantrechargeCtl;