package com.eversec.kit.creator.impl.page;

import com.eversec.common.Kv;

import java.io.File;
import java.util.List;
import java.util.Map;

/**
 * @author: liangxianyou at 2018/8/7 15:01.
 */
public class ConditionKit extends PageKit {
    @Override
    public File getFile(String clazz) {
        return new File(dirPath + pageModel +"/"  + getFileDir(clazz) + "/condition.html");
    }

    @Override
    public String createStr(String clazz, List<Map> fieldList, Map para) {
        Kv kv = createTplData(clazz);
        kv.set("remark", para.get("remark"));
        kv.set("fieldList", fieldList);


        return engine.getTemplate(tplPath + "front/conditionTpl.html").renderToString(kv);
    }
}
