From 4500db395fdad42c7689e17ef6e3965a6caebdcc Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期一, 12 四月 2021 17:02:55 +0800 Subject: [PATCH] update ruoyi原生改为 MP lombok 格式 update SysConfig 模块代码 --- ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java | 135 +++++++++++++++++++------------------------- 1 files changed, 58 insertions(+), 77 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java index b43abea..073a837 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java @@ -1,100 +1,81 @@ package com.ruoyi.system.domain; +import com.baomidou.mybatisplus.annotation.*; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.*; +import lombok.experimental.Accessors; + import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.core.domain.BaseEntity; +import java.util.Date; /** * 閫氱煡鍏憡琛� sys_notice - * + * * @author ruoyi */ -public class SysNotice extends BaseEntity -{ +@Data +@NoArgsConstructor +@Accessors(chain = true) +@TableName("sys_notice") +public class SysNotice { private static final long serialVersionUID = 1L; - /** 鍏憡ID */ + /** + * 鍏憡ID + */ + @TableId(value = "notice_id", type = IdType.AUTO) private Long noticeId; - /** 鍏憡鏍囬 */ - private String noticeTitle; - - /** 鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛� */ - private String noticeType; - - /** 鍏憡鍐呭 */ - private String noticeContent; - - /** 鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛� */ - private String status; - - public Long getNoticeId() - { - return noticeId; - } - - public void setNoticeId(Long noticeId) - { - this.noticeId = noticeId; - } - - public void setNoticeTitle(String noticeTitle) - { - this.noticeTitle = noticeTitle; - } - + /** + * 鍏憡鏍囬 + */ @NotBlank(message = "鍏憡鏍囬涓嶈兘涓虹┖") @Size(min = 0, max = 50, message = "鍏憡鏍囬涓嶈兘瓒呰繃50涓瓧绗�") - public String getNoticeTitle() - { - return noticeTitle; - } + private String noticeTitle; - public void setNoticeType(String noticeType) - { - this.noticeType = noticeType; - } + /** + * 鍏憡绫诲瀷锛�1閫氱煡 2鍏憡锛� + */ + private String noticeType; - public String getNoticeType() - { - return noticeType; - } + /** + * 鍏憡鍐呭 + */ + private String noticeContent; - public void setNoticeContent(String noticeContent) - { - this.noticeContent = noticeContent; - } + /** + * 鍏憡鐘舵�侊紙0姝e父 1鍏抽棴锛� + */ + private String status; - public String getNoticeContent() - { - return noticeContent; - } + /** + * 鍒涘缓鑰� + */ + private String createBy; - public void setStatus(String status) - { - this.status = status; - } + /** + * 鍒涘缓鏃堕棿 + */ + @TableField(fill = FieldFill.INSERT) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; - public String getStatus() - { - return status; - } + /** + * 鏇存柊鑰� + */ + private String updateBy; - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("noticeId", getNoticeId()) - .append("noticeTitle", getNoticeTitle()) - .append("noticeType", getNoticeType()) - .append("noticeContent", getNoticeContent()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } + /** + * 鏇存柊鏃堕棿 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + /** + * 澶囨敞 + */ + private String remark; + } -- Gitblit v1.9.3