|
@@ -5,6 +5,7 @@ import com.diagbot.dto.RespDTO;
|
|
import com.diagbot.facade.CacheFacade;
|
|
import com.diagbot.facade.CacheFacade;
|
|
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.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -22,6 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
@RestController
|
|
@RestController
|
|
@SuppressWarnings("unchecked")
|
|
@SuppressWarnings("unchecked")
|
|
@Api(value = "缓存API", tags = { "缓存API" })
|
|
@Api(value = "缓存API", tags = { "缓存API" })
|
|
|
|
+@Slf4j
|
|
public class CacheController {
|
|
public class CacheController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -109,8 +111,10 @@ public class CacheController {
|
|
// 加载大数据缓存
|
|
// 加载大数据缓存
|
|
boolean flag = cacheFacade.reloadPushDB();
|
|
boolean flag = cacheFacade.reloadPushDB();
|
|
if (flag) {
|
|
if (flag) {
|
|
|
|
+ log.error("加载大数据缓存成功");
|
|
return RespDTO.onSuc(flag);
|
|
return RespDTO.onSuc(flag);
|
|
} else {
|
|
} else {
|
|
|
|
+ log.error("加载大数据缓存失败");
|
|
return RespDTO.onError("加载知识库缓存成功,加载大数据缓存失败");
|
|
return RespDTO.onError("加载知识库缓存成功,加载大数据缓存失败");
|
|
}
|
|
}
|
|
}
|
|
}
|