|
@@ -16,6 +16,7 @@ import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
|
+import org.springframework.cache.annotation.Cacheable;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -58,7 +59,9 @@ public class KgController {
|
|
@ApiOperation(value = "获取树形分类", notes = "获取树形分类")
|
|
@ApiOperation(value = "获取树形分类", notes = "获取树形分类")
|
|
@PostMapping("/getTree")
|
|
@PostMapping("/getTree")
|
|
@SysLogger("getTree")
|
|
@SysLogger("getTree")
|
|
|
|
+ @Cacheable(value = KGTREECACHE, key = "'kgtree:t_' + #kgTreeVO.type + '_st_' + #kgTreeVO.subType")
|
|
public RespDTO<String> getTree(@RequestBody @Valid KgTreeVO kgTreeVO) {
|
|
public RespDTO<String> getTree(@RequestBody @Valid KgTreeVO kgTreeVO) {
|
|
|
|
+ log.info("获取树形分类缓存成功");
|
|
return RespDTO.onSuc(kgFacade.getTreeFac(kgTreeVO));
|
|
return RespDTO.onSuc(kgFacade.getTreeFac(kgTreeVO));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -77,18 +80,14 @@ public class KgController {
|
|
return RespDTO.onSuc(kgFacade.getTuFac(kgQueryVO));
|
|
return RespDTO.onSuc(kgFacade.getTuFac(kgQueryVO));
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * 清理权限所有缓存
|
|
|
|
- *
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @ApiOperation(value = "获取树形分类缓存", notes = "获取树形分类缓存")
|
|
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "清理树形分类缓存", notes = "清理树形分类缓存")
|
|
@PostMapping("/delKgTreeCache")
|
|
@PostMapping("/delKgTreeCache")
|
|
@SysLogger("delKgTreeCache")
|
|
@SysLogger("delKgTreeCache")
|
|
@CacheEvict(cacheNames = KGTREECACHE, allEntries = true)
|
|
@CacheEvict(cacheNames = KGTREECACHE, allEntries = true)
|
|
- public Boolean delKgTreeCache() {
|
|
|
|
- log.info("清理服务权限缓存成功");
|
|
|
|
- return true;
|
|
|
|
|
|
+ public RespDTO<Boolean> delKgTreeCache() {
|
|
|
|
+ log.info("清理树形分类缓存成功");
|
|
|
|
+ return RespDTO.onSuc(true);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|