All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.excelconstant.ftl Maven / Gradle / Ivy

There is a newer version: 1.1.26
Show newest version
package ${package.ExcelConstant};

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * Excel使用常量 - ${table.comment!}
 *
 * @author ${author}
 * @date ${date}
 */
public class ${entity}ExcelConstant {
    /**
     * 导出所需的字段信息
     */
    public static LinkedHashMap EXPORT_EXCEL_COLUMN = new LinkedHashMap<>();
    /**
     * 导入所需字段信息
     */
    public static Map IMPORT_EXCEL_COLUMN = new HashMap<>();

    static {
        // 初始化导出字段
<#list table.fields as field>
        EXPORT_EXCEL_COLUMN.put("${field.propertyName}", "${field.comment}");

        // 初始化导入字段
<#list table.fields as field>
        IMPORT_EXCEL_COLUMN.put("${field.comment}", "${field.propertyName}");

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy