提交 ad7ff7a7 作者: obcy

【采集词添加元搜索标识-通知采集只取标识打开的】

上级 4eb62d03
......@@ -555,6 +555,8 @@ public class SubjectManageController {
@PostMapping(value = "/keyWordsBindScope")
public Result<?> keyWordsBindScope(@RequestBody SubjectKeywordsMap subjectKeywordsMap) {
subjectKeywordsMapService.updateById(subjectKeywordsMap);
//同步配置到采集
configurationMessageService.bindKeyWordsSend(subjectKeywordsMap.getSubjectId());
return Result.OK();
}
......
......@@ -62,5 +62,5 @@ public interface KeyWordsMapper extends BaseMapper<KeyWords> {
Integer countByTypeAndIdList(@Param("finalIdList") List<String> finalIdList, @Param("subjectId") String subjectId);
List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(@Param("subjectIds") List<String> ids, @Param("bindingType") String bindingType);
List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(@Param("subjectIds") List<String> ids, @Param("bindingType") String bindingType, @Param("metaSearchFlag") Integer metaSearchFlag);
}
......@@ -136,6 +136,9 @@
<if test="bindingType!=null and bindingType != ''">
and a.binding_type = #{bindingType}
</if>
<if test="metaSearchFlag!=null">
and a.meta_search_flag = #{metaSearchFlag}
</if>
group by b.id
</select>
</mapper>
......@@ -89,5 +89,5 @@ public interface IKeyWordsService extends IService<KeyWords> {
Integer countByTypeAndIdList(List<String> finalIdList, String subjectId);
List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(List<String> ids, String bindingType);
List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(List<String> ids, String bindingType,Integer metaSearchFlag);
}
......@@ -165,7 +165,7 @@ public interface SubjectService extends IService<Subject> {
*/
void send(String subjectId, String status);
List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(List<String> ids, String bindingType);
List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(List<String> ids, String bindingType,Integer metaSearchFlag);
Result<?> infoSourceBindNew(SubjectPage subjectPage);
......
......@@ -304,7 +304,7 @@ public class ConfigurationMessageService {
}
List<String> subjectIdList = new ArrayList<>();
subjectIdList.add(subjectId);
List<KeyWordsPage> keyWordsPages = subjectService.bindKeyWordsListByIdsAndBindType(subjectIdList,"1");
List<KeyWordsPage> keyWordsPages = subjectService.bindKeyWordsListByIdsAndBindType(subjectIdList,"1",1);
String keyWordsParam;
if (CollectionUtil.isEmpty(keyWordsPages)) {
log.info("专题未绑定采集词组,通知采集清空");
......
......@@ -293,7 +293,7 @@ public class KeyWordsServiceImpl extends ServiceImpl<KeyWordsMapper, KeyWords> i
keywordsTypeMapService.save(keywordsTypeMap);
}
@Override
public List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(List<String> ids, String bindingType) {
return baseMapper.bindKeyWordsListByIdsAndBindType(ids,bindingType);
public List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(List<String> ids, String bindingType,Integer metaSearchFlag) {
return baseMapper.bindKeyWordsListByIdsAndBindType(ids,bindingType,metaSearchFlag);
}
}
......@@ -421,6 +421,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
subjectKeywordsMap.setSubjectId(subjectPage.getId());
subjectKeywordsMap.setType(subjectPage.getType());
subjectKeywordsMap.setBindingType(subjectPage.getBindingType());
subjectKeywordsMap.setMetaSearchFlag(0);
mapList.add(subjectKeywordsMap);
}
subjectKeywordsMapService.saveBatch(mapList);
......@@ -775,8 +776,8 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
}
@Override
public List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(List<String> ids, String bindingType) {
return iKeyWordsService.bindKeyWordsListByIdsAndBindType(ids, bindingType);
public List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(List<String> ids, String bindingType,Integer metaSearchFlag) {
return iKeyWordsService.bindKeyWordsListByIdsAndBindType(ids, bindingType,metaSearchFlag);
}
......
......@@ -35,5 +35,7 @@ public class SubjectKeywordsMap implements Serializable {
private String type;
/**绑定类型1:绑定为采集词,2:绑定为过滤词,3绑定为排除词组*/
private String bindingType;
/**是否启用元搜索 1启用,0不启用*/
private Integer metaSearchFlag;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论