|
@@ -26,7 +26,9 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
|
|
|
@Api("文章接口")
|
|
@@ -41,12 +43,13 @@ public class ArticleController {
|
|
|
@Autowired
|
|
|
private IFsArticleCateService articleCateService;
|
|
|
|
|
|
- @Cacheable(value="getArticleCateList")
|
|
|
+ @Cacheable(value="getArticleCateList", key = "#status")
|
|
|
@ApiOperation("获取文章分类列表")
|
|
|
@GetMapping("/getArticleCateList")
|
|
|
- public R getArticleCateList(){
|
|
|
-
|
|
|
- List<FsArticleCate> list=articleCateService.selectFsArticleCateAllListVO();
|
|
|
+ public R getArticleCateList(@RequestParam(required = false) Integer status){
|
|
|
+ Map<String,Object> params = new HashMap<>();
|
|
|
+ params.put("status", status);
|
|
|
+ List<FsArticleCate> list=articleCateService.selectFsArticleCateAllListVO(params);
|
|
|
return R.ok().put("data",list);
|
|
|
}
|
|
|
@ApiOperation("获取文章列表")
|