lombok集成 减少代码的 get set
This commit is contained in:
parent
c6442d5b2d
commit
c38d33772a
@ -155,6 +155,13 @@
|
|||||||
<artifactId>uid-generator-spring-boot-starter</artifactId>
|
<artifactId>uid-generator-spring-boot-starter</artifactId>
|
||||||
<version>1.0.2.RELEASE</version>
|
<version>1.0.2.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!-- lombok 实体类工具-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.12</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
package com.ruoyi.note.domain;
|
package com.ruoyi.note.domain;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@ -14,6 +16,9 @@ import java.util.Date;
|
|||||||
* @author wang
|
* @author wang
|
||||||
* @date 2020-09-12
|
* @date 2020-09-12
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
public class NmNote
|
public class NmNote
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -86,178 +91,5 @@ public class NmNote
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
public void setNoteId(Long noteId)
|
|
||||||
{
|
|
||||||
this.noteId = noteId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getNoteId()
|
|
||||||
{
|
|
||||||
return noteId;
|
|
||||||
}
|
|
||||||
public void setUserId(Long userId)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUserId()
|
|
||||||
{
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
public void setTitle(String title)
|
|
||||||
{
|
|
||||||
this.title = title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTitle()
|
|
||||||
{
|
|
||||||
return title;
|
|
||||||
}
|
|
||||||
public void setDescription(String description)
|
|
||||||
{
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription()
|
|
||||||
{
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
public void setMenuId(Integer menuId)
|
|
||||||
{
|
|
||||||
this.menuId = menuId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getMenuId()
|
|
||||||
{
|
|
||||||
return menuId;
|
|
||||||
}
|
|
||||||
public void setBackground(String background)
|
|
||||||
{
|
|
||||||
this.background = background;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBackground()
|
|
||||||
{
|
|
||||||
return background;
|
|
||||||
}
|
|
||||||
public void setNoteCount(Integer noteCount)
|
|
||||||
{
|
|
||||||
this.noteCount = noteCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNoteCount()
|
|
||||||
{
|
|
||||||
return noteCount;
|
|
||||||
}
|
|
||||||
public void setNoteSort(Integer noteSort)
|
|
||||||
{
|
|
||||||
this.noteSort = noteSort;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getNoteSort()
|
|
||||||
{
|
|
||||||
return noteSort;
|
|
||||||
}
|
|
||||||
public void setIsState(Integer isState)
|
|
||||||
{
|
|
||||||
this.isState = isState;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsState()
|
|
||||||
{
|
|
||||||
return isState;
|
|
||||||
}
|
|
||||||
public void setReadProgress(Integer readProgress)
|
|
||||||
{
|
|
||||||
this.readProgress = readProgress;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getReadProgress()
|
|
||||||
{
|
|
||||||
return readProgress;
|
|
||||||
}
|
|
||||||
public void setIsStar(Integer isStar)
|
|
||||||
{
|
|
||||||
this.isStar = isStar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsStar()
|
|
||||||
{
|
|
||||||
return isStar;
|
|
||||||
}
|
|
||||||
public void setIsDelete(Integer isDelete)
|
|
||||||
{
|
|
||||||
this.isDelete = isDelete;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsDelete()
|
|
||||||
{
|
|
||||||
return isDelete;
|
|
||||||
}
|
|
||||||
public void setTopFlag(Integer topFlag)
|
|
||||||
{
|
|
||||||
this.topFlag = topFlag;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getTopFlag()
|
|
||||||
{
|
|
||||||
return topFlag;
|
|
||||||
}
|
|
||||||
public void setIsShare(Integer isShare)
|
|
||||||
{
|
|
||||||
this.isShare = isShare;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsShare()
|
|
||||||
{
|
|
||||||
return isShare;
|
|
||||||
}
|
|
||||||
public void setIsEncryption(Integer isEncryption)
|
|
||||||
{
|
|
||||||
this.isEncryption = isEncryption;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getIsEncryption()
|
|
||||||
{
|
|
||||||
return isEncryption;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getCreateTime() {
|
|
||||||
return createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCreateTime(Date createTime) {
|
|
||||||
this.createTime = createTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getUpdateTime() {
|
|
||||||
return updateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setUpdateTime(Date updateTime) {
|
|
||||||
this.updateTime = updateTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("noteId", getNoteId())
|
|
||||||
.append("userId", getUserId())
|
|
||||||
.append("title", getTitle())
|
|
||||||
.append("description", getDescription())
|
|
||||||
.append("menuId", getMenuId())
|
|
||||||
.append("background", getBackground())
|
|
||||||
.append("noteCount", getNoteCount())
|
|
||||||
.append("noteSort", getNoteSort())
|
|
||||||
.append("isState", getIsState())
|
|
||||||
.append("readProgress", getReadProgress())
|
|
||||||
.append("isStar", getIsStar())
|
|
||||||
.append("isDelete", getIsDelete())
|
|
||||||
.append("topFlag", getTopFlag())
|
|
||||||
.append("isShare", getIsShare())
|
|
||||||
.append("isEncryption", getIsEncryption())
|
|
||||||
.append("createTime", getCreateTime())
|
|
||||||
.append("updateTime", getUpdateTime())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package com.ruoyi.note.domain;
|
package com.ruoyi.note.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
@ -11,7 +14,10 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||||||
* @author wang
|
* @author wang
|
||||||
* @date 2020-09-12
|
* @date 2020-09-12
|
||||||
*/
|
*/
|
||||||
public class NmNoteContent extends BaseEntity
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class NmNoteContent
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@ -26,40 +32,5 @@ public class NmNoteContent extends BaseEntity
|
|||||||
@Excel(name = "ueditor编辑器内容")
|
@Excel(name = "ueditor编辑器内容")
|
||||||
private String ueditorContent;
|
private String ueditorContent;
|
||||||
|
|
||||||
public void setNoteId(Long noteId)
|
|
||||||
{
|
|
||||||
this.noteId = noteId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getNoteId()
|
|
||||||
{
|
|
||||||
return noteId;
|
|
||||||
}
|
|
||||||
public void setMarkdownContent(String markdownContent)
|
|
||||||
{
|
|
||||||
this.markdownContent = markdownContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getMarkdownContent()
|
|
||||||
{
|
|
||||||
return markdownContent;
|
|
||||||
}
|
|
||||||
public void setUeditorContent(String ueditorContent)
|
|
||||||
{
|
|
||||||
this.ueditorContent = ueditorContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUeditorContent()
|
|
||||||
{
|
|
||||||
return ueditorContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("noteId", getNoteId())
|
|
||||||
.append("markdownContent", getMarkdownContent())
|
|
||||||
.append("ueditorContent", getUeditorContent())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package com.ruoyi.note.domain;
|
package com.ruoyi.note.domain;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
@ -11,9 +14,12 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||||||
* @author wang
|
* @author wang
|
||||||
* @date 2020-09-12
|
* @date 2020-09-12
|
||||||
*/
|
*/
|
||||||
public class NmNoteTag extends BaseEntity
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class NmNoteTag
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** id */
|
/** id */
|
||||||
private Long id;
|
private Long id;
|
||||||
@ -26,40 +32,4 @@ public class NmNoteTag extends BaseEntity
|
|||||||
@Excel(name = "标签Id")
|
@Excel(name = "标签Id")
|
||||||
private Long tagId;
|
private Long tagId;
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setNoteId(Long noteId)
|
|
||||||
{
|
|
||||||
this.noteId = noteId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getNoteId()
|
|
||||||
{
|
|
||||||
return noteId;
|
|
||||||
}
|
|
||||||
public void setTagId(Long tagId)
|
|
||||||
{
|
|
||||||
this.tagId = tagId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getTagId()
|
|
||||||
{
|
|
||||||
return tagId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("noteId", getNoteId())
|
|
||||||
.append("tagId", getTagId())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user