package com.eversec.kit.creator.impl;

import com.eversec.common.Kv;
import com.eversec.kit.creator.ICreator;

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

/**
 * Created by liangxianyou@eversec.cn at 2018/5/4 13:05.
 */
public class ServiceImplKit extends ICreator {
    private String pkg = ICreator.pkg + ".service.impl";

    @Override
    public File getFile(String clazz) {
        return new File(filePath(pkg) + clazz + "ServiceImpl.java");
    }

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

        return engine.getTemplate(tplPath + "ServiceImpTpl.java").renderToString(kv);
    }
}
