diff --git a/src/main/java/com/lyt/ExceptionHandler/ExceptionHandler.java b/src/main/java/com/lyt/ExceptionHandler/ExceptionHandler.java index 9367c99d42b5e4fb8c6d58d9ebedf83357c750a6..a32056bfea32f1a8c01b7c2a7d092401f34dbef8 100644 --- a/src/main/java/com/lyt/ExceptionHandler/ExceptionHandler.java +++ b/src/main/java/com/lyt/ExceptionHandler/ExceptionHandler.java @@ -5,6 +5,11 @@ import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestControllerAdvice; +/** + * @Author: + * @Date: 2023/04/09/20:03 + * @Description: + */ @RestControllerAdvice class GlobalExceptionHandler { @ResponseBody diff --git a/src/main/java/com/lyt/JwtInterceptor/InterceptorConfig.java b/src/main/java/com/lyt/JwtInterceptor/InterceptorConfig.java index c046f53c13f232ed86fc73b252e3cf0c5df8df36..726043a17f5b6cc6bbe61683882bc5f948ffb096 100644 --- a/src/main/java/com/lyt/JwtInterceptor/InterceptorConfig.java +++ b/src/main/java/com/lyt/JwtInterceptor/InterceptorConfig.java @@ -4,7 +4,11 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; - +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @Configuration public class InterceptorConfig implements WebMvcConfigurer { @Override diff --git a/src/main/java/com/lyt/JwtInterceptor/JwtInterceptor.java b/src/main/java/com/lyt/JwtInterceptor/JwtInterceptor.java index c8ded602e76edb8b2ed6869e622d5249ba8510da..c04aeb37dabe188f9607064f0e7fb548aea9fc39 100644 --- a/src/main/java/com/lyt/JwtInterceptor/JwtInterceptor.java +++ b/src/main/java/com/lyt/JwtInterceptor/JwtInterceptor.java @@ -18,7 +18,11 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.lang.reflect.Method; - +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ public class JwtInterceptor implements HandlerInterceptor { @Autowired diff --git a/src/main/java/com/lyt/OnlineExamSystemApplication.java b/src/main/java/com/lyt/OnlineExamSystemApplication.java index 659f2f810ce6601af51f066bfce262c232233d0e..83e5b66dadb8ea13465c802cc5a63f64a5d47782 100644 --- a/src/main/java/com/lyt/OnlineExamSystemApplication.java +++ b/src/main/java/com/lyt/OnlineExamSystemApplication.java @@ -3,6 +3,11 @@ package com.lyt; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @MapperScan("com.lyt.dao") @SpringBootApplication public class OnlineExamSystemApplication { diff --git a/src/main/java/com/lyt/bean/Easyuser.java b/src/main/java/com/lyt/bean/Easyuser.java deleted file mode 100644 index 361815a2bb3dc7eaee79044aea948fa834928964..0000000000000000000000000000000000000000 --- a/src/main/java/com/lyt/bean/Easyuser.java +++ /dev/null @@ -1,124 +0,0 @@ -package com.lyt.bean; - -import java.io.Serializable; - -/** - * @author - * - */ -public class Easyuser implements Serializable { - /** - * 主键 - */ - private Integer id; - - private String username; - - private String password; - - private String email; - - private String role; - - private Byte state; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getRole() { - return role; - } - - public void setRole(String role) { - this.role = role; - } - - public Byte getState() { - return state; - } - - public void setState(Byte state) { - this.state = state; - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - Easyuser other = (Easyuser) that; - return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername())) - && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword())) - && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail())) - && (this.getRole() == null ? other.getRole() == null : this.getRole().equals(other.getRole())) - && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode()); - result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode()); - result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode()); - result = prime * result + ((getRole() == null) ? 0 : getRole().hashCode()); - result = prime * result + ((getState() == null) ? 0 : getState().hashCode()); - return result; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", username=").append(username); - sb.append(", password=").append(password); - sb.append(", email=").append(email); - sb.append(", role=").append(role); - sb.append(", state=").append(state); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/lyt/bean/MainMenu.java b/src/main/java/com/lyt/bean/MainMenu.java index 5512ed5e8e0d5c15d407caaecd2ad9e31ab3fdde..19bced35bd77aca267b44b7947f03de38a8311cf 100644 --- a/src/main/java/com/lyt/bean/MainMenu.java +++ b/src/main/java/com/lyt/bean/MainMenu.java @@ -1,7 +1,11 @@ package com.lyt.bean; import java.util.List; - +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ public class MainMenu { private int id; private String title; diff --git a/src/main/java/com/lyt/bean/MsAdmin.java b/src/main/java/com/lyt/bean/MsAdmin.java deleted file mode 100644 index 6c4fd3447aec7e0c2d900fbbc14f2cb5f8d5d653..0000000000000000000000000000000000000000 --- a/src/main/java/com/lyt/bean/MsAdmin.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.lyt.bean; - -import java.io.Serializable; - -/** - * @author - * - */ -public class MsAdmin implements Serializable { - private Long id; - - private String username; - - private String password; - - private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - MsAdmin other = (MsAdmin) that; - return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername())) - && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode()); - result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode()); - return result; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", username=").append(username); - sb.append(", password=").append(password); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/lyt/bean/MsArticle.java b/src/main/java/com/lyt/bean/MsArticle.java deleted file mode 100644 index 5777b44b478937d6ed47ee43bac9b4b3460c7400..0000000000000000000000000000000000000000 --- a/src/main/java/com/lyt/bean/MsArticle.java +++ /dev/null @@ -1,200 +0,0 @@ -package com.lyt.bean; - -import java.io.Serializable; - -/** - * @author - * - */ -public class MsArticle implements Serializable { - private Long id; - - /** - * 评论数量 - */ - private Integer commentCounts; - - /** - * 创建时间 - */ - private Long createDate; - - /** - * 简介 - */ - private String summary; - - /** - * 标题 - */ - private String title; - - /** - * 浏览数量 - */ - private Integer viewCounts; - - /** - * 是否置顶 - */ - private Integer weight; - - /** - * 作者id - */ - private Long authorId; - - /** - * 内容id - */ - private Long bodyId; - - /** - * 类别id - */ - private Integer categoryId; - - private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public Integer getCommentCounts() { - return commentCounts; - } - - public void setCommentCounts(Integer commentCounts) { - this.commentCounts = commentCounts; - } - - public Long getCreateDate() { - return createDate; - } - - public void setCreateDate(Long createDate) { - this.createDate = createDate; - } - - public String getSummary() { - return summary; - } - - public void setSummary(String summary) { - this.summary = summary; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public Integer getViewCounts() { - return viewCounts; - } - - public void setViewCounts(Integer viewCounts) { - this.viewCounts = viewCounts; - } - - public Integer getWeight() { - return weight; - } - - public void setWeight(Integer weight) { - this.weight = weight; - } - - public Long getAuthorId() { - return authorId; - } - - public void setAuthorId(Long authorId) { - this.authorId = authorId; - } - - public Long getBodyId() { - return bodyId; - } - - public void setBodyId(Long bodyId) { - this.bodyId = bodyId; - } - - public Integer getCategoryId() { - return categoryId; - } - - public void setCategoryId(Integer categoryId) { - this.categoryId = categoryId; - } - - @Override - public boolean equals(Object that) { - if (this == that) { - return true; - } - if (that == null) { - return false; - } - if (getClass() != that.getClass()) { - return false; - } - MsArticle other = (MsArticle) that; - return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) - && (this.getCommentCounts() == null ? other.getCommentCounts() == null : this.getCommentCounts().equals(other.getCommentCounts())) - && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate())) - && (this.getSummary() == null ? other.getSummary() == null : this.getSummary().equals(other.getSummary())) - && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) - && (this.getViewCounts() == null ? other.getViewCounts() == null : this.getViewCounts().equals(other.getViewCounts())) - && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight())) - && (this.getAuthorId() == null ? other.getAuthorId() == null : this.getAuthorId().equals(other.getAuthorId())) - && (this.getBodyId() == null ? other.getBodyId() == null : this.getBodyId().equals(other.getBodyId())) - && (this.getCategoryId() == null ? other.getCategoryId() == null : this.getCategoryId().equals(other.getCategoryId())); - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); - result = prime * result + ((getCommentCounts() == null) ? 0 : getCommentCounts().hashCode()); - result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); - result = prime * result + ((getSummary() == null) ? 0 : getSummary().hashCode()); - result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); - result = prime * result + ((getViewCounts() == null) ? 0 : getViewCounts().hashCode()); - result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode()); - result = prime * result + ((getAuthorId() == null) ? 0 : getAuthorId().hashCode()); - result = prime * result + ((getBodyId() == null) ? 0 : getBodyId().hashCode()); - result = prime * result + ((getCategoryId() == null) ? 0 : getCategoryId().hashCode()); - return result; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", commentCounts=").append(commentCounts); - sb.append(", createDate=").append(createDate); - sb.append(", summary=").append(summary); - sb.append(", title=").append(title); - sb.append(", viewCounts=").append(viewCounts); - sb.append(", weight=").append(weight); - sb.append(", authorId=").append(authorId); - sb.append(", bodyId=").append(bodyId); - sb.append(", categoryId=").append(categoryId); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/lyt/bean/QueryInfo.java b/src/main/java/com/lyt/bean/QueryInfo.java index 3300fff9684c1e7a7209c1fcf2607264696c7043..96ecebcf2821a2dfa1be279ef3e57ce7b8616587 100644 --- a/src/main/java/com/lyt/bean/QueryInfo.java +++ b/src/main/java/com/lyt/bean/QueryInfo.java @@ -1,49 +1,18 @@ package com.lyt.bean; +import lombok.AllArgsConstructor; +import lombok.Data; +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ +@Data +@AllArgsConstructor public class QueryInfo { private String query; private int pageNum=1; private int pageSize=1; - public QueryInfo() { - } - public QueryInfo(String query, int pageNum, int pageSize) { - this.query = query; - this.pageNum = pageNum; - this.pageSize = pageSize; - } - - public String getQuery() { - return query; - } - - public int getPageNum() { - return pageNum; - } - - public int getPageSize() { - return pageSize; - } - - public void setQuery(String query) { - this.query = query; - } - - public void setPageNum(int pageNum) { - this.pageNum = pageNum; - } - - public void setPageSize(int pageSize) { - this.pageSize = pageSize; - } - - @Override - public String toString() { - return "QueryInfo{" + - "query='" + query + '\'' + - ", pageNum=" + pageNum + - ", pageSize=" + pageSize + - '}'; - } } diff --git a/src/main/java/com/lyt/bean/Result.java b/src/main/java/com/lyt/bean/Result.java index df0d12e34e5da044c5de878c545b492e990e7d5c..29923749fd7ec7b75cd0845297a88f80602e820e 100644 --- a/src/main/java/com/lyt/bean/Result.java +++ b/src/main/java/com/lyt/bean/Result.java @@ -1,28 +1,16 @@ package com.lyt.bean; - +import lombok.AllArgsConstructor; +import lombok.Data; +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: 返回结果 + */ +@Data +@AllArgsConstructor public class Result { private String code; private String msg; - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - public Result(String code, String msg) { - this.code = code; - this.msg = msg; - } - - public String getMsg() { - return msg; - } } diff --git a/src/main/java/com/lyt/bean/SubMenu.java b/src/main/java/com/lyt/bean/SubMenu.java index c50b60a0383578eeed5dfcc402e080d9e71fe014..36071f06b04f75c038d4af37fbcc1d7cd63561d7 100644 --- a/src/main/java/com/lyt/bean/SubMenu.java +++ b/src/main/java/com/lyt/bean/SubMenu.java @@ -1,49 +1,18 @@ package com.lyt.bean; +import lombok.AllArgsConstructor; +import lombok.Data; +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ +@Data +@AllArgsConstructor public class SubMenu { private int id; private String title; private String path; - public SubMenu() { - } - public SubMenu(int id, String title, String path) { - this.id = id; - this.title = title; - this.path = path; - } - - public int getId() { - return id; - } - - public String getTitle() { - return title; - } - - public String getPath() { - return path; - } - - public void setId(int id) { - this.id = id; - } - - public void setTitle(String title) { - this.title = title; - } - - public void setPath(String path) { - this.path = path; - } - - @Override - public String toString() { - return "SubMenu{" + - "id=" + id + - ", title='" + title + '\'' + - ", path='" + path + '\'' + - '}'; - } } diff --git a/src/main/java/com/lyt/bean/User.java b/src/main/java/com/lyt/bean/User.java index d7f2d3f01cb4ac0bbcc84545199fe79a96a9f5d6..e4317b4662e3eda0ab4bdb3b1f2a93a750b9e477 100644 --- a/src/main/java/com/lyt/bean/User.java +++ b/src/main/java/com/lyt/bean/User.java @@ -3,7 +3,11 @@ package com.lyt.bean; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; - +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @Data @AllArgsConstructor //20203776梁业添 @@ -14,6 +18,7 @@ public class User { private String password; private String sex; private String role_type; + //checkout测试 private boolean deleted; diff --git a/src/main/java/com/lyt/controller/LoginController.java b/src/main/java/com/lyt/controller/LoginController.java index 35667a8944863fbd927078c70a51294e1c0a01da..05a0d0d31d9115da04c25a3b646ad43b63be4358 100644 --- a/src/main/java/com/lyt/controller/LoginController.java +++ b/src/main/java/com/lyt/controller/LoginController.java @@ -8,12 +8,17 @@ import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; - +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @RestController public class LoginController { @Autowired UserDao userDao; + @CrossOrigin @RequestMapping("/login2") public String userLogin(@RequestBody User user) { diff --git a/src/main/java/com/lyt/controller/LoginJwt.java b/src/main/java/com/lyt/controller/LoginJwt.java index 7ede194a63c3cc3c0245460502732eda0e9add39..b01b6dfec657077ff46d2adb73453919ecfa1b50 100644 --- a/src/main/java/com/lyt/controller/LoginJwt.java +++ b/src/main/java/com/lyt/controller/LoginJwt.java @@ -9,7 +9,11 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; - +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @RestController public class LoginJwt { @Autowired diff --git a/src/main/java/com/lyt/controller/MenuController.java b/src/main/java/com/lyt/controller/MenuController.java index 2588b100090e0c0b88e7fbd789efcf6964ac9648..73eaa196f21e02af759ec5fdccd4e33a866e33ee 100644 --- a/src/main/java/com/lyt/controller/MenuController.java +++ b/src/main/java/com/lyt/controller/MenuController.java @@ -13,6 +13,11 @@ import org.springframework.web.bind.annotation.RestController; import java.util.HashMap; import java.util.List; +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @RestController public class MenuController { @Autowired diff --git a/src/main/java/com/lyt/controller/UserConteroller.java b/src/main/java/com/lyt/controller/UserConteroller.java index 970572e35462ed2cac795d8289d295ff122e9fe2..0a75f18ea9e7e2c46ad0cd22596de44c62357ae1 100644 --- a/src/main/java/com/lyt/controller/UserConteroller.java +++ b/src/main/java/com/lyt/controller/UserConteroller.java @@ -10,7 +10,11 @@ import org.springframework.web.bind.annotation.*; import java.util.HashMap; import java.util.List; - +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @RestController public class UserConteroller { diff --git a/src/main/java/com/lyt/dao/EasyuserDao.java b/src/main/java/com/lyt/dao/EasyuserDao.java deleted file mode 100644 index 85885308ff775c0eb1c43e95b04f2568ea1ec742..0000000000000000000000000000000000000000 --- a/src/main/java/com/lyt/dao/EasyuserDao.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.lyt.dao; - -import com.lyt.bean.Easyuser; -import org.springframework.stereotype.Repository; - -/** - * EasyuserDao继承基类 - */ -@Repository -public interface EasyuserDao extends MyBatisBaseDao { - - @Override - Easyuser selectByPrimaryKey(Integer id); -} \ No newline at end of file diff --git a/src/main/java/com/lyt/dao/MenuDao.java b/src/main/java/com/lyt/dao/MenuDao.java index a78e0d0a2d11890866ff4276ef05972f6ed4526c..5f43598bc26625ae23626c5c19c5d4c3c3c959de 100644 --- a/src/main/java/com/lyt/dao/MenuDao.java +++ b/src/main/java/com/lyt/dao/MenuDao.java @@ -4,7 +4,11 @@ import com.lyt.bean.MainMenu; import org.springframework.stereotype.Repository; import java.util.List; - +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @Repository public interface MenuDao { public List getMainMenus(); diff --git a/src/main/java/com/lyt/dao/MyBatisBaseDao.java b/src/main/java/com/lyt/dao/MyBatisBaseDao.java deleted file mode 100644 index b44db1e3e79e18a6ba2e785f68d611cd9ff7911d..0000000000000000000000000000000000000000 --- a/src/main/java/com/lyt/dao/MyBatisBaseDao.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.lyt.dao; - -import java.io.Serializable; - -/** - * DAO公共基类,由MybatisGenerator自动生成请勿修改 - * @param The Model Class 这里是泛型不是Model类 - * @param The Primary Key Class 如果是无主键,则可以用Model来跳过,如果是多主键则是Key类 - */ -public interface MyBatisBaseDao { - int deleteByPrimaryKey(PK id); - - int insert(Model record); - - int insertSelective(Model record); - - Model selectByPrimaryKey(PK id); - - int updateByPrimaryKeySelective(Model record); - - int updateByPrimaryKey(Model record); -} \ No newline at end of file diff --git a/src/main/java/com/lyt/dao/UserDao.java b/src/main/java/com/lyt/dao/UserDao.java index 33ab0f24db9ab1dbc0481e03006d82d8f6c024e2..aa23188baa6c0a788215484eccba632f6b4747c3 100644 --- a/src/main/java/com/lyt/dao/UserDao.java +++ b/src/main/java/com/lyt/dao/UserDao.java @@ -6,6 +6,11 @@ import org.springframework.stereotype.Repository; import java.util.List; +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @Repository public interface UserDao { diff --git a/src/main/java/com/lyt/service/TokenService.java b/src/main/java/com/lyt/service/TokenService.java index edb430b56af3979dd1193b489964e2716361abf5..05bb8033cdcfa8b1b6eb61122371f9c4006f98c2 100644 --- a/src/main/java/com/lyt/service/TokenService.java +++ b/src/main/java/com/lyt/service/TokenService.java @@ -6,7 +6,11 @@ import com.lyt.bean.User; import org.springframework.stereotype.Service; import java.util.Date; - +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @Service public class TokenService { /** diff --git a/src/main/java/com/lyt/service/UserService.java b/src/main/java/com/lyt/service/UserService.java index 324f0f57bf0277c7bb542f74384dd1f1cd7e2650..3dc613a14de93a59a1a4ef6da1b05e54077a855a 100644 --- a/src/main/java/com/lyt/service/UserService.java +++ b/src/main/java/com/lyt/service/UserService.java @@ -3,6 +3,11 @@ package com.lyt.service; import com.lyt.bean.User; import org.springframework.stereotype.Service; +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @Service public class UserService { diff --git a/src/main/java/com/lyt/util/WebConfig.java b/src/main/java/com/lyt/util/WebConfig.java index a578e5ba0cac140475178a26d11f224363afb081..b3a47dde248e4c6b1587480e990d33c686da1b5f 100644 --- a/src/main/java/com/lyt/util/WebConfig.java +++ b/src/main/java/com/lyt/util/WebConfig.java @@ -4,7 +4,11 @@ import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; - +/** + * @Author: lyt + * @Date: 2023/04/09/20:03 + * @Description: + */ @Configuration //全局配置类 public class WebConfig implements WebMvcConfigurer { diff --git a/src/main/resources/mapper/EasyuserDao.xml b/src/main/resources/mapper/EasyuserDao.xml deleted file mode 100644 index 643c9aeec80fd7b26638abfe31b96c31b7f5e298..0000000000000000000000000000000000000000 --- a/src/main/resources/mapper/EasyuserDao.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - id, username, `password`, email, `role`, `state` - - - - delete from easyuser - where id = #{id,jdbcType=INTEGER} - - - insert into easyuser (id, username, `password`, - email, `role`, `state`) - values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, - #{email,jdbcType=VARCHAR}, #{role,jdbcType=VARCHAR}, #{state,jdbcType=TINYINT}) - - - insert into easyuser - - - id, - - - username, - - - `password`, - - - email, - - - `role`, - - - `state`, - - - - - #{id,jdbcType=INTEGER}, - - - #{username,jdbcType=VARCHAR}, - - - #{password,jdbcType=VARCHAR}, - - - #{email,jdbcType=VARCHAR}, - - - #{role,jdbcType=VARCHAR}, - - - #{state,jdbcType=TINYINT}, - - - - - update easyuser - - - username = #{username,jdbcType=VARCHAR}, - - - `password` = #{password,jdbcType=VARCHAR}, - - - email = #{email,jdbcType=VARCHAR}, - - - `role` = #{role,jdbcType=VARCHAR}, - - - `state` = #{state,jdbcType=TINYINT}, - - - where id = #{id,jdbcType=INTEGER} - - - update easyuser - set username = #{username,jdbcType=VARCHAR}, - `password` = #{password,jdbcType=VARCHAR}, - email = #{email,jdbcType=VARCHAR}, - `role` = #{role,jdbcType=VARCHAR}, - `state` = #{state,jdbcType=TINYINT} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/mapper/MenuMapper.xml b/src/main/resources/mapper/MenuMapper.xml index 1c163fdb69897463fad71f7f801f32ebc65d6159..34640f3c050e3ac18a8f93222ef50f2e3d66a8e1 100644 --- a/src/main/resources/mapper/MenuMapper.xml +++ b/src/main/resources/mapper/MenuMapper.xml @@ -3,23 +3,24 @@ "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - + + + + + + + + + + + - + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/MsArticleDAO.xml b/src/main/resources/mapper/MsArticleDAO.xml deleted file mode 100644 index 7b5d90b93da4697cdd0e950b6eb4ea16e3dfe391..0000000000000000000000000000000000000000 --- a/src/main/resources/mapper/MsArticleDAO.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - id, comment_counts, create_date, summary, title, view_counts, weight, author_id, - body_id, category_id - - - - delete from ms_article - where id = #{id,jdbcType=BIGINT} - - - insert into ms_article (id, comment_counts, create_date, - summary, title, view_counts, - weight, author_id, body_id, - category_id) - values (#{id,jdbcType=BIGINT}, #{commentCounts,jdbcType=INTEGER}, #{createDate,jdbcType=BIGINT}, - #{summary,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, #{viewCounts,jdbcType=INTEGER}, - #{weight,jdbcType=INTEGER}, #{authorId,jdbcType=BIGINT}, #{bodyId,jdbcType=BIGINT}, - #{categoryId,jdbcType=INTEGER}) - - - insert into ms_article - - - id, - - - comment_counts, - - - create_date, - - - summary, - - - title, - - - view_counts, - - - weight, - - - author_id, - - - body_id, - - - category_id, - - - - - #{id,jdbcType=BIGINT}, - - - #{commentCounts,jdbcType=INTEGER}, - - - #{createDate,jdbcType=BIGINT}, - - - #{summary,jdbcType=VARCHAR}, - - - #{title,jdbcType=VARCHAR}, - - - #{viewCounts,jdbcType=INTEGER}, - - - #{weight,jdbcType=INTEGER}, - - - #{authorId,jdbcType=BIGINT}, - - - #{bodyId,jdbcType=BIGINT}, - - - #{categoryId,jdbcType=INTEGER}, - - - - - update ms_article - - - comment_counts = #{commentCounts,jdbcType=INTEGER}, - - - create_date = #{createDate,jdbcType=BIGINT}, - - - summary = #{summary,jdbcType=VARCHAR}, - - - title = #{title,jdbcType=VARCHAR}, - - - view_counts = #{viewCounts,jdbcType=INTEGER}, - - - weight = #{weight,jdbcType=INTEGER}, - - - author_id = #{authorId,jdbcType=BIGINT}, - - - body_id = #{bodyId,jdbcType=BIGINT}, - - - category_id = #{categoryId,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=BIGINT} - - - update ms_article - set comment_counts = #{commentCounts,jdbcType=INTEGER}, - create_date = #{createDate,jdbcType=BIGINT}, - summary = #{summary,jdbcType=VARCHAR}, - title = #{title,jdbcType=VARCHAR}, - view_counts = #{viewCounts,jdbcType=INTEGER}, - weight = #{weight,jdbcType=INTEGER}, - author_id = #{authorId,jdbcType=BIGINT}, - body_id = #{bodyId,jdbcType=BIGINT}, - category_id = #{categoryId,jdbcType=INTEGER} - where id = #{id,jdbcType=BIGINT} - - \ No newline at end of file diff --git a/src/test/java/com/lyt/OnlineExamSystemApplicationTests.java b/src/test/java/com/lyt/OnlineExamSystemApplicationTests.java index a359459f978714ec0b017996cfdbe96d398b4203..0ac9c13f5bf89d9b088d3d9bfaca5b30a9866387 100644 --- a/src/test/java/com/lyt/OnlineExamSystemApplicationTests.java +++ b/src/test/java/com/lyt/OnlineExamSystemApplicationTests.java @@ -2,7 +2,6 @@ package com.lyt; import com.lyt.bean.MainMenu; //import com.naughty.userlogin02.dao.MenuDao; -import com.lyt.dao.EasyuserDao; import com.lyt.dao.MenuDao; import com.lyt.dao.UserDao; import org.junit.jupiter.api.Test; @@ -19,8 +18,6 @@ class OnlineExamSystemApplicationTests { @Autowired MenuDao menuDao; - @Autowired - EasyuserDao easyuserDao; @Test void contextLoads() {