提交 b2464770 编写于 作者: zhouweidong's avatar zhouweidong

模板补充静态代码表

上级 bb34974a
......@@ -15,19 +15,19 @@ package ${pub.getPKGCodeName()}.util.dict;
import lombok.Getter;
public class CodeListBase {
public class StaticDict {
<#if sys.getAllPSCodeLists()??>
<#list sys.getAllPSCodeLists() as codeList>
<#if codeList.getCodeListType()=='STATIC'>
<#assign codeListName=codeList.codeName>
@Getter
public enum ${codeListName}CodeList {
public enum ${codeListName} {
<#if codeList.getAllPSCodeItems()??>
<#list codeList.getAllPSCodeItems() as codeItem>
<#assign codeItemValue=codeItem.getValue()>
<#assign codeItemText=codeItem.getText()>
${codeListName}_${codeItemValue}("${codeItemValue}","${codeItemText}")<#if codeItem_has_next>,<#else>;</#if>
VALUE_${codeItemValue}("${codeItemValue}","${codeItemText}")<#if codeItem_has_next>,<#else>;</#if>
</#list>
</#if>
......@@ -37,7 +37,7 @@ public class CodeListBase {
private String textSeparator="<#if codeList.getTextSeparator()??>${codeList.getTextSeparator()}</#if>";
private String emptyText="<#if codeList.getEmptyText()?? && codeList.getEmptyText()!='未定义'>${codeList.getEmptyText()}</#if>";
${codeListName}CodeList(String value , String text) {
${codeListName}(String value , String text) {
this.value=value;
this.text = text;
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册