refactor: refactoring code; update encryption algorithm; add build ci;
This commit is contained in:
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import xin.merlin.myblog_server.entity.Article;
|
||||
import xin.merlin.myblog_server.entity.Comment;
|
||||
import xin.merlin.myblog_server.entity.News;
|
||||
import xin.merlin.myblog_server.service.impl.*;
|
||||
@@ -49,7 +50,12 @@ public class BasicController {
|
||||
public RequestBack getArticle(@PathVariable Integer a_id) {
|
||||
return RequestBack.success(ResultCode.SUCCESS,articleService.getById(a_id));
|
||||
}
|
||||
// 参与项目
|
||||
// 获取文章
|
||||
@GetMapping("/get/articles")
|
||||
public RequestBack getArticles(@RequestParam Integer current,@RequestParam Integer size) {
|
||||
Page<Article> page = new Page<>(current,size);
|
||||
return RequestBack.success(ResultCode.SUCCESS,articleService.page(page));
|
||||
}
|
||||
// 发表评论
|
||||
@PostMapping("/publish/comment")
|
||||
public RequestBack publishComment(@RequestBody Comment comment) {
|
||||
|
||||
Reference in New Issue
Block a user