Skip to content

Commit

Permalink
🎨 Improve structure / format of the code. 添加序列化接口的实现
Browse files Browse the repository at this point in the history
  • Loading branch information
721806280 committed Apr 28, 2024
1 parent c953706 commit aa31a17
Show file tree
Hide file tree
Showing 16 changed files with 46 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import lombok.NoArgsConstructor;
import org.apache.commons.lang.StringUtils;

import java.io.Serializable;
import java.util.List;

/**
Expand Down Expand Up @@ -42,7 +43,7 @@ public static DingCardMessage build(At at, String title, String text, String sin
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class ActionCardContent {
public static class ActionCardContent implements Serializable {

private String title;

Expand Down Expand Up @@ -71,7 +72,7 @@ public static class ActionCardContent {
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class Button {
public static class Button implements Serializable {

private String title;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* @author xm.z
*/
Expand All @@ -31,7 +33,7 @@ public static DingLinkMessage build(At at, String title, String text, String pic
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class LinkContent {
public static class LinkContent implements Serializable {

/**
* 消息标题
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* @author xm.z
*/
Expand All @@ -31,7 +33,7 @@ public static DingMdMessage build(At at, String title, String text) {
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class MarkdownContent {
public static class MarkdownContent implements Serializable {

private String title;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* @author xm.z
*/
Expand All @@ -31,7 +33,7 @@ public static DingTextMessage build(At at, String text) {
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class TextContent {
public static class TextContent implements Serializable {

private String content;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* @author xm.z
*/
Expand All @@ -28,7 +30,7 @@ public static LarkImageMessage build(String text) {
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class ImageContent {
public static class ImageContent implements Serializable {

@JsonProperty("image_key")
private String imageKey;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* 富文本消息 类型
*
Expand Down Expand Up @@ -36,7 +38,7 @@ public static LarkPostMessage build(String title, String text) {
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class PostContent {
public static class PostContent implements Serializable {

/**
* 富文本消息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* 群名片消息 类型
*
Expand All @@ -30,7 +32,7 @@ public static LarkShareChatMessage build(String text) {
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class ShareChatContent {
public static class ShareChatContent implements Serializable {

@JsonProperty(value = "share_chat_id")
private String shareChatId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* @author xm.z
*/
Expand All @@ -28,7 +30,7 @@ public static LarkTextMessage build(At at, String text) {
@Data
@NoArgsConstructor
@AllArgsConstructor
public static class TextContent {
public static class TextContent implements Serializable {

private String text;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

Expand All @@ -11,7 +12,7 @@
* @author xm.z
*/
@Data
public class At {
public class At implements Serializable {

/**
* 是否 @ 所有人
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;

import java.io.Serializable;

/**
* Card
*
* @author xm.z
*/
@Data
public class Card {
public class Card implements Serializable {

private Config config;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* Config
*
Expand All @@ -13,7 +15,7 @@
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Config {
public class Config implements Serializable {

@JsonProperty(value = "wide_screen_mode")
private boolean wideScreenMode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import com.fasterxml.jackson.databind.JsonNode;
import lombok.Data;

import java.io.Serializable;

/**
* Content
*
* @author xm.z
*/
@Data
public class Content {
public class Content implements Serializable {

private String title;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* Header
*
Expand All @@ -12,7 +14,7 @@
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Header {
public class Header implements Serializable {

private String template;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* RichText
*
Expand All @@ -13,7 +15,7 @@
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RichText {
public class RichText implements Serializable {

@JsonProperty(value = "zh_cn")
private Content zhCn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
* TagContent
*
Expand All @@ -12,7 +14,7 @@
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TagContent {
public class TagContent implements Serializable {

/**
* 标签类型
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
*/
public class GenericStepExecution<T extends AbstractStep> extends StepExecution {

private static final long serialVersionUID = 1L;

private final transient T step;

public GenericStepExecution(T step, StepContext context) {
Expand Down

0 comments on commit aa31a17

Please sign in to comment.