|
@@ -13,7 +13,9 @@ import com.diagbot.vo.KgTreeVO;
|
|
import com.diagbot.vo.SchemaVO;
|
|
import com.diagbot.vo.SchemaVO;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
+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.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;
|
|
@@ -32,7 +34,9 @@ import java.util.List;
|
|
@RequestMapping("/kg")
|
|
@RequestMapping("/kg")
|
|
@Api(value = "朗通知识图谱API", tags = { "朗通知识图谱API" })
|
|
@Api(value = "朗通知识图谱API", tags = { "朗通知识图谱API" })
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
|
|
+@Slf4j
|
|
public class KgController {
|
|
public class KgController {
|
|
|
|
+ private static final String KGTREECACHE = "KgTreeCache";
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private KgFacade kgFacade;
|
|
private KgFacade kgFacade;
|
|
@@ -72,5 +76,19 @@ public class KgController {
|
|
public RespDTO<GraDTO> getTu(@RequestBody KgQueryVO kgQueryVO) {
|
|
public RespDTO<GraDTO> getTu(@RequestBody KgQueryVO kgQueryVO) {
|
|
return RespDTO.onSuc(kgFacade.getTuFac(kgQueryVO));
|
|
return RespDTO.onSuc(kgFacade.getTuFac(kgQueryVO));
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 清理权限所有缓存
|
|
|
|
+ *
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation(value = "获取树形分类缓存", notes = "获取树形分类缓存")
|
|
|
|
+ @PostMapping("/delKgTreeCache")
|
|
|
|
+ @SysLogger("delKgTreeCache")
|
|
|
|
+ @CacheEvict(cacheNames = KGTREECACHE, allEntries = true)
|
|
|
|
+ public Boolean delKgTreeCache() {
|
|
|
|
+ log.info("清理服务权限缓存成功");
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|