提交 7429b1c3 编写于 作者: sq3536's avatar sq3536

提交,规范地址栏

上级 07ebbb1f
......@@ -177,7 +177,14 @@ public class DOModel implements Serializable {
if (keyMap.size()==1)
{
PojoSchema keyProperty=this.getKeyProperty();
Object key=data.get(this.getKeyPropertyName());
String keyPropertyName=keyProperty.getName().toLowerCase();
Object key=data.get(keyPropertyName);
if(ObjectUtils.isEmpty(key))
{
key=data.getKey();
if(!ObjectUtils.isEmpty(key))
data.set(keyPropertyName, key);
}
if(ObjectUtils.isEmpty(key))
{
if(genKeyWhenNotExists)
......@@ -186,7 +193,7 @@ public class DOModel implements Serializable {
key=IdWorker.getId();
else
key=IdWorker.get32UUID();
data.set(this.getKeyPropertyName(),key);
data.set(keyPropertyName,key);
}
else
return null;
......
......@@ -116,4 +116,9 @@ public class BaseData extends DataObj
{
return this.set("_key",key);
}
public Serializable getKey()
{
return getSerializableValue("_key");
}
}
......@@ -22,24 +22,11 @@ public class RequestData<T> extends BaseData
public RequestData setKey(Object key)
{
this.key=key;
return this;
}
public Serializable getKey()
{
Object key=this.key;
if(key==null)
key=this.get("key");
if(key!=null)
return (Serializable)key;
else
return null;
super.setKey(key);
return this;
}
private Object key;
private String system;
private String scope;
private String entity;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册