Skip to content

Commit

Permalink
feat: use lombok
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterChenS committed Mar 16, 2024
1 parent 65fb8b5 commit 33a8877
Show file tree
Hide file tree
Showing 19 changed files with 60 additions and 760 deletions.
9 changes: 9 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<docker.image.prefix>winterchen</docker.image.prefix>
<lombok.version>1.18.8</lombok.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -164,6 +165,14 @@
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>


</dependencies>

Expand Down
25 changes: 2 additions & 23 deletions src/main/java/cn/luischen/dto/ArchiveDto.java
Original file line number Diff line number Diff line change
@@ -1,40 +1,19 @@
package cn.luischen.dto;

import cn.luischen.model.ContentDomain;
import lombok.Data;

import java.util.List;

/**
* 文章归档类
* Created by winterchen on 2018/4/30.
*/
@Data
public class ArchiveDto {

private String date;
private String count;
private List<ContentDomain> articles;

public String getDate() {
return date;
}

public void setDate(String date) {
this.date = date;
}

public String getCount() {
return count;
}

public void setCount(String count) {
this.count = count;
}

public List<ContentDomain> getArticles() {
return articles;
}

public void setArticles(List<ContentDomain> articles) {
this.articles = articles;
}
}
49 changes: 3 additions & 46 deletions src/main/java/cn/luischen/dto/AttAchDto.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package cn.luischen.dto;

import lombok.Data;

/**
* Created by winterchen on 2018/4/29.
*/
@Data
public class AttAchDto extends BaseDto{

/** 主键编号 */
Expand All @@ -19,51 +22,5 @@ public class AttAchDto extends BaseDto{
private Integer created;


public Integer getId() {
return id;
}

public void setId(Integer id) {
this.id = id;
}

public String getFname() {
return fname;
}

public void setFname(String fname) {
this.fname = fname;
}

public String getFtype() {
return ftype;
}

public void setFtype(String ftype) {
this.ftype = ftype;
}

public String getFkey() {
return fkey;
}

public void setFkey(String fkey) {
this.fkey = fkey;
}

public Integer getAuthorId() {
return authorId;
}

public void setAuthorId(Integer authorId) {
this.authorId = authorId;
}

public Integer getCreated() {
return created;
}

public void setCreated(Integer created) {
this.created = created;
}
}
10 changes: 3 additions & 7 deletions src/main/java/cn/luischen/dto/BaseDto.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
package cn.luischen.dto;

import lombok.Data;

/**
* 公共属性的类
* Created by winterchen on 2018/4/29.
*/
@Data
public class BaseDto {


/** 用户名 */
private String userName;

public String getUserName() {
return userName;
}

public void setUserName(String userName) {
this.userName = userName;
}
}
11 changes: 4 additions & 7 deletions src/main/java/cn/luischen/dto/MetaDto.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
package cn.luischen.dto;

import cn.luischen.model.MetaDomain;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
* 标签、分类列表
* Created by winterchen on 2018/4/30.
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class MetaDto extends MetaDomain {

private int count;

public int getCount() {
return count;
}

public void setCount(int count) {
this.count = count;
}
}
34 changes: 3 additions & 31 deletions src/main/java/cn/luischen/dto/StatisticsDto.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package cn.luischen.dto;

import lombok.Data;

/**
* 后台统计对象
* Created by winterchen on 2018/4/30.
*/
@Data
public class StatisticsDto {

/**
Expand All @@ -23,35 +26,4 @@ public class StatisticsDto {
*/
private Long attachs;

public Long getArticles() {
return articles;
}

public void setArticles(Long articles) {
this.articles = articles;
}

public Long getComments() {
return comments;
}

public void setComments(Long comments) {
this.comments = comments;
}

public Long getLinks() {
return links;
}

public void setLinks(Long links) {
this.links = links;
}

public Long getAttachs() {
return attachs;
}

public void setAttachs(Long attachs) {
this.attachs = attachs;
}
}
34 changes: 3 additions & 31 deletions src/main/java/cn/luischen/dto/cond/CommentCond.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package cn.luischen.dto.cond;

import lombok.Data;

/**
* 评论的查找参数
* Created by winterchen on 2018/4/29.
*/
@Data
public class CommentCond {
/**
* 状态
Expand All @@ -23,35 +26,4 @@ public class CommentCond {
*/
private Integer parent;

public String getStatus() {
return status;
}

public void setStatus(String status) {
this.status = status;
}

public Integer getStartTime() {
return startTime;
}

public void setStartTime(Integer startTime) {
this.startTime = startTime;
}

public Integer getEndTime() {
return endTime;
}

public void setEndTime(Integer endTime) {
this.endTime = endTime;
}

public Integer getParent() {
return parent;
}

public void setParent(Integer parent) {
this.parent = parent;
}
}
65 changes: 3 additions & 62 deletions src/main/java/cn/luischen/dto/cond/ContentCond.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package cn.luischen.dto.cond;

import lombok.Data;

/**
* 文章查询条件
* Created by winterchen on 2018/4/29.
*/
@Data
public class ContentCond {

/**
Expand Down Expand Up @@ -41,67 +44,5 @@ public class ContentCond {
*/
private Integer endTime;

public String getTag() {
return tag;
}

public void setTag(String tag) {
this.tag = tag;
}

public String getCategory() {
return category;
}

public void setCategory(String category) {
this.category = category;
}

public String getStatus() {
return status;
}

public void setStatus(String status) {
this.status = status;
}

public String getTitle() {
return title;
}

public void setTitle(String title) {
this.title = title;
}

public String getContent() {
return content;
}

public void setContent(String content) {
this.content = content;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public Integer getStartTime() {
return startTime;
}

public void setStartTime(Integer startTime) {
this.startTime = startTime;
}

public Integer getEndTime() {
return endTime;
}

public void setEndTime(Integer endTime) {
this.endTime = endTime;
}
}
17 changes: 3 additions & 14 deletions src/main/java/cn/luischen/dto/cond/MetaCond.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
package cn.luischen.dto.cond;

import lombok.Data;

/**
* meta查询条件
* Created by winterchen on 2018/4/30.
*/
@Data
public class MetaCond {

/**
Expand All @@ -16,19 +19,5 @@ public class MetaCond {
private String type;


public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}
}
Loading

0 comments on commit 33a8877

Please sign in to comment.