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

ibizdev提交

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