提交 43401d06 作者: 925993793@qq.com

bug修改

上级 5760bf25
...@@ -221,6 +221,9 @@ public class InformationController { ...@@ -221,6 +221,9 @@ public class InformationController {
if (StringUtils.isEmpty(dataSetId)) { if (StringUtils.isEmpty(dataSetId)) {
return Result.FAIL("数据集id不能为空"); return Result.FAIL("数据集id不能为空");
} }
if (StringUtils.isEmpty(searchCondition.getSubjectId())) {
return Result.FAIL("专题id不能为空");
}
CompletableFuture.runAsync(() -> informationService.saveAsDataSet(searchCondition)); CompletableFuture.runAsync(() -> informationService.saveAsDataSet(searchCondition));
return Result.OK("数据集保存中。。。"); return Result.OK("数据集保存中。。。");
} }
......
...@@ -58,13 +58,6 @@ public class SubjectTypeController { ...@@ -58,13 +58,6 @@ public class SubjectTypeController {
*/ */
@PostMapping("/add") @PostMapping("/add")
public Result<?> addSubjectType(@RequestBody SubjectType subjectType) { public Result<?> addSubjectType(@RequestBody SubjectType subjectType) {
String pid = subjectType.getPid();
if (!"0".equals(pid)) {
int count = subjectTypeMapService.count(new LambdaQueryWrapper<SubjectTypeMap>().eq(SubjectTypeMap::getTypeId, pid));
if (count > 0) {
return Result.FAIL(501, "当前分类下存在专题");
}
}
subjectTypeService.add(subjectType); subjectTypeService.add(subjectType);
return Result.OK(); return Result.OK();
} }
......
...@@ -228,17 +228,14 @@ ...@@ -228,17 +228,14 @@
<if test="searchWord!=null and searchWord != ''"> <if test="searchWord!=null and searchWord != ''">
and ( and (
iso.web_site_name like CONCAT('%',#{searchWord},'%') iso.web_site_name like CONCAT('%',#{searchWord},'%')
or iso.site_uri like CONCAT('%',#{searchWord},'%')
) )
</if> </if>
group by iso.web_site_name group by iso.web_site_name
order by iso.create_time
</select> </select>
<select id="directSourceColumnList" resultType="com.zzsn.event.entity.InfoSource"> <select id="directSourceColumnList" resultType="com.zzsn.event.entity.InfoSource">
select iso.id, iso.site_name, iso.site_uri select iso.id, iso.site_name, iso.site_uri
from info_source iso from info_source iso
where iso.web_site_name = #{webSiteName} where iso.web_site_name = #{webSiteName}
order by iso.create_time
</select> </select>
</mapper> </mapper>
...@@ -75,7 +75,7 @@ public class ScoreModelServiceImpl extends ServiceImpl<ScoreModelMapper, ScoreMo ...@@ -75,7 +75,7 @@ public class ScoreModelServiceImpl extends ServiceImpl<ScoreModelMapper, ScoreMo
if(CollectionUtils.isNotEmpty(list)){ if(CollectionUtils.isNotEmpty(list)){
//不为空,则查询数据库存在的信息 //不为空,则查询数据库存在的信息
Object data = list.get(0).getData(); Object data = list.get(0).getData();
jsonObject.put("data", data); jsonObject.put("data", JSON.parseArray(data.toString()));
return jsonObject; return jsonObject;
}else{ }else{
//为空,返回默认值 //为空,返回默认值
......
...@@ -30,6 +30,9 @@ public class HanlpUtil { ...@@ -30,6 +30,9 @@ public class HanlpUtil {
} }
//每100字最多提取30个词 //每100字最多提取30个词
int keySize = text.length() * 30 / 100; int keySize = text.length() * 30 / 100;
if (keySize == 0) {
keySize = 1;
}
List<String> phraseList = HanLP.extractKeyword(text, keySize); List<String> phraseList = HanLP.extractKeyword(text, keySize);
//获取短语前100个 //获取短语前100个
if (phraseList != null) { if (phraseList != null) {
...@@ -44,7 +47,7 @@ public class HanlpUtil { ...@@ -44,7 +47,7 @@ public class HanlpUtil {
//如果是人名、地名、组织名 则去除 //如果是人名、地名、组织名 则去除
//获取人名、地名、组织名 //获取人名、地名、组织名
List<String> resul = CompanyUtil.entityAll(strs); List<String> resul = CompanyUtil.entityAll(strs);
if (resul.size() > 0) { if (!resul.isEmpty()) {
iterator.remove(); iterator.remove();
continue; continue;
} }
......
...@@ -104,7 +104,7 @@ public class InfoDataSearchCondition { ...@@ -104,7 +104,7 @@ public class InfoDataSearchCondition {
//选择前num条数据 //选择前num条数据
private Integer num; private Integer num;
//资讯id集合,导出/专题分析时使用-研究中心 //资讯id集合-研究中心
private List<String> ids; private List<String> ids;
/*------资讯导出类参数-研究中心---start-------------------*/ /*------资讯导出类参数-研究中心---start-------------------*/
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论