var system = require("../../../system")
const http = require("http")
const querystring = require('querystring');
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
const logCtl = system.getObject("web.common.oplogCtl");
const uuidv4 = require('uuid/v4');
var svgCaptcha = require('svg-captcha');

var cacheBaseComp = null;
class MerchantaccountCtl extends CtlBase {
  constructor() {
    super("merchant", CtlBase.getServiceName(MerchantaccountCtl));

    this.redisClient = system.getObject("util.redisClient");

    this.merchantSve = system.getObject("service.merchant.merchantSve");
  }
  async accountList(pobj, pobj2, req) {
    try {
      var condition = {
        currentPage: pobj.currentPage,
        pageSize: pobj.pageSize,
        merchantName: this.trim(pobj.merchantName),
        merchantId: pobj.merchantId
      }
      var page = await this.service.pageByCondition(condition);
      return system.getResultSuccess(page);
    } catch (error) {
      console.log(error);
      return system.getResultFail(500, "接口异常：" + error.message);
    }
  }
}
module.exports = MerchantaccountCtl;