|
|
@@ -0,0 +1,206 @@
|
|
|
+package com.uas.ps.product.entity;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import java.io.Serializable;
|
|
|
+import java.util.Date;
|
|
|
+import javax.persistence.Column;
|
|
|
+import javax.persistence.Entity;
|
|
|
+import javax.persistence.Id;
|
|
|
+import javax.persistence.Table;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 记录变化的消息
|
|
|
+ *
|
|
|
+ * @author sunyj
|
|
|
+ * @since 2018/1/14 16:35
|
|
|
+ */
|
|
|
+@Entity
|
|
|
+@Table(name = "sync$message")
|
|
|
+public class SyncMessage implements Serializable {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+
|
|
|
+ @Id
|
|
|
+ @Column(name = "me_id")
|
|
|
+ private Long id;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 表名
|
|
|
+ */
|
|
|
+ @Column(name = "me_table_name")
|
|
|
+ private String tableName;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更改类型
|
|
|
+ */
|
|
|
+ @Column(name = "me_method_type")
|
|
|
+ private String methodType;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 决定数据唯一的条件(JSON 格式)
|
|
|
+ */
|
|
|
+ @Column(name = "me_data_key")
|
|
|
+ private JSONObject dataKey;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更改的数据(JSON 格式),delete 情况下可为空
|
|
|
+ */
|
|
|
+ @Column(name = "me_data")
|
|
|
+ private JSONObject data;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 优先级
|
|
|
+ */
|
|
|
+ @Column(name = "me_priority")
|
|
|
+ private Long priority;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 尝试次数
|
|
|
+ */
|
|
|
+ @Column(name = "me_retry_count")
|
|
|
+ private Long retryCount;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 请求来自哪个应用
|
|
|
+ */
|
|
|
+ @Column(name = "me_source_app")
|
|
|
+ private String sourceApp;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批次 code
|
|
|
+ */
|
|
|
+ @Column(name = "me_batch_code")
|
|
|
+ private String batchCode;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批次数量
|
|
|
+ */
|
|
|
+ @Column(name = "me_batch_size")
|
|
|
+ private Integer batchSize;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 批次序号
|
|
|
+ */
|
|
|
+ @Column(name = "me_batch_detno")
|
|
|
+ private Integer batchDetno;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 时间
|
|
|
+ */
|
|
|
+ @Column(name = "me_create_time")
|
|
|
+ private Date createTime;
|
|
|
+
|
|
|
+ public Long getId() {
|
|
|
+ return id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setId(Long id) {
|
|
|
+ this.id = id;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getTableName() {
|
|
|
+ return tableName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setTableName(String tableName) {
|
|
|
+ this.tableName = tableName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getMethodType() {
|
|
|
+ return methodType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setMethodType(String methodType) {
|
|
|
+ this.methodType = methodType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public JSONObject getDataKey() {
|
|
|
+ return dataKey;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setDataKey(JSONObject dataKey) {
|
|
|
+ this.dataKey = dataKey;
|
|
|
+ }
|
|
|
+
|
|
|
+ public JSONObject getData() {
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setData(JSONObject data) {
|
|
|
+ this.data = data;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getPriority() {
|
|
|
+ return priority;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPriority(Long priority) {
|
|
|
+ this.priority = priority;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Long getRetryCount() {
|
|
|
+ return retryCount;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setRetryCount(Long retryCount) {
|
|
|
+ this.retryCount = retryCount;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Date getCreateTime() {
|
|
|
+ return createTime;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCreateTime(Date createTime) {
|
|
|
+ this.createTime = createTime;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getSourceApp() {
|
|
|
+ return sourceApp;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setSourceApp(String sourceApp) {
|
|
|
+ this.sourceApp = sourceApp;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getBatchCode() {
|
|
|
+ return batchCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setBatchCode(String batchCode) {
|
|
|
+ this.batchCode = batchCode;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getBatchSize() {
|
|
|
+ return batchSize;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setBatchSize(Integer batchSize) {
|
|
|
+ this.batchSize = batchSize;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getBatchDetno() {
|
|
|
+ return batchDetno;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setBatchDetno(Integer batchDetno) {
|
|
|
+ this.batchDetno = batchDetno;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String toString() {
|
|
|
+ return "SyncMessage{" +
|
|
|
+ "id=" + id +
|
|
|
+ ", tableName='" + tableName + '\'' +
|
|
|
+ ", methodType='" + methodType + '\'' +
|
|
|
+ ", dataKey=" + dataKey +
|
|
|
+ ", data=" + data +
|
|
|
+ ", priority=" + priority +
|
|
|
+ ", retryCount=" + retryCount +
|
|
|
+ ", sourceApp='" + sourceApp + '\'' +
|
|
|
+ ", batchCode='" + batchCode + '\'' +
|
|
|
+ ", batchSize=" + batchSize +
|
|
|
+ ", batchDetno=" + batchDetno +
|
|
|
+ ", createTime=" + createTime +
|
|
|
+ '}';
|
|
|
+ }
|
|
|
+}
|