var system = require("../../../system")
var settings = require("../../../../config/settings");
const CtlBase = require("../../ctl.base");
var cacheBaseComp = null;

class FormInfoCtl extends CtlBase {
    constructor() {
        super("templateinfomag", CtlBase.getServiceName(FormInfoCtl));
        this.templateinfoSve = system.getObject('service.template.templateinfoSve');
    }

    /**
     * 重写查询方法
     * @param pobj
     * @returns {Promise<{msg: string, data: *, bizmsg: string, status: number}>}
     */
    async findAndCountAll(pobj) {
        let result = await this.templateinfoSve.findByCompanyId(pobj);
        return result;
    }

    /**
     * 重写保存方法
     * @param pobj
     * @returns {Promise<void>}
     */
    async create(pobj){
        let result =  await this.templateinfoSve.createTemplate(pobj);
        return result;
    }
}

module.exports = FormInfoCtl;
