feat: 添加UTF-8编码支持并优化DTO验证
refactor: 重构用户服务密码更新逻辑 fix: 删除不再使用的MarkdownDto类 style: 清理日志文件并优化日志配置 build: 更新pom.xml配置以支持UTF-8编码 docs: 更新application.properties配置文档
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
package com.qf.myafterprojecy.pojo.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Getter
|
||||
public class ArticleDto {
|
||||
private Integer id;
|
||||
private Integer articleid;
|
||||
|
||||
@NotBlank(message = "标题不能为空")
|
||||
private String title;
|
||||
@@ -19,17 +16,23 @@ public class ArticleDto {
|
||||
private Integer attributeid;
|
||||
|
||||
private String img;
|
||||
|
||||
private Integer viewCount;
|
||||
|
||||
private Integer likes;
|
||||
|
||||
private Integer status;
|
||||
|
||||
// Getters and Setters
|
||||
@NotBlank(message = "Markdown内容不能为空")
|
||||
private String markdownscontent;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
// Getters and Setters
|
||||
public Integer getArticleid() {
|
||||
return articleid;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
public void setArticleid(Integer articleid) {
|
||||
this.articleid = articleid;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
@@ -48,12 +51,12 @@ public class ArticleDto {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
public Integer getAttributeid() {
|
||||
return attributeid;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
public void setAttributeid(Integer attributeid) {
|
||||
this.attributeid = attributeid;
|
||||
}
|
||||
|
||||
public String getImg() {
|
||||
@@ -63,4 +66,36 @@ public class ArticleDto {
|
||||
public void setImg(String img) {
|
||||
this.img = img;
|
||||
}
|
||||
|
||||
public Integer getViewCount() {
|
||||
return viewCount;
|
||||
}
|
||||
|
||||
public void setViewCount(Integer viewCount) {
|
||||
this.viewCount = viewCount;
|
||||
}
|
||||
|
||||
public Integer getLikes() {
|
||||
return likes;
|
||||
}
|
||||
|
||||
public void setLikes(Integer likes) {
|
||||
this.likes = likes;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getMarkdownscontent() {
|
||||
return markdownscontent;
|
||||
}
|
||||
|
||||
public void setMarkdownscontent(String markdownscontent) {
|
||||
this.markdownscontent = markdownscontent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class CategoryAttributeDto {
|
||||
private Integer attributeid;
|
||||
|
||||
@NotNull(message = "分类ID不能为空")
|
||||
private Integer categoryid;
|
||||
@@ -12,6 +13,14 @@ public class CategoryAttributeDto {
|
||||
private String attributename;
|
||||
|
||||
// Getters and Setters
|
||||
public Integer getAttributeid() {
|
||||
return attributeid;
|
||||
}
|
||||
|
||||
public void setAttributeid(Integer attributeid) {
|
||||
this.attributeid = attributeid;
|
||||
}
|
||||
|
||||
public Integer getCategoryid() {
|
||||
return categoryid;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,18 @@
|
||||
package com.qf.myafterprojecy.pojo.dto;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class CategoryDto {
|
||||
private Integer typeid;
|
||||
|
||||
@NotBlank(message = "分类名称不能为空")
|
||||
private String typename;
|
||||
|
||||
private String description;
|
||||
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
private LocalDateTime updatedAt;
|
||||
|
||||
// Getters and Setters
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.qf.myafterprojecy.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
public class MarkdownDto {
|
||||
@NotBlank(message = "Markdown内容不能为空")
|
||||
private String markdownscontent;
|
||||
|
||||
public String getMarkdownscontent() {
|
||||
return markdownscontent;
|
||||
}
|
||||
|
||||
public void setMarkdownscontent(String markdownscontent) {
|
||||
this.markdownscontent = markdownscontent;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,6 +18,8 @@ public class MessageDto {
|
||||
private Integer replyid;
|
||||
|
||||
private Integer articleid;
|
||||
|
||||
private Integer likes;
|
||||
|
||||
public Integer getReplyid() {
|
||||
return replyid;
|
||||
@@ -26,6 +28,7 @@ public class MessageDto {
|
||||
public void setReplyid(Integer replyid) {
|
||||
this.replyid = replyid;
|
||||
}
|
||||
|
||||
public Integer getMessageid() {
|
||||
return messageid;
|
||||
}
|
||||
@@ -81,4 +84,12 @@ public class MessageDto {
|
||||
public void setArticleid(Integer articleid) {
|
||||
this.articleid = articleid;
|
||||
}
|
||||
|
||||
public Integer getLikes() {
|
||||
return likes;
|
||||
}
|
||||
|
||||
public void setLikes(Integer likes) {
|
||||
this.likes = likes;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.qf.myafterprojecy.pojo.dto;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
public class UserDto {
|
||||
private Long id;
|
||||
|
||||
@NotBlank(message = "用户名不能为空")
|
||||
private String username;
|
||||
|
||||
@@ -15,9 +17,16 @@ public class UserDto {
|
||||
@NotBlank(message = "手机号不能为空")
|
||||
private String phone;
|
||||
|
||||
@NotBlank(message = "角色不能为空")
|
||||
private int role;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
@@ -57,5 +66,4 @@ public class UserDto {
|
||||
public void setRole(int role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user