Skip to content

Commit

Permalink
[ISSUE-3393][Fix]fix mybatis-plus enum annotation (#3395)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhugezifang authored Dec 13, 2023
1 parent fdb7c34 commit eceae64
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public PostgreSQLPrepareInterceptor postgreSQLPrepareInterceptor() {
public MybatisPlusPropertiesCustomizer mybatisPlusPropertiesCustomizer() {
return properties -> {
properties.setTypeAliasesPackage("org.apache.streampark.console.*.entity");
properties.setTypeEnumsPackage("org.apache.streampark.console.*.enums");
properties.setMapperLocations(new String[] {"classpath:mapper/*/*.xml"});
MybatisConfiguration mybatisConfiguration = new MybatisConfiguration();
mybatisConfiguration.setJdbcTypeForNull(JdbcType.NULL);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class Message {
private String title;

/** 1) build failure report 2) task monitoring exception */
private Integer type;
private NoticeTypeEnum type;

private String context;

Expand All @@ -54,7 +54,7 @@ public Message(
this.appId = appId;
this.title = title;
this.context = context;
this.type = noticeTypeEnum.get();
this.type = noticeTypeEnum;
this.createTime = new Date();
this.isRead = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public IPage<Message> getUnReadPage(NoticeTypeEnum noticeTypeEnum, RestRequest r
new LambdaQueryWrapper<Message>()
.eq(Message::getIsRead, false)
.orderByDesc(Message::getCreateTime)
.eq(Message::getType, noticeTypeEnum.get());
.eq(Message::getType, noticeTypeEnum);
return this.baseMapper.selectPage(page, queryWrapper);
}
}

0 comments on commit eceae64

Please sign in to comment.