对象历史记录 Pojo 创建
parent
c8197f3290
commit
3aa1afb0ce
@ -0,0 +1,82 @@
|
||||
package cn.estsh.i3plus.pojo.platform.bean;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* @Description :
|
||||
* @Reference :
|
||||
* @Author : wei.peng
|
||||
* @CreateDate : 20-4-20 上午9:46
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name="SYS_POJO_VERSION")
|
||||
@Api(value="对象历史")
|
||||
public class SysPojoVersion extends BaseBean {
|
||||
|
||||
|
||||
private static final long serialVersionUID = -2456588444446248239L;
|
||||
|
||||
@Column(name="SOFT_TYPE")
|
||||
@ApiParam(value ="产品类型")
|
||||
private Integer softType;
|
||||
|
||||
public String getSoftTypeTxt() {
|
||||
return softType == null ? null : CommonEnumUtil.SOFT_TYPE.valueOfDescription(softType);
|
||||
}
|
||||
|
||||
@Column(name="REF_ID")
|
||||
@ApiParam(value ="对象id" ,example = "-1")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long refId;
|
||||
|
||||
@Column(name="REF_CLASS")
|
||||
@ApiParam(value ="记录对象")
|
||||
private String refClass;
|
||||
|
||||
@Column(name="VERSION_NO")
|
||||
@ApiParam(value ="记录对象版本号")
|
||||
private Integer versionNo = 0;
|
||||
|
||||
@Column(name="operateType")
|
||||
@ApiParam(value ="操作类型")
|
||||
private Integer operateType;
|
||||
public String getOperateTypeTxt() {
|
||||
return operateType == null ? null : CommonEnumUtil.DAO_OPERATE_TYPE.valueOf(operateType);
|
||||
}
|
||||
|
||||
@Column(name="VERSION_METHOD_NAME")
|
||||
@ApiParam(value ="操作方法名称")
|
||||
private String versionMethodName;
|
||||
|
||||
@Column(name="POJO_DETAIL_ID")
|
||||
@ApiParam(value ="对象明细id" ,example = "-1")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long pojoDetailId;
|
||||
|
||||
@Lob
|
||||
@Column(name="POJO_COMPARE")
|
||||
@ApiParam(value ="记录对象对比差异")
|
||||
private String pojoCompare;
|
||||
|
||||
@Transient
|
||||
@ApiParam(value ="用户部门信息")
|
||||
private SysPojoVersionDetail versionDetail;
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.estsh.i3plus.pojo.platform.bean;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Description :
|
||||
* @Reference :
|
||||
* @Author : wei.peng
|
||||
* @CreateDate : 20-4-20 上午9:46
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name="SYS_POJO_VERSION_DETAIL")
|
||||
@Api(value="对象历史")
|
||||
public class SysPojoVersionDetail extends BaseBean {
|
||||
|
||||
|
||||
private static final long serialVersionUID = -2456588444446248239L;
|
||||
@Column(name="POJO_VERSION_ID")
|
||||
@ApiParam(value ="对象id" ,example = "-1")
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long pojoVersionId;
|
||||
|
||||
@Lob
|
||||
@Column(name="POJO_BEFORE",length = 5000)
|
||||
@ApiParam(value ="原始对象信息")
|
||||
private String pojoBefore;
|
||||
|
||||
@Lob
|
||||
@Column(name="POJO_AFTER",length = 5000)
|
||||
@ApiParam(value ="修改之后对象信息")
|
||||
private String pojoAfter;
|
||||
|
||||
@Lob
|
||||
@Column(name="POJO_COMPARE",length = 5000)
|
||||
@ApiParam(value ="记录对象对比差异")
|
||||
private String pojoCompare;
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package cn.estsh.i3plus.pojo.platform.bean;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @Description :
|
||||
* @Reference :
|
||||
* @Author : wei.peng
|
||||
* @CreateDate : 20-4-20 上午9:46
|
||||
* @Modify:
|
||||
**/
|
||||
@Data
|
||||
@Entity
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table(name="SYS_POJO_VERSION_PLAN")
|
||||
@Api(value="对象历史")
|
||||
public class SysPojoVersionPlan extends BaseBean {
|
||||
|
||||
private static final long serialVersionUID = -1120504360281638917L;
|
||||
@Column(name="SOFT_TYPE")
|
||||
@ApiParam(value ="产品类型")
|
||||
private Integer softType;
|
||||
|
||||
public String getSoftTypeTxt() {
|
||||
return softType == null ? null : CommonEnumUtil.SOFT_TYPE.valueOfDescription(softType);
|
||||
}
|
||||
|
||||
@Column(name="REF_CLASS")
|
||||
@ApiParam(value ="记录对象")
|
||||
private String refClass;
|
||||
|
||||
@Column(name="REF_CLASS_TITLE")
|
||||
@ApiParam(value ="记录对象名称")
|
||||
private String refClassTitle;
|
||||
|
||||
@Column(name="PLAN_STATUS")
|
||||
@ApiParam(value ="记录对象状态")
|
||||
private Integer planStatus;
|
||||
|
||||
@Column(name="PLAN_DESCRIPTION")
|
||||
@ApiParam(value ="记录对象描述")
|
||||
private String planDescription;
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.estsh.i3plus.pojo.platform.repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.platform.bean.SysPojoVersionDetail;
|
||||
|
||||
/**
|
||||
* @Description : 对象记录明细
|
||||
* @Reference :
|
||||
* @Author : wei.peng
|
||||
* @Date : 2020-04-21 14:19:34
|
||||
* @Modify :
|
||||
**/
|
||||
public interface SysPojoVersionDetailRepository extends BaseRepository<SysPojoVersionDetail, Long> {
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.estsh.i3plus.pojo.platform.repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.platform.bean.SysPojoVersionPlan;
|
||||
|
||||
/**
|
||||
* @Description : 对象记录拦截
|
||||
* @Reference :
|
||||
* @Author : wei.peng
|
||||
* @Date : 2020-04-21 14:19:34
|
||||
* @Modify :
|
||||
**/
|
||||
public interface SysPojoVersionPlanRepository extends BaseRepository<SysPojoVersionPlan, Long> {
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.estsh.i3plus.pojo.platform.repository;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
|
||||
import cn.estsh.i3plus.pojo.platform.bean.SysPojoVersion;
|
||||
|
||||
/**
|
||||
* @Description : 对象记录
|
||||
* @Reference :
|
||||
* @Author : wei.peng
|
||||
* @Date : 2020-04-21 14:19:34
|
||||
* @Modify :
|
||||
**/
|
||||
public interface SysPojoVersionRepository extends BaseRepository<SysPojoVersion, Long> {
|
||||
}
|
Loading…
Reference in New Issue