From 52c1c8b32805f550d3a25d4ec451b4ae98eaca3a Mon Sep 17 00:00:00 2001 From: chanhengseang Date: Sun, 18 May 2025 16:17:34 -0700 Subject: [PATCH] add sport id --- eladmin-system/application.pid | 1 - .../src/main/resources/db/migration/V4__update_event.sql | 1 + sport/src/main/java/com/srr/domain/Event.java | 5 +++++ sport/src/main/java/com/srr/service/dto/EventDto.java | 3 +++ .../main/java/com/srr/service/dto/EventQueryCriteria.java | 4 ++++ 5 files changed, 13 insertions(+), 1 deletion(-) delete mode 100644 eladmin-system/application.pid create mode 100644 eladmin-system/src/main/resources/db/migration/V4__update_event.sql diff --git a/eladmin-system/application.pid b/eladmin-system/application.pid deleted file mode 100644 index f032b10b..00000000 --- a/eladmin-system/application.pid +++ /dev/null @@ -1 +0,0 @@ -74204 \ No newline at end of file diff --git a/eladmin-system/src/main/resources/db/migration/V4__update_event.sql b/eladmin-system/src/main/resources/db/migration/V4__update_event.sql new file mode 100644 index 00000000..59675a08 --- /dev/null +++ b/eladmin-system/src/main/resources/db/migration/V4__update_event.sql @@ -0,0 +1 @@ +alter table event add column sport_id bigint not null references sport (id); \ No newline at end of file diff --git a/sport/src/main/java/com/srr/domain/Event.java b/sport/src/main/java/com/srr/domain/Event.java index 60740501..8ce3604f 100644 --- a/sport/src/main/java/com/srr/domain/Event.java +++ b/sport/src/main/java/com/srr/domain/Event.java @@ -101,6 +101,11 @@ public class Event implements Serializable { @ApiModelProperty(value = "clubId") private Long clubId; + @NotNull + @Column(name = "`sport_id`",nullable = false) + @ApiModelProperty(value = "sportId") + private Long sportId; + @Column(name = "`create_by`") @ApiModelProperty(value = "createBy") private Long createBy; diff --git a/sport/src/main/java/com/srr/service/dto/EventDto.java b/sport/src/main/java/com/srr/service/dto/EventDto.java index 0d03c52c..1e02f986 100644 --- a/sport/src/main/java/com/srr/service/dto/EventDto.java +++ b/sport/src/main/java/com/srr/service/dto/EventDto.java @@ -70,6 +70,9 @@ public class EventDto implements Serializable { @ApiModelProperty(value = "clubId") private Long clubId; + @ApiModelProperty(value = "sportId") + private Long sportId; + @ApiModelProperty(value = "createBy") private Long createBy; } \ No newline at end of file diff --git a/sport/src/main/java/com/srr/service/dto/EventQueryCriteria.java b/sport/src/main/java/com/srr/service/dto/EventQueryCriteria.java index ffc8922b..61da75c1 100644 --- a/sport/src/main/java/com/srr/service/dto/EventQueryCriteria.java +++ b/sport/src/main/java/com/srr/service/dto/EventQueryCriteria.java @@ -50,6 +50,10 @@ public class EventQueryCriteria{ @ApiModelProperty(value = "clubId") private Long clubId; + @Query + @ApiModelProperty(value = "sportId") + private Long sportId; + /** 精确 */ @Query @ApiModelProperty(value = "createBy")