提交 863067e2 编写于 作者: sq3536's avatar sq3536

bug isdelete fix

上级 ddc50eb7
...@@ -106,6 +106,24 @@ public class EntityModel { ...@@ -106,6 +106,24 @@ public class EntityModel {
@JsonIgnore @JsonIgnore
@JSONField(serialize = false) @JSONField(serialize = false)
private boolean isLogicValid=true; private boolean isLogicValid=true;
@JsonIgnore
@JSONField(serialize = false)
public boolean isLogicValid()
{
if(isLogicValid&&logicValidField==null) {
if (fields != null) {
for (FieldModel fieldModel : fields) {
if (fieldModel.isLogicValidField()) {
logicValidField = fieldModel;
return isLogicValid;
}
}
}
isLogicValid = false;
}
return isLogicValid;
}
@JsonIgnore @JsonIgnore
@JSONField(serialize = false) @JSONField(serialize = false)
private FieldModel logicValidField; private FieldModel logicValidField;
......
...@@ -183,6 +183,8 @@ public class EntityObj extends DataObj<String,Object> { ...@@ -183,6 +183,8 @@ public class EntityObj extends DataObj<String,Object> {
{ {
if(!this.getEntityModel().isLogicValid()) if(!this.getEntityModel().isLogicValid())
return false; return false;
if(this.getEntityModel().getLogicValidField()==null)
return false;
if(this.getEntityModel().getLogicVal().equals(this.get(this.getEntityModel().getLogicValidField().getColumnName()))) if(this.getEntityModel().getLogicVal().equals(this.get(this.getEntityModel().getLogicValidField().getColumnName())))
return false; return false;
return true; return true;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册