公告修改
This commit is contained in:
@@ -17,6 +17,7 @@ public class AnnouncementConverter {
|
||||
announcement.setContent(request.getContent());
|
||||
announcement.setEnabled(request.getEnabled());
|
||||
announcement.setJumpUrl(request.getJumpUrl());
|
||||
announcement.setBelongId(request.getBelongId());
|
||||
|
||||
return announcement;
|
||||
}
|
||||
@@ -37,6 +38,7 @@ public class AnnouncementConverter {
|
||||
response.setJumpUrl(announcement.getJumpUrl());
|
||||
response.setCreatedAt(announcement.getCreatedAt());
|
||||
response.setUpdatedAt(announcement.getUpdatedAt());
|
||||
response.setBelongId(announcement.getBelongId());
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,9 @@ public class AnnouncementRequest {
|
||||
|
||||
@Schema(description = "跳转链接", example = "https://example.com")
|
||||
private String jumpUrl;
|
||||
|
||||
// belongId字段保留用于内部设置,但不在API文档中暴露
|
||||
private Integer belongId;
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
@@ -48,4 +51,12 @@ public class AnnouncementRequest {
|
||||
public void setJumpUrl(String jumpUrl) {
|
||||
this.jumpUrl = jumpUrl;
|
||||
}
|
||||
|
||||
public Integer getBelongId() {
|
||||
return belongId;
|
||||
}
|
||||
|
||||
public void setBelongId(Integer belongId) {
|
||||
this.belongId = belongId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,9 @@ public class AnnouncementResponse {
|
||||
|
||||
@Schema(description = "更新时间")
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
@Schema(description = "归属ID", example = "1")
|
||||
private Integer belongId;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@@ -82,4 +85,12 @@ public class AnnouncementResponse {
|
||||
public void setUpdatedAt(LocalDateTime updatedAt) {
|
||||
this.updatedAt = updatedAt;
|
||||
}
|
||||
|
||||
public Integer getBelongId() {
|
||||
return belongId;
|
||||
}
|
||||
|
||||
public void setBelongId(Integer belongId) {
|
||||
this.belongId = belongId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,9 @@ public class Announcement {
|
||||
|
||||
@TableField("updated_at")
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
@TableField("belong_id")
|
||||
private Integer belongId;
|
||||
|
||||
public Long getId() { return id; }
|
||||
public void setId(Long id) { this.id = id; }
|
||||
@@ -46,4 +49,7 @@ public class Announcement {
|
||||
|
||||
public LocalDateTime getUpdatedAt() { return updatedAt; }
|
||||
public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
|
||||
|
||||
public Integer getBelongId() { return belongId; }
|
||||
public void setBelongId(Integer belongId) { this.belongId = belongId; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user