Vue3.0 Advanced combat: Developing high-quality music Web app
V: ititit111222333
@apiOperation (value = "http://apioperation ", notes =" http://apioperation ", httpMethod = "GET")
@GetMapping("/getNewSixItems/{root}")
public IMOOCJSONResult getNewSixItems(@apiParam (name = "root", value = "class ID ", Required = true)
@PathVariable("root") Integer root) {
if (Objects.isNull(root)) {
return IMOOCJSONResult.errorMsg("First level category ID cannot be empty");
}
List<NewItemsVO> newSixItems;
String rootCategory = redisOperator.get("newSixItems");
if (StringUtils.isBlank(rootCategory)) {
newSixItems = categoryService.getNewSixItems(root);
redisOperator.set("firstCategory", JsonUtils.objectToJson(newSixItems));
} else {
newSixItems = JsonUtils.jsonToList(rootCategory, NewItemsVO.class);
}
return IMOOCJSONResult.ok(newSixItems);
}
Copy the code