更改通过同步数据

yun-zuoyi
Xiao-yin0517 4 years ago
parent 2d2faaaa4c
commit c4b82c4891

@ -19,7 +19,7 @@ import java.util.List;
**/
@Data
@ApiModel("数据中心同步数据")
public class MdmSyncData implements Serializable {
public class MdmSyncData<T> implements Serializable {
private static final long serialVersionUID = -1642626000860074060L;
@ -93,4 +93,7 @@ public class MdmSyncData implements Serializable {
@ApiParam("同步失败信息")
private String syncFailMessage;
@ApiParam("同步数据值")
private List<T> syncData;
}

@ -0,0 +1,112 @@
package cn.estsh.i3plus.pojo.mdm.bean.master;
import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import cn.estsh.i3plus.pojo.base.enumutil.MdmEnumUtil;
import cn.estsh.i3plus.pojo.mdm.bean.base.BaseMdmBean;
import io.swagger.annotations.ApiModel;
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;
import javax.persistence.Transient;
import java.util.List;
/**
* @Description : 齿
* @Reference :
* @Author : yunhao
* @CreateDate : 2020-05-12 18:09
* @Modify:
**/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="MDM_SYNC_DATA_THROUGH")
@ApiModel("处理以通过中心同步数据")
public class MdmSyncDataThrough extends BaseMdmBean {
private static final long serialVersionUID = -1642626000861174060L;
@ApiParam("同步数据类型")
@AnnoOutputColumn(refClass = MdmEnumUtil.MDM_SYNC_TYPE.class)
private Integer syncType;
public int getSyncTypeVal() {
return syncType == null ? MdmEnumUtil.MDM_SYNC_TYPE.INSERT.getValue() : syncType;
}
public String getSyncTypeTxt() {
return syncType == null ? "无" : MdmEnumUtil.MDM_SYNC_TYPE.valueOfDescription(syncType);
}
@ApiParam("同步模块")
@AnnoOutputColumn(refClass = MdmEnumUtil.MDM_SYNC_APP_TYPE.class)
private Integer syncAppType;
public int getSyncAppTypeVal() {
return syncAppType == null ? MdmEnumUtil.MDM_SYNC_APP_TYPE.INTERNAL.getValue() : syncAppType;
}
public String getSyncAppTypeTxt() {
return syncAppType == null ? "无" : MdmEnumUtil.MDM_SYNC_APP_TYPE.valueOfDescription(syncAppType);
}
@ApiParam("同步模块")
private Long syncSoftType;
@ApiParam("同步模块名称")
private String syncSoftTypeName;
@ApiParam("是否是主数据")
@AnnoOutputColumn(refClass = CommonEnumUtil.TRUE_OR_FALSE.class)
private Integer isMasterData;
public int getIsMasterDataVal() {
return isMasterData == null ? CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue() : isMasterData;
}
public String getIsMasterDataTxt() {
return isMasterData == null ? "无" : CommonEnumUtil.TRUE_OR_FALSE.valueOfDescription(isMasterData);
}
@ApiParam("同步数据class")
private String syncDataClass;
public String getSyncDataClassSimpleName() {
if (syncDataClass == null) {
return null;
}
return syncDataClass.trim().substring(syncDataClass.trim().lastIndexOf(".") + 1);
}
@ApiParam("同步数据id")
@Transient
@AnnoOutputColumn(hidden = true)
private List<Long> syncDataId;
@ApiParam("同步数据用户名")
private String syncDateUserName;
@ApiParam("同步时间")
private String syncDateTime;
@ApiParam("同步失败键")
private String syncFailKey;
@ApiParam("同步失败时间")
private String syncFailDateTime;
@ApiParam("同步失败信息")
private String syncFailMessage;
}

@ -0,0 +1,17 @@
package cn.estsh.i3plus.pojo.mdm.repository.master;
import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.mdm.bean.master.MdmGear;
import cn.estsh.i3plus.pojo.mdm.bean.master.MdmSyncDataThrough;
import org.springframework.stereotype.Repository;
/**
* @Description :
* @Reference :
* @Author : yunhao
* @CreateDate : 2020-05-15 16:26
* @Modify:
**/
@Repository
public interface MdmSyncDataThroughRepository extends BaseRepository<MdmSyncDataThrough, Long> {
}
Loading…
Cancel
Save