提交 2649cea0 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 5752e095
......@@ -31,14 +31,12 @@ public class IBZDict extends EntityBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 字典标识
*/
@TableId(value= "ibzdictid",type=IdType.UUID)
private String dictid;
/**
* 字典名称
*/
......@@ -46,19 +44,15 @@ public class IBZDict extends EntityBase implements Serializable {
private String dictname;
/**
* 逻辑有效标志
*/
@DEField( preType = DEPredefinedFieldType.LOGICVALID )
@TableLogic(value= "1",delval="0")
@TableField( value = "enable" , fill = FieldFill.INSERT )
@TableField( value = "enable" , fill = FieldFill.INSERT_UPDATE )
private Integer enable;
/**
* 建立时间
*/
......@@ -68,8 +62,6 @@ public class IBZDict extends EntityBase implements Serializable {
private Timestamp createdate;
/**
* 更新时间
*/
......@@ -79,8 +71,6 @@ public class IBZDict extends EntityBase implements Serializable {
private Timestamp updatedate;
/**
* 建立人
*/
......@@ -89,24 +79,32 @@ public class IBZDict extends EntityBase implements Serializable {
private String createman;
/**
* 更新人
*/
@DEField( preType = DEPredefinedFieldType.UPDATEMAN )
@TableField( value = "updateman" , fill = FieldFill.INSERT )
@TableField( value = "updateman" , fill = FieldFill.INSERT_UPDATE )
private String updateman;
/**
* 字典项目
*/
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private List<cn.ibizlab.core.dict.domain.IBZDictItem> items;
/**
* 设置 [字典标识]
*/
public void setDictid(String dictid){
this.dictid = dictid ;
this.modify("ibzdictid"dictid);
this.modify("ibzdictid",dictid);
}
/**
......@@ -114,7 +112,7 @@ public class IBZDict extends EntityBase implements Serializable {
*/
public void setDictname(String dictname){
this.dictname = dictname ;
this.modify("ibzdictname"dictname);
this.modify("ibzdictname",dictname);
}
/**
......@@ -122,7 +120,6 @@ public class IBZDict extends EntityBase implements Serializable {
*/
public void setEnable(Integer enable){
this.enable = enable ;
this.modify("enable"enable);
}
/**
......@@ -130,7 +127,6 @@ public class IBZDict extends EntityBase implements Serializable {
*/
public void setCreatedate(Timestamp createdate){
this.createdate = createdate ;
this.modify("createdate"createdate);
}
/**
......@@ -138,7 +134,6 @@ public class IBZDict extends EntityBase implements Serializable {
*/
public void setUpdatedate(Timestamp updatedate){
this.updatedate = updatedate ;
this.modify("updatedate"updatedate);
}
/**
......@@ -146,7 +141,6 @@ public class IBZDict extends EntityBase implements Serializable {
*/
public void setCreateman(String createman){
this.createman = createman ;
this.modify("createman"createman);
}
/**
......@@ -154,7 +148,6 @@ public class IBZDict extends EntityBase implements Serializable {
*/
public void setUpdateman(String updateman){
this.updateman = updateman ;
this.modify("updateman"updateman);
}
}
......
......@@ -31,63 +31,54 @@ public class IBZDictItem extends EntityBase implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 字典项目标识
*/
@TableId(value= "ibzdictitemid",type=IdType.UUID)
private String itemid;
/**
* 栏目显示值
*/
@TableField( value = "ibzdictitemname" )
private String itemname;
/**
* 栏目值
*/
@TableField( value = "dictitemval" )
private String itemval;
/**
* 字典标识
*/
@TableField( value = "dictid" )
private String dictid;
/**
* 父栏目值
*/
@TableField( value = "pitemval" )
private String pitemval;
/**
* 过滤项
*/
@TableField( value = "itemfilter" )
private String itemfilter;
/**
* 栏目样式
*/
@TableField( value = "itemcls" )
private String itemcls;
/**
* 图标
*/
@TableField( value = "itemicon" )
private String itemicon;
/**
* 排序
*/
......@@ -95,8 +86,6 @@ public class IBZDictItem extends EntityBase implements Serializable {
private Integer showorder;
/**
* 建立时间
*/
......@@ -106,8 +95,6 @@ public class IBZDictItem extends EntityBase implements Serializable {
private Timestamp createdate;
/**
* 更新时间
*/
......@@ -117,8 +104,6 @@ public class IBZDictItem extends EntityBase implements Serializable {
private Timestamp updatedate;
/**
* 建立人
*/
......@@ -127,13 +112,11 @@ public class IBZDictItem extends EntityBase implements Serializable {
private String createman;
/**
* 更新人
*/
@DEField( preType = DEPredefinedFieldType.UPDATEMAN )
@TableField( value = "updateman" , fill = FieldFill.INSERT )
@TableField( value = "updateman" , fill = FieldFill.INSERT_UPDATE )
private String updateman;
......@@ -148,7 +131,7 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setItemid(String itemid){
this.itemid = itemid ;
this.modify("ibzdictitemid"itemid);
this.modify("ibzdictitemid",itemid);
}
/**
......@@ -156,7 +139,7 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setItemname(String itemname){
this.itemname = itemname ;
this.modify("ibzdictitemname"itemname);
this.modify("ibzdictitemname",itemname);
}
/**
......@@ -164,7 +147,7 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setItemval(String itemval){
this.itemval = itemval ;
this.modify("dictitemval"itemval);
this.modify("dictitemval",itemval);
}
/**
......@@ -172,7 +155,7 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setDictid(String dictid){
this.dictid = dictid ;
this.modify("dictid"dictid);
this.modify("dictid",dictid);
}
/**
......@@ -180,7 +163,7 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setPitemval(String pitemval){
this.pitemval = pitemval ;
this.modify("pitemval"pitemval);
this.modify("pitemval",pitemval);
}
/**
......@@ -188,7 +171,7 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setItemfilter(String itemfilter){
this.itemfilter = itemfilter ;
this.modify("itemfilter"itemfilter);
this.modify("itemfilter",itemfilter);
}
/**
......@@ -196,7 +179,7 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setItemcls(String itemcls){
this.itemcls = itemcls ;
this.modify("itemcls"itemcls);
this.modify("itemcls",itemcls);
}
/**
......@@ -204,7 +187,7 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setItemicon(String itemicon){
this.itemicon = itemicon ;
this.modify("itemicon"itemicon);
this.modify("itemicon",itemicon);
}
/**
......@@ -212,7 +195,7 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setShoworder(Integer showorder){
this.showorder = showorder ;
this.modify("showorder"showorder);
this.modify("showorder",showorder);
}
/**
......@@ -220,7 +203,6 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setCreatedate(Timestamp createdate){
this.createdate = createdate ;
this.modify("createdate"createdate);
}
/**
......@@ -228,7 +210,6 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setUpdatedate(Timestamp updatedate){
this.updatedate = updatedate ;
this.modify("updatedate"updatedate);
}
/**
......@@ -236,7 +217,6 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setCreateman(String createman){
this.createman = createman ;
this.modify("createman"createman);
}
/**
......@@ -244,7 +224,6 @@ public class IBZDictItem extends EntityBase implements Serializable {
*/
public void setUpdateman(String updateman){
this.updateman = updateman ;
this.modify("updateman"updateman);
}
}
......
package cn.ibizlab.util.annotation;
import cn.ibizlab.util.enums.DEFieldDefaultValueType;
import cn.ibizlab.util.enums.DEPredefinedFieldType;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
......@@ -16,15 +17,21 @@ public @interface DEField
*/
boolean isKeyField() default false;
/**
* 填充模式
* 默认值
* @return
*/
String defaultValue() default "";
/**
* 预置属性类型
* 默认值类型
* @return
*/
DEFieldDefaultValueType defaultValueType() default DEFieldDefaultValueType.NONE;
/**
* 预置属性类型
* @return
*/
DEPredefinedFieldType preType() default DEPredefinedFieldType.DEFAULT;
}
......@@ -17,22 +17,22 @@ public class EntityBase implements Serializable {
@TableField(exist = false)
private Set<String> focusNull;
@JsonIgnore
@JSONField(serialize = false)
public void addFocusNull(String field) {
this.getFocusNull().add(field);
public void modify(String field,Object val) {
if(val==null)
this.getFocusNull().add(field.toLowerCase());
else
this.getFocusNull().remove(field.toLowerCase());
}
@JsonIgnore
@JSONField(serialize = false)
public Set<String> getFocusNull() {
if(focusNull==null)
focusNull=new HashSet<>();
return focusNull;
}
@JsonIgnore
@JSONField(serialize = false)
public UpdateWrapper getUpdateWrapper(boolean clean) {
UpdateWrapper wrapper=new UpdateWrapper();
for(String nullField:getFocusNull()) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册