File tree Expand file tree Collapse file tree
framework/framework_base/src/main/java/com/github/cadecode/uniboot/framework/base/plugin Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com .github .cadecode .uniboot .framework .base .plugin .bean .po ;
2+
3+ import com .baomidou .mybatisplus .annotation .*;
4+ import com .github .cadecode .uniboot .framework .base .plugin .enums .ConsumeStateEnum ;
5+ import com .github .cadecode .uniboot .framework .base .plugin .enums .SendStateEnum ;
6+ import lombok .Data ;
7+
8+ import java .util .Date ;
9+
10+ /**
11+ * MQ 消息实体
12+ *
13+ * @author Cade Li
14+ * @since 2023/8/19
15+ */
16+ @ Data
17+ @ TableName (autoResultMap = true )
18+ public class PlgMqMsg {
19+
20+ @ TableId (type = IdType .ASSIGN_ID )
21+ private String id ;
22+
23+ private String bizType ;
24+
25+ private String bizKey ;
26+
27+ private String exchange ;
28+
29+ private String routingKey ;
30+
31+ private String message ;
32+
33+ private SendStateEnum sendState ;
34+
35+ private ConsumeStateEnum consumeState ;
36+
37+ private Date nextRetryTime ;
38+
39+ private String cause ;
40+
41+ private Integer currRetryTimes ;
42+
43+ private Integer maxRetryTimes ;
44+
45+ private Long backoffInitInterval ;
46+
47+ private Double backoffMultiplier ;
48+
49+ private Long backoffMaxInterval ;
50+
51+ @ TableField (fill = FieldFill .INSERT )
52+ private Date createTime ;
53+
54+ @ TableField (fill = FieldFill .UPDATE )
55+ private Date updateTime ;
56+
57+ @ TableField (fill = FieldFill .INSERT_UPDATE )
58+ private String updateUser ;
59+ }
Original file line number Diff line number Diff line change 1+ package com .github .cadecode .uniboot .framework .base .plugin .enums ;
2+
3+ import com .baomidou .mybatisplus .annotation .EnumValue ;
4+ import com .fasterxml .jackson .annotation .JsonValue ;
5+ import lombok .Getter ;
6+
7+ /**
8+ * 消费者消息确认状态枚举
9+ *
10+ * @author Cade Li
11+ * @since 2023/8/19
12+ */
13+ @ Getter
14+ public enum ConsumeStateEnum {
15+
16+ /**
17+ * 确认
18+ */
19+ ACK ("ACK" ),
20+
21+ /**
22+ * 不确认
23+ */
24+ NACK ("NACK" ),
25+
26+ ;
27+
28+ @ EnumValue
29+ @ JsonValue
30+ private final String state ;
31+
32+ ConsumeStateEnum (String state ) {
33+ this .state = state ;
34+ }
35+ }
Original file line number Diff line number Diff line change 1+ package com .github .cadecode .uniboot .framework .base .plugin .enums ;
2+
3+ import com .baomidou .mybatisplus .annotation .EnumValue ;
4+ import com .fasterxml .jackson .annotation .JsonValue ;
5+ import lombok .Getter ;
6+
7+ /**
8+ * 生产者消息发送状态枚举
9+ *
10+ * @author Cade Li
11+ * @since 2023/8/19
12+ */
13+ @ Getter
14+ public enum SendStateEnum {
15+
16+ /**
17+ * 处理中
18+ */
19+ PREPARING ("PREPARING" ),
20+
21+ /**
22+ * 完成
23+ */
24+ OVER ("OVER" ),
25+
26+ /**
27+ * 失败
28+ */
29+ FAIL ("FAIL" ),
30+
31+ ;
32+
33+ @ EnumValue
34+ @ JsonValue
35+ private final String state ;
36+
37+ SendStateEnum (String state ) {
38+ this .state = state ;
39+ }
40+ }
Original file line number Diff line number Diff line change 1+ package com .github .cadecode .uniboot .framework .base .plugin .mapper ;
2+
3+ import com .baomidou .mybatisplus .core .mapper .BaseMapper ;
4+ import com .github .cadecode .uniboot .framework .base .plugin .bean .po .PlgMqMsg ;
5+ import org .apache .ibatis .annotations .Mapper ;
6+
7+ /**
8+ * PlgMqMsg Mapper
9+ *
10+ * @author Cade Li
11+ * @since 2023/8/19
12+ */
13+ @ Mapper
14+ public interface PlgMqMsgMapper extends BaseMapper <PlgMqMsg > {
15+ }
Original file line number Diff line number Diff line change 1+ package com .github .cadecode .uniboot .framework .base .plugin .service ;
2+
3+ import com .baomidou .mybatisplus .extension .service .IService ;
4+ import com .github .cadecode .uniboot .framework .base .plugin .bean .po .PlgMqMsg ;
5+
6+ /**
7+ * PlgMqMsg Service
8+ *
9+ * @author Cade Li
10+ * @since 2023/5/26
11+ */
12+ public interface PlgMqMsgService extends IService <PlgMqMsg > {
13+ }
Original file line number Diff line number Diff line change 1+ package com .github .cadecode .uniboot .framework .base .plugin .serviceimpl ;
2+
3+ import com .baomidou .mybatisplus .extension .service .impl .ServiceImpl ;
4+ import com .github .cadecode .uniboot .framework .base .plugin .bean .po .PlgMqMsg ;
5+ import com .github .cadecode .uniboot .framework .base .plugin .mapper .PlgMqMsgMapper ;
6+ import com .github .cadecode .uniboot .framework .base .plugin .service .PlgMqMsgService ;
7+ import org .springframework .stereotype .Service ;
8+
9+ /**
10+ * PlgMqMsg Service 实现
11+ *
12+ * @author Cade Li
13+ * @since 2023/5/26
14+ */
15+ @ Service
16+ public class PlgMqMsgServiceImpl extends ServiceImpl <PlgMqMsgMapper , PlgMqMsg > implements PlgMqMsgService {
17+ }
You can’t perform that action at this time.
0 commit comments