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

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

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

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

module.exports = TemplatelinkCtl;
