|
|
@@ -14,7 +14,6 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
import org.springframework.data.domain.Sort;
|
|
|
-import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
|
@@ -69,23 +68,8 @@ public class ForegroundController /*extends BaseController */{
|
|
|
return PageList.pageList(pageNumber, pageSize, (int) total, list);
|
|
|
}
|
|
|
|
|
|
- @Operation(summary = "文章分类列表页面", description = "N")
|
|
|
+ @Operation(summary = "文章分类/标签列表页面", description = "N")
|
|
|
@GetMapping("/category")
|
|
|
- public String category() {
|
|
|
- List<CategoryCount> list = categoryService.findCategoryCountByPage(CategoryType.Category.getValue(), false);
|
|
|
- return WebResult.success(list);
|
|
|
- }
|
|
|
-
|
|
|
- @Operation(summary = "某个分类下的文章列表页面", description = "N")
|
|
|
- @GetMapping("/category/post")
|
|
|
- public String category1(@RequestParam("category") String category, @RequestParam("pn") int pageNumber) {
|
|
|
- Page<UserArticle> page = articleQuery.findByCategory(pageSize, pageNumber, category, CategoryType.Category.getValue());
|
|
|
- PageList<UserArticle> pageList = getPageList(page);
|
|
|
- return WebResult.success(pageList);
|
|
|
- }
|
|
|
-
|
|
|
- @Operation(summary = "文章标签列表页面", description = "N")
|
|
|
- @GetMapping("/tag")
|
|
|
public String tag(@RequestParam("type") String type) {
|
|
|
int typeInt = 0;
|
|
|
if (type.equals("tag")) {
|
|
|
@@ -100,8 +84,8 @@ public class ForegroundController /*extends BaseController */{
|
|
|
return WebResult.success(list);
|
|
|
}
|
|
|
|
|
|
- @Operation(summary = "某个标签下的文章列表页面", description = "N")
|
|
|
- @GetMapping("/tag/post")
|
|
|
+ @Operation(summary = "某个分类/标签下的文章列表页面", description = "N")
|
|
|
+ @GetMapping("/category/post")
|
|
|
public String tagPost(@RequestParam("type") String type,
|
|
|
@RequestParam("name") String name,
|
|
|
@RequestParam("pn") int pageNumber) {
|
|
|
@@ -138,7 +122,7 @@ public class ForegroundController /*extends BaseController */{
|
|
|
|
|
|
@Operation(summary = "关于页面", description = "N")
|
|
|
@GetMapping("/about")
|
|
|
- public String about(ModelMap model) {
|
|
|
+ public String about() {
|
|
|
AboutView aboutView = articleQuery.getAboutView();
|
|
|
return WebResult.success(aboutView);
|
|
|
}
|