提交 90b50cae 作者: yanxin

增加专题跨环境同步相关接口

上级 4f2d5918
...@@ -461,12 +461,12 @@ public class FileController { ...@@ -461,12 +461,12 @@ public class FileController {
private byte[] getBytes(InfoDataSearchCondition searchCondition, Integer pageSize) { private byte[] getBytes(InfoDataSearchCondition searchCondition, Integer pageSize) {
String[] fetchFields = new String[]{"score", "title", "titleRaw", "summary", "summaryRaw", "content", "contentRaw", "author", "origin", "publishDate", "sourceAddress", "classificationType", "hitWords", "labels"}; String[] fetchFields = new String[]{"id", "score", "title", "titleRaw", "summary", "summaryRaw", "content", "contentRaw", "author", "origin", "publishDate", "sourceAddress", "classificationType", "hitWords", "labels"};
searchCondition.setFetchFields(fetchFields); searchCondition.setFetchFields(fetchFields);
searchCondition.setPageSize(pageSize); searchCondition.setPageSize(pageSize);
byte[] bytes = null; byte[] bytes = null;
try { try {
String[] arr = new String[]{"得分", "标题", "标题译文", "摘要", "摘要译文", "正文", "正文译文", "作者", "来源", "发布时间", "网址", "专题库类型", "命中词"}; String[] arr = new String[]{"id", "得分", "标题", "标题译文", "摘要", "摘要译文", "正文", "正文译文", "作者", "来源", "发布时间", "网址", "专题库类型", "命中词"};
List<String> headers = Arrays.asList(arr); List<String> headers = Arrays.asList(arr);
List<String> subjectIdList = new ArrayList<>(); List<String> subjectIdList = new ArrayList<>();
//判断是否是专题 //判断是否是专题
...@@ -528,6 +528,11 @@ public class FileController { ...@@ -528,6 +528,11 @@ public class FileController {
List<List<String>> list = new ArrayList<>(); List<List<String>> list = new ArrayList<>();
for (SpecialInformation info : informationList) { for (SpecialInformation info : informationList) {
List<String> data = new ArrayList<>(); List<String> data = new ArrayList<>();
if (info.getId() != null) {
data.add(info.getId());
} else {
data.add(" ");
}
if (info.getScore() != null) { if (info.getScore() != null) {
data.add(info.getScore() + ""); data.add(info.getScore() + "");
} else { } else {
......
...@@ -82,8 +82,11 @@ public class SubjectSyncController { ...@@ -82,8 +82,11 @@ public class SubjectSyncController {
/**信息源以及信息源组部分end*/ /**信息源以及信息源组部分end*/
@GetMapping(value = "/getConfigs") @GetMapping(value = "/getConfigs")
public Result<?> getConfigs() { public Result<?> getConfigs() {
List<SubjectSyncConfig.ConfigVo> configVos = JSONArray.parseArray(JSONArray.toJSONString(syncConfig.getConfigs()), SubjectSyncConfig.ConfigVo.class); if(syncConfig != null && syncConfig.getConfigs()!=null && syncConfig.getConfigs().size()>0){
return Result.OK(configVos); List<SubjectSyncConfig.ConfigVo> configVos = JSONArray.parseArray(JSONArray.toJSONString(syncConfig.getConfigs()), SubjectSyncConfig.ConfigVo.class);
return Result.OK(configVos);
}
return Result.FAIL("未配置同步环境");
} }
@GetMapping(value = "/getProjectTreeList") @GetMapping(value = "/getProjectTreeList")
public Object getProjectTreeList(@RequestParam(name="code") String code) throws Exception { public Object getProjectTreeList(@RequestParam(name="code") String code) throws Exception {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论