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

Long型主键

上级 a8f07731
...@@ -457,9 +457,9 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable { ...@@ -457,9 +457,9 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
</#if> </#if>
</#if> </#if>
<#assign keyField = item.getKeyPSDEField()>
<#comment>联合主键</#comment> <#comment>联合主键</#comment>
<#if item.getUnionKeyValuePSDEFields()??> <#if item.getUnionKeyValuePSDEFields()??>
<#assign keyField = item.getKeyPSDEField()>
<#assign privateCodeName = srfcaseformat(keyField.getCodeName(),'l_u2lC') > <#assign privateCodeName = srfcaseformat(keyField.getCodeName(),'l_u2lC') >
<#assign publicCodeName = privateCodeName?cap_first > <#assign publicCodeName = privateCodeName?cap_first >
/** /**
...@@ -478,6 +478,12 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable { ...@@ -478,6 +478,12 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
return DigestUtils.md5DigestAsHex(${getUnionKey(item.getUnionKeyValuePSDEFields())}.getBytes()); return DigestUtils.md5DigestAsHex(${getUnionKey(item.getUnionKeyValuePSDEFields())}.getBytes());
return null; return null;
} }
<#comment>Long型主键</#comment>
<#elseif srfr7javatype(keyField.getStdDataType())=='Long'>
@Override
public Serializable getDefaultKey(boolean gen) {
return IdWorker.getId();
}
</#if> </#if>
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册