Commit fc5dde8e5b24e50a22aca78d94cdd7bd664c6348
1 parent
138121b2
1.BEntity还原到上一版本,Personnel json化时剔除createBy,updateBy
Showing
2 changed files
with
61 additions
and
63 deletions
src/main/java/com/bsth/entity/Personnel.java
| ... | ... | @@ -22,7 +22,7 @@ import javax.persistence.*; |
| 22 | 22 | |
| 23 | 23 | @Entity |
| 24 | 24 | @Table(name = "bsth_c_personnel") |
| 25 | -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | |
| 25 | +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler","createBy","updateBy"}) | |
| 26 | 26 | public class Personnel extends BEntity { |
| 27 | 27 | |
| 28 | 28 | /** 主键Id */ | ... | ... |
src/main/java/com/bsth/entity/schedule/BEntity.java
| 1 | -package com.bsth.entity.schedule; | |
| 2 | - | |
| 3 | -import com.bsth.entity.sys.SysUser; | |
| 4 | -import com.fasterxml.jackson.annotation.JsonIgnore; | |
| 5 | - | |
| 6 | -import javax.persistence.*; | |
| 7 | -import java.util.Date; | |
| 8 | - | |
| 9 | -/** | |
| 10 | - * Created by xu on 16/12/14. | |
| 11 | - */ | |
| 12 | -@MappedSuperclass | |
| 13 | -public class BEntity { | |
| 14 | - | |
| 15 | - /** 创建人 */ | |
| 16 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH) | |
| 17 | - @JsonIgnore | |
| 18 | - private SysUser createBy; | |
| 19 | - /** 修改人 */ | |
| 20 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH) | |
| 21 | - @JsonIgnore | |
| 22 | - private SysUser updateBy; | |
| 23 | - | |
| 24 | - /** 创建日期 */ | |
| 25 | - @Column(updatable = false, name = "create_date") | |
| 26 | - private Date createDate; | |
| 27 | - /** 修改日期 */ | |
| 28 | - @Column(name = "update_date") | |
| 29 | - private Date updateDate; | |
| 30 | - | |
| 31 | - public SysUser getCreateBy() { | |
| 32 | - return createBy; | |
| 33 | - } | |
| 34 | - | |
| 35 | - public void setCreateBy(SysUser createBy) { | |
| 36 | - this.createBy = createBy; | |
| 37 | - } | |
| 38 | - | |
| 39 | - public SysUser getUpdateBy() { | |
| 40 | - return updateBy; | |
| 41 | - } | |
| 42 | - | |
| 43 | - public void setUpdateBy(SysUser updateBy) { | |
| 44 | - this.updateBy = updateBy; | |
| 45 | - } | |
| 46 | - | |
| 47 | - public Date getCreateDate() { | |
| 48 | - return createDate; | |
| 49 | - } | |
| 50 | - | |
| 51 | - public void setCreateDate(Date createDate) { | |
| 52 | - this.createDate = createDate; | |
| 53 | - } | |
| 54 | - | |
| 55 | - public Date getUpdateDate() { | |
| 56 | - return updateDate; | |
| 57 | - } | |
| 58 | - | |
| 59 | - public void setUpdateDate(Date updateDate) { | |
| 60 | - this.updateDate = updateDate; | |
| 61 | - } | |
| 62 | -} | |
| 1 | +package com.bsth.entity.schedule; | |
| 2 | + | |
| 3 | +import com.bsth.entity.sys.SysUser; | |
| 4 | +import com.fasterxml.jackson.annotation.JsonIgnore; | |
| 5 | + | |
| 6 | +import javax.persistence.*; | |
| 7 | +import java.util.Date; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * Created by xu on 16/12/14. | |
| 11 | + */ | |
| 12 | +@MappedSuperclass | |
| 13 | +public class BEntity { | |
| 14 | + | |
| 15 | + /** 创建人 */ | |
| 16 | + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH) | |
| 17 | + private SysUser createBy; | |
| 18 | + /** 修改人 */ | |
| 19 | + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH) | |
| 20 | + private SysUser updateBy; | |
| 21 | + | |
| 22 | + /** 创建日期 */ | |
| 23 | + @Column(updatable = false, name = "create_date") | |
| 24 | + private Date createDate; | |
| 25 | + /** 修改日期 */ | |
| 26 | + @Column(name = "update_date") | |
| 27 | + private Date updateDate; | |
| 28 | + | |
| 29 | + public SysUser getCreateBy() { | |
| 30 | + return createBy; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setCreateBy(SysUser createBy) { | |
| 34 | + this.createBy = createBy; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public SysUser getUpdateBy() { | |
| 38 | + return updateBy; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setUpdateBy(SysUser updateBy) { | |
| 42 | + this.updateBy = updateBy; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public Date getCreateDate() { | |
| 46 | + return createDate; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void setCreateDate(Date createDate) { | |
| 50 | + this.createDate = createDate; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public Date getUpdateDate() { | |
| 54 | + return updateDate; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void setUpdateDate(Date updateDate) { | |
| 58 | + this.updateDate = updateDate; | |
| 59 | + } | |
| 60 | +} | ... | ... |