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

ibiz4j 发布系统代码

上级 6d6cb99a
......@@ -26,9 +26,11 @@ import org.springframework.data.annotation.Transient;
/**
* [历史] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class WFHistory extends EntityBase implements Serializable {
/**
......@@ -111,7 +113,7 @@ public class WFHistory extends EntityBase implements Serializable {
if (this.time == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("defieldFormatStr");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(time);
}
}
......
......@@ -26,9 +26,11 @@ import org.springframework.data.annotation.Transient;
/**
* [流程实例] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class WFProcessInstance extends EntityBase implements Serializable {
/**
......@@ -110,7 +112,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
if (this.starttime == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("defieldFormatStr");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(starttime);
}
/**
......@@ -120,7 +122,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
if (this.endtime == null) {
return null;
}
SimpleDateFormat sdf = new SimpleDateFormat("defieldFormatStr");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(endtime);
}
}
......
......@@ -26,9 +26,11 @@ import org.springframework.data.annotation.Transient;
/**
* [流程定义节点] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class WFProcessNode extends EntityBase implements Serializable {
/**
......
......@@ -26,9 +26,11 @@ import org.springframework.data.annotation.Transient;
/**
* [流程模型] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class WFREModel extends EntityBase implements Serializable {
/**
......
......@@ -26,9 +26,11 @@ import org.springframework.data.annotation.Transient;
/**
* [工作流任务] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class WFTask extends EntityBase implements Serializable {
/**
......
......@@ -26,9 +26,11 @@ import org.springframework.data.annotation.Transient;
/**
* [操作路径] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class WFTaskWay extends EntityBase implements Serializable {
/**
......
......@@ -10,6 +10,10 @@ public class CustomJacksonSerializer<T> extends Jackson2JsonRedisSerializer<T>
public static final String DEFAULT_PACKAGE ="[\\w+\\.]+\\.AuthenticationUser";
public static final String CLASSNAME_EX="_$$_";
public static final String CLASSNAME_EX_PATTEN="(_\\$\\$_)(\\w+)";
public static final String USER_PACKAGE= AuthenticationUser.class.getName();
public CustomJacksonSerializer(Class type) {
......@@ -20,6 +24,12 @@ public class CustomJacksonSerializer<T> extends Jackson2JsonRedisSerializer<T>
public T deserialize(byte[] bytes) throws SerializationException {
String serializerContent = new String(bytes, DEFAULT_CHARSET);
Matcher matcher = Pattern.compile(DEFAULT_PACKAGE).matcher(serializerContent);
return matcher.find()?super.deserialize(serializerContent.replaceAll(DEFAULT_PACKAGE,USER_PACKAGE).getBytes()):super.deserialize(bytes);
if(matcher.find()){
serializerContent=serializerContent.replaceAll(DEFAULT_PACKAGE,USER_PACKAGE);
}
if(serializerContent.contains(CLASSNAME_EX)){
serializerContent=serializerContent.replaceAll(CLASSNAME_EX_PATTEN,"");
}
return super.deserialize(serializerContent.getBytes());
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册