Compare commits
3 Commits
a84e8b9fe6
...
efbe2a3def
| Author | SHA1 | Date | |
|---|---|---|---|
| efbe2a3def | |||
| 5bb485c612 | |||
| 4ceb96738e |
@@ -32,7 +32,7 @@ public class SaTokenConfig implements WebMvcConfigurer {
|
|||||||
// 排除固件查询接口(不需要登录)
|
// 排除固件查询接口(不需要登录)
|
||||||
.excludePathPatterns("/firmware/**")
|
.excludePathPatterns("/firmware/**")
|
||||||
// 排除静态资源
|
// 排除静态资源
|
||||||
.excludePathPatterns("/", "/index.html", "/*.html", "/*.css", "/*.js", "/*.ico", "/static/**")
|
.excludePathPatterns("/", "/index.html", "/admin/login.html", "/*.css", "/*.js", "/*.ico", "/static/**")
|
||||||
// 排除后台管理静态资源
|
// 排除后台管理静态资源
|
||||||
.excludePathPatterns("/admin/**")
|
.excludePathPatterns("/admin/**")
|
||||||
// 排除 Druid 监控
|
// 排除 Druid 监控
|
||||||
|
|||||||
@@ -33,6 +33,22 @@ public class TutorialController {
|
|||||||
this.tutorialCategoryService = tutorialCategoryService;
|
this.tutorialCategoryService = tutorialCategoryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加查看次数
|
||||||
|
* @param tutorialId 教程id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/addViewCount")
|
||||||
|
public Result<String> addViewCount(@RequestParam Long tutorialId) {
|
||||||
|
Tutorial tutorial = tutorialService.getById(tutorialId);
|
||||||
|
if(tutorial == null) {
|
||||||
|
return Result.error();
|
||||||
|
}
|
||||||
|
tutorial.setViewCount(tutorial.getViewCount() + 1);
|
||||||
|
tutorialService.updateById(tutorial);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分类查询列表
|
* 分类查询列表
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,6 +27,11 @@ public class TutorialCategory implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String icon;
|
private String icon;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 颜色
|
||||||
|
*/
|
||||||
|
private String color;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分类名称
|
* 分类名称
|
||||||
*/
|
*/
|
||||||
|
|||||||
10
src/main/resources/static/tutorial/index.html
Normal file
10
src/main/resources/static/tutorial/index.html
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>教程展示</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user