提交 0eca7ff2 作者: 925993793@qq.com

【fix】平台接口bug修改

上级 bb9cd8bd
...@@ -99,8 +99,6 @@ public class SubjectManageController { ...@@ -99,8 +99,6 @@ public class SubjectManageController {
private PythonUtil pythonUtil; private PythonUtil pythonUtil;
@Autowired(required = false) @Autowired(required = false)
private RemoteModelService remoteModelService; private RemoteModelService remoteModelService;
@Autowired
private ConfigurationMessageService configurationMessageService;
@Value("${kafka.topic.subject.run:}") @Value("${kafka.topic.subject.run:}")
private String SUBJECT_MODEL_KAFKA_CHANNEL; private String SUBJECT_MODEL_KAFKA_CHANNEL;
...@@ -455,8 +453,6 @@ public class SubjectManageController { ...@@ -455,8 +453,6 @@ public class SubjectManageController {
@GetMapping(value = "/bindKeyWordsList") @GetMapping(value = "/bindKeyWordsList")
public Result<?> bindKeyWordsList(@RequestParam(name = "id") String id,@RequestParam(name = "bindingType",required = false) String bindingType) { public Result<?> bindKeyWordsList(@RequestParam(name = "id") String id,@RequestParam(name = "bindingType",required = false) String bindingType) {
List<KeyWordsPage> bindKeyWordsList = subjectKeywordsMapService.bindKeyWordsList(id,bindingType); List<KeyWordsPage> bindKeyWordsList = subjectKeywordsMapService.bindKeyWordsList(id,bindingType);
//同步配置到采集
configurationMessageService.bindKeyWordsSend(id);
return Result.OK(bindKeyWordsList); return Result.OK(bindKeyWordsList);
} }
......
...@@ -650,9 +650,7 @@ public class EsService { ...@@ -650,9 +650,7 @@ public class EsService {
} }
//装配信息源的条件 //装配信息源的条件
if (CollectionUtils.isNotEmpty(infoSourceIdList)) { if (CollectionUtils.isNotEmpty(infoSourceIdList)) {
BoolQueryBuilder childQuery = QueryBuilders.boolQuery(); boolQuery.must(QueryBuilders.termsQuery("sid", infoSourceIdList.stream().filter(StringUtils::isNotEmpty).collect(Collectors.toList())));
childQuery.should(QueryBuilders.termsQuery("sid", infoSourceIdList));
boolQuery.must(childQuery);
} else { } else {
return new Page<>(); return new Page<>();
} }
......
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
SELECT s.id,s.subject_name as name,m.type_id as pid,'0' as subjectCount,s.create_time,'true' as ynSubject SELECT s.id,s.subject_name as name,m.type_id as pid,'0' as subjectCount,s.create_time,'true' as ynSubject
FROM subject s FROM subject s
inner join `subject_type_map` m on s.id = m.subject_id inner join `subject_type_map` m on s.id = m.subject_id
order by s.create_time order by s.sort_order,s.create_time desc
</select> </select>
<select id="typeBindEventList" resultType="com.zzsn.event.vo.SubjectTypeTreeVO"> <select id="typeBindEventList" resultType="com.zzsn.event.vo.SubjectTypeTreeVO">
SELECT s.id,s.event_name as name,m.type_id as pid,'0' as subjectCount,s.create_time,'true' as ynSubject SELECT s.id,s.event_name as name,m.type_id as pid,'0' as subjectCount,s.create_time,'true' as ynSubject
FROM event s FROM event s
inner join `subject_type_map` m on s.id = m.subject_id inner join `subject_type_map` m on s.id = m.subject_id
order by s.create_time order by s.sort_order,s.create_time desc
</select> </select>
<select id="subjectsByFacePublic" resultType="com.zzsn.event.vo.SubjectTreeVO"> <select id="subjectsByFacePublic" resultType="com.zzsn.event.vo.SubjectTreeVO">
...@@ -204,4 +204,4 @@ ...@@ -204,4 +204,4 @@
) x ) x
order by x.create_time desc order by x.create_time desc
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -147,7 +147,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -147,7 +147,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
//查询绑定的流程 //查询绑定的流程
List<ClbModelArrange> clbModelArranges = clbModelArrangeService.listBySubjectIds(idList); List<ClbModelArrange> clbModelArranges = clbModelArrangeService.listBySubjectIds(idList);
if (CollectionUtil.isNotEmpty(clbModelArranges)){ if (CollectionUtil.isNotEmpty(clbModelArranges)) {
clbModelArranges.forEach(e -> e.setType(SourceTypeEnum.getValueNameByValue(e.getType()))); clbModelArranges.forEach(e -> e.setType(SourceTypeEnum.getValueNameByValue(e.getType())));
Map<String, List<ClbModelArrange>> collect = clbModelArranges.stream().collect(Collectors.groupingBy(ClbModelArrange::getSubjectId)); Map<String, List<ClbModelArrange>> collect = clbModelArranges.stream().collect(Collectors.groupingBy(ClbModelArrange::getSubjectId));
records.forEach(e -> { records.forEach(e -> {
...@@ -180,9 +180,9 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -180,9 +180,9 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
} }
@Override @Override
public Page<Node> visiblePageList(String username,Integer type, String subjectName, Integer pageNo, Integer pageSize) { public Page<Node> visiblePageList(String username, Integer type, String subjectName, Integer pageNo, Integer pageSize) {
Page<String> page = new Page<>(pageNo, pageSize); Page<String> page = new Page<>(pageNo, pageSize);
return baseMapper.visibleList(username,type, subjectName, page); return baseMapper.visibleList(username, type, subjectName, page);
} }
@Override @Override
...@@ -244,11 +244,11 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -244,11 +244,11 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
updateWrapper.set(Subject::getFirstOpenTime, new Date()); updateWrapper.set(Subject::getFirstOpenTime, new Date());
updateWrapper.set(Subject::getEstimateStatus, "预估中"); updateWrapper.set(Subject::getEstimateStatus, "预估中");
//第一次启用时,添加redis缓存,,用于向专题里进数据 //第一次启用时,添加redis缓存,,用于向专题里进数据
if(byId.getSubjectType() == 3){ if (byId.getSubjectType() == 3) {
//复合专题根据绑定的专题数据时间确定要入库的数据时间范围 //复合专题根据绑定的专题数据时间确定要入库的数据时间范围
List<String> ids = this.baseMapper.getBindSubjectIds(byId.getId()); List<String> ids = this.baseMapper.getBindSubjectIds(byId.getId());
informationService.supplyByCondition(subjectId, ids); informationService.supplyByCondition(subjectId, ids);
}else{ } else {
setRedisCache(subjectId); setRedisCache(subjectId);
} }
} }
...@@ -374,6 +374,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -374,6 +374,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
} }
@Override @Override
@Transactional
public void keyWordsBind(SubjectPage subjectPage) { public void keyWordsBind(SubjectPage subjectPage) {
List<String> idList = subjectPage.getKeyWordsIds(); List<String> idList = subjectPage.getKeyWordsIds();
List<SubjectKeywordsMap> mapList = new ArrayList<>(); List<SubjectKeywordsMap> mapList = new ArrayList<>();
...@@ -393,18 +394,21 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -393,18 +394,21 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
} }
@Override @Override
@Transactional
public void deleteBindKeyWords(SubjectPage subjectPage) { public void deleteBindKeyWords(SubjectPage subjectPage) {
List<String> deleteKeyWordsIds = subjectPage.getKeyWordsIds(); List<String> deleteKeyWordsIds = subjectPage.getKeyWordsIds();
if (deleteKeyWordsIds != null && !deleteKeyWordsIds.isEmpty()) { if (CollectionUtils.isNotEmpty(deleteKeyWordsIds)) {
String subjectId = subjectPage.getId();
subjectKeywordsMapService.remove(Wrappers.<SubjectKeywordsMap>lambdaQuery() subjectKeywordsMapService.remove(Wrappers.<SubjectKeywordsMap>lambdaQuery()
.eq(SubjectKeywordsMap::getSubjectId, subjectPage.getId()).in(SubjectKeywordsMap::getKeywordsId, deleteKeyWordsIds) .eq(SubjectKeywordsMap::getSubjectId, subjectId)
.eq(StrUtil.isNotBlank(subjectPage.getBindingType()), SubjectKeywordsMap::getBindingType, subjectPage.getBindingType()) .in(SubjectKeywordsMap::getKeywordsId, deleteKeyWordsIds)
.eq(SubjectKeywordsMap::getBindingType, subjectPage.getBindingType())
); );
//清除redis里面的绑定关系(包括专题信息,以及搜索引擎) //清除redis里面的绑定关系(包括专题信息,以及搜索引擎)
for (String keyWordsId : deleteKeyWordsIds) { /*for (String keyWordsId : deleteKeyWordsIds) {
KeyWordsPage keyWordsPage = keyWordsService.getKeyWordsById(keyWordsId); KeyWordsPage keyWordsPage = keyWordsService.getKeyWordsById(keyWordsId);
redisUtil.del(Constants.KEY_WORDS_TO_REDIS_PREFIX + keyWordsPage.getWordsCode()); redisUtil.del(Constants.KEY_WORDS_TO_REDIS_PREFIX + keyWordsPage.getWordsCode());
} }*/
} }
//同步配置到采集 //同步配置到采集
configurationMessageService.bindKeyWordsSend(subjectPage.getId()); configurationMessageService.bindKeyWordsSend(subjectPage.getId());
...@@ -736,7 +740,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -736,7 +740,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
@Override @Override
public List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(List<String> ids, String bindingType) { public List<KeyWordsPage> bindKeyWordsListByIdsAndBindType(List<String> ids, String bindingType) {
return iKeyWordsService.bindKeyWordsListByIdsAndBindType(ids,bindingType); return iKeyWordsService.bindKeyWordsListByIdsAndBindType(ids, bindingType);
} }
...@@ -748,28 +752,28 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -748,28 +752,28 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
if (org.springframework.util.StringUtils.isEmpty(subjectId)) { if (org.springframework.util.StringUtils.isEmpty(subjectId)) {
return Result.FAIL("专题id不能为空"); return Result.FAIL("专题id不能为空");
} }
if (StrUtil.isBlank(subjectPage.getSourceBindType())){ if (StrUtil.isBlank(subjectPage.getSourceBindType())) {
return Result.FAIL("解绑类型不能为空"); return Result.FAIL("解绑类型不能为空");
} }
if (StrUtil.isBlank(subjectPage.getSourceType())){ if (StrUtil.isBlank(subjectPage.getSourceType())) {
return Result.FAIL("信息源类型不能为空"); return Result.FAIL("信息源类型不能为空");
} }
if(CollectionUtil.isEmpty(bindIds) && ("1".equals(subjectPage.getSourceType()) || "2".equals(subjectPage.getSourceType()))){ if (CollectionUtil.isEmpty(bindIds) && ("1".equals(subjectPage.getSourceType()) || "2".equals(subjectPage.getSourceType()))) {
return Result.FAIL("解绑绑定id不能为空"); return Result.FAIL("解绑绑定id不能为空");
} }
if(CollectionUtil.isEmpty(subjectPage.getBindLabels()) && "3".equals(subjectPage.getSourceType() )){ if (CollectionUtil.isEmpty(subjectPage.getBindLabels()) && "3".equals(subjectPage.getSourceType())) {
return Result.FAIL("解绑标签不能为空"); return Result.FAIL("解绑标签不能为空");
} }
//绑定信息源组 //绑定信息源组
if (StrUtil.equals(subjectPage.getSourceType(),"1")) { if (StrUtil.equals(subjectPage.getSourceType(), "1")) {
bindInfoSourceGroup(subjectPage); bindInfoSourceGroup(subjectPage);
} }
//绑定信息源 //绑定信息源
if (StrUtil.equals(subjectPage.getSourceType(),"2")) { if (StrUtil.equals(subjectPage.getSourceType(), "2")) {
bindInfoSource(subjectPage); bindInfoSource(subjectPage);
} }
//绑定标签 //绑定标签
if (StrUtil.equals(subjectPage.getSourceType(),"3")) { if (StrUtil.equals(subjectPage.getSourceType(), "3")) {
bindLabels(subjectPage); bindLabels(subjectPage);
} }
configurationMessageService.bindInfoSourceSend(subjectId); configurationMessageService.bindInfoSourceSend(subjectId);
...@@ -783,64 +787,67 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -783,64 +787,67 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
public void deleteBindNew(SubjectPage subjectPage) { public void deleteBindNew(SubjectPage subjectPage) {
//解绑信息源组 //解绑信息源组
if (StrUtil.equals(subjectPage.getSourceType(),"1")) { if (StrUtil.equals(subjectPage.getSourceType(), "1")) {
unBindInfoSourceGroup(subjectPage); unBindInfoSourceGroup(subjectPage);
} }
//解绑信息源 //解绑信息源
if (StrUtil.equals(subjectPage.getSourceType(),"2")) { if (StrUtil.equals(subjectPage.getSourceType(), "2")) {
unBindInfoSource(subjectPage); unBindInfoSource(subjectPage);
} }
//解绑标签 //解绑标签
if (StrUtil.equals(subjectPage.getSourceType(),"3")) { if (StrUtil.equals(subjectPage.getSourceType(), "3")) {
unBindLabels(subjectPage); unBindLabels(subjectPage);
} }
configurationMessageService.bindInfoSourceSend(subjectPage.getId()); configurationMessageService.bindInfoSourceSend(subjectPage.getId());
} }
private void unBindInfoSourceGroup(SubjectPage subjectPage) { private void unBindInfoSourceGroup(SubjectPage subjectPage) {
String sourceBindType = subjectPage.getSourceBindType(); String sourceBindType = subjectPage.getSourceBindType();
List<String> idList = subjectPage.getBindIds(); List<String> idList = subjectPage.getBindIds();
if(CollectionUtil.isEmpty(idList)){ if (CollectionUtil.isEmpty(idList)) {
return ; return;
} }
if (StrUtil.equals(sourceBindType,"1")) { if (StrUtil.equals(sourceBindType, "1")) {
//解绑通用信息源组 //解绑通用信息源组
unbindInfoSource(subjectPage, idList, BindTypeEnum.INFO_SOURCE_GROUP.getvalue()); unbindInfoSource(subjectPage, idList, BindTypeEnum.INFO_SOURCE_GROUP.getvalue());
} }
if (StrUtil.equals(sourceBindType,"2")) { if (StrUtil.equals(sourceBindType, "2")) {
//解绑定向信息源组 //解绑定向信息源组
unbindInfoSource(subjectPage, idList, BindTypeEnum.DIRECTIONA_INFO_SOURCE_GROUP.getvalue()); unbindInfoSource(subjectPage, idList, BindTypeEnum.DIRECTIONA_INFO_SOURCE_GROUP.getvalue());
} }
if (StrUtil.equals(sourceBindType,"3")) { if (StrUtil.equals(sourceBindType, "3")) {
//解绑屏蔽信息源组 //解绑屏蔽信息源组
unbindInfoSource(subjectPage, idList, BindTypeEnum.EXCLUDE_INFO_SOURCE_GROUP.getvalue()); unbindInfoSource(subjectPage, idList, BindTypeEnum.EXCLUDE_INFO_SOURCE_GROUP.getvalue());
} }
} }
private void unBindLabels(SubjectPage subjectPage) { private void unBindLabels(SubjectPage subjectPage) {
String sourceBindType = subjectPage.getSourceBindType(); String sourceBindType = subjectPage.getSourceBindType();
List<BindLabelVo> bindLabels = subjectPage.getBindLabels(); List<BindLabelVo> bindLabels = subjectPage.getBindLabels();
if(CollectionUtil.isEmpty(bindLabels)){ if (CollectionUtil.isEmpty(bindLabels)) {
return ; return;
} }
if (StrUtil.equals(sourceBindType,"1")) { if (StrUtil.equals(sourceBindType, "1")) {
//解绑通用标签 //解绑通用标签
unBindLabel(subjectPage, BindTypeEnum.INFO_SOURCE_LABEL.getvalue()); unBindLabel(subjectPage, BindTypeEnum.INFO_SOURCE_LABEL.getvalue());
} }
if (StrUtil.equals(sourceBindType,"2")) { if (StrUtil.equals(sourceBindType, "2")) {
//解绑定向标签 //解绑定向标签
unBindLabel(subjectPage, BindTypeEnum.DIRECTIONA_INFO_SOURCE_LABEL.getvalue()); unBindLabel(subjectPage, BindTypeEnum.DIRECTIONA_INFO_SOURCE_LABEL.getvalue());
} }
if (StrUtil.equals(sourceBindType,"3")) { if (StrUtil.equals(sourceBindType, "3")) {
//解绑屏蔽标签 //解绑屏蔽标签
unBindLabel(subjectPage, BindTypeEnum.EXCLUDE_INFO_SOURCE_LABEL.getvalue()); unBindLabel(subjectPage, BindTypeEnum.EXCLUDE_INFO_SOURCE_LABEL.getvalue());
} }
} }
private void unBindLabel(SubjectPage subjectPage, Integer type) { private void unBindLabel(SubjectPage subjectPage, Integer type) {
List<BindLabelVo> bindLabels = subjectPage.getBindLabels(); List<BindLabelVo> bindLabels = subjectPage.getBindLabels();
if(CollectionUtil.isEmpty(bindLabels)){ if (CollectionUtil.isEmpty(bindLabels)) {
return ; return;
} }
Set<String> labelCode = new HashSet<>(); Set<String> labelCode = new HashSet<>();
Set<String> labelItemCode = new HashSet<>(); Set<String> labelItemCode = new HashSet<>();
...@@ -851,30 +858,32 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -851,30 +858,32 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
} }
iSubjectInfoSourceMapService.remove(Wrappers.<SubjectInfoSourceMap>lambdaQuery() iSubjectInfoSourceMapService.remove(Wrappers.<SubjectInfoSourceMap>lambdaQuery()
.in(SubjectInfoSourceMap::getSourceId,labelCode) .in(SubjectInfoSourceMap::getSourceId, labelCode)
.in(SubjectInfoSourceMap::getSourceItemId,labelItemCode) .in(SubjectInfoSourceMap::getSourceItemId, labelItemCode)
.eq(SubjectInfoSourceMap::getSubjectId,subjectPage.getId()) .eq(SubjectInfoSourceMap::getSubjectId, subjectPage.getId())
.eq(SubjectInfoSourceMap::getType,type)); .eq(SubjectInfoSourceMap::getType, type));
} }
private void unBindInfoSource(SubjectPage subjectPage) { private void unBindInfoSource(SubjectPage subjectPage) {
String sourceBindType = subjectPage.getSourceBindType(); String sourceBindType = subjectPage.getSourceBindType();
List<String> idList = subjectPage.getBindIds(); List<String> idList = subjectPage.getBindIds();
if(CollectionUtil.isEmpty(idList)){ if (CollectionUtil.isEmpty(idList)) {
return ; return;
} }
if (StrUtil.equals(sourceBindType,"1")) { if (StrUtil.equals(sourceBindType, "1")) {
//解绑通用信息源 //解绑通用信息源
unbindInfoSource(subjectPage, idList, BindTypeEnum.INFO_SOURCE.getvalue()); unbindInfoSource(subjectPage, idList, BindTypeEnum.INFO_SOURCE.getvalue());
} }
if (StrUtil.equals(sourceBindType,"2")) { if (StrUtil.equals(sourceBindType, "2")) {
//解绑定向信息源 //解绑定向信息源
unbindInfoSource(subjectPage, idList, BindTypeEnum.DIRECTIONA_INFO_SOURCE.getvalue()); unbindInfoSource(subjectPage, idList, BindTypeEnum.DIRECTIONA_INFO_SOURCE.getvalue());
} }
if (StrUtil.equals(sourceBindType,"3")) { if (StrUtil.equals(sourceBindType, "3")) {
//解绑屏蔽信息源 //解绑屏蔽信息源
unbindInfoSource(subjectPage, idList, BindTypeEnum.EXCLUDE_INFO_SOURCE.getvalue()); unbindInfoSource(subjectPage, idList, BindTypeEnum.EXCLUDE_INFO_SOURCE.getvalue());
} }
} }
private void unbindInfoSource(SubjectPage subjectPage, List<String> idList, Integer bindType) { private void unbindInfoSource(SubjectPage subjectPage, List<String> idList, Integer bindType) {
iSubjectInfoSourceMapService.deleteInfoSourceIds(subjectPage.getId(), idList, bindType); iSubjectInfoSourceMapService.deleteInfoSourceIds(subjectPage.getId(), idList, bindType);
...@@ -900,7 +909,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -900,7 +909,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
scoreModel.setData(jsonArray.toJSONString()); scoreModel.setData(jsonArray.toJSONString());
scoreModel.setChangeType(0); scoreModel.setChangeType(0);
//去除完之后,更新进去 //去除完之后,更新进去
scoreModelService.addOrUpdate(scoreModel,subjectPage.getCategory()); scoreModelService.addOrUpdate(scoreModel, subjectPage.getCategory());
} }
} }
} }
...@@ -910,23 +919,24 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -910,23 +919,24 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
private void bindInfoSourceGroup(SubjectPage subjectPage) { private void bindInfoSourceGroup(SubjectPage subjectPage) {
String sourceBindType = subjectPage.getSourceBindType(); String sourceBindType = subjectPage.getSourceBindType();
List<String> idList = subjectPage.getBindIds(); List<String> idList = subjectPage.getBindIds();
if(CollectionUtil.isEmpty(idList)){ if (CollectionUtil.isEmpty(idList)) {
return ; return;
} }
if (StrUtil.equals(sourceBindType,"1")) { if (StrUtil.equals(sourceBindType, "1")) {
//绑定通用信息源组 //绑定通用信息源组
bindInfoSource(subjectPage, idList, BindTypeEnum.INFO_SOURCE_GROUP.getvalue()); bindInfoSource(subjectPage, idList, BindTypeEnum.INFO_SOURCE_GROUP.getvalue());
} }
if (StrUtil.equals(sourceBindType,"2")) { if (StrUtil.equals(sourceBindType, "2")) {
//绑定定向信息源组 //绑定定向信息源组
bindInfoSource(subjectPage, idList, BindTypeEnum.DIRECTIONA_INFO_SOURCE_GROUP.getvalue()); bindInfoSource(subjectPage, idList, BindTypeEnum.DIRECTIONA_INFO_SOURCE_GROUP.getvalue());
} }
if (StrUtil.equals(sourceBindType,"3")) { if (StrUtil.equals(sourceBindType, "3")) {
//绑定屏蔽信息源组 //绑定屏蔽信息源组
bindInfoSource(subjectPage, idList, BindTypeEnum.EXCLUDE_INFO_SOURCE_GROUP.getvalue()); bindInfoSource(subjectPage, idList, BindTypeEnum.EXCLUDE_INFO_SOURCE_GROUP.getvalue());
} }
} }
private void bindInfoSource(SubjectPage subjectPage, List<String> idList, Integer type) { private void bindInfoSource(SubjectPage subjectPage, List<String> idList, Integer type) {
List<SubjectInfoSourceMap> mapList = new ArrayList<>(); List<SubjectInfoSourceMap> mapList = new ArrayList<>();
for (String infoSourceId : idList) { for (String infoSourceId : idList) {
...@@ -980,7 +990,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -980,7 +990,7 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
scoreModelVo.setData(jsonArray.toJSONString()); scoreModelVo.setData(jsonArray.toJSONString());
scoreModelVo.setChangeType(0); scoreModelVo.setChangeType(0);
//增加完之后,更新进去 //增加完之后,更新进去
scoreModelService.addOrUpdate(scoreModelVo,subjectPage.getCategory()); scoreModelService.addOrUpdate(scoreModelVo, subjectPage.getCategory());
} }
} }
iSubjectInfoSourceMapService.saveBatch(mapList); iSubjectInfoSourceMapService.saveBatch(mapList);
...@@ -989,44 +999,46 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -989,44 +999,46 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
private void bindInfoSource(SubjectPage subjectPage) { private void bindInfoSource(SubjectPage subjectPage) {
String sourceBindType = subjectPage.getSourceBindType(); String sourceBindType = subjectPage.getSourceBindType();
List<String> idList = subjectPage.getBindIds(); List<String> idList = subjectPage.getBindIds();
if(CollectionUtil.isEmpty(idList)){ if (CollectionUtil.isEmpty(idList)) {
return ; return;
} }
if (StrUtil.equals(sourceBindType,"1")) { if (StrUtil.equals(sourceBindType, "1")) {
//绑定通用信息源 //绑定通用信息源
bindInfoSource(subjectPage, idList, BindTypeEnum.INFO_SOURCE.getvalue()); bindInfoSource(subjectPage, idList, BindTypeEnum.INFO_SOURCE.getvalue());
} }
if (StrUtil.equals(sourceBindType,"2")) { if (StrUtil.equals(sourceBindType, "2")) {
//绑定定向信息源 //绑定定向信息源
bindInfoSource(subjectPage, idList, BindTypeEnum.DIRECTIONA_INFO_SOURCE.getvalue()); bindInfoSource(subjectPage, idList, BindTypeEnum.DIRECTIONA_INFO_SOURCE.getvalue());
} }
if (StrUtil.equals(sourceBindType,"3")) { if (StrUtil.equals(sourceBindType, "3")) {
//绑定屏蔽信息源 //绑定屏蔽信息源
bindInfoSource(subjectPage, idList, BindTypeEnum.EXCLUDE_INFO_SOURCE.getvalue()); bindInfoSource(subjectPage, idList, BindTypeEnum.EXCLUDE_INFO_SOURCE.getvalue());
} }
} }
private void bindLabels(SubjectPage subjectPage) { private void bindLabels(SubjectPage subjectPage) {
String subjectId = subjectPage.getId(); String subjectId = subjectPage.getId();
String sourceBindType = subjectPage.getSourceBindType(); String sourceBindType = subjectPage.getSourceBindType();
List<BindLabelVo> bindLabels = subjectPage.getBindLabels(); List<BindLabelVo> bindLabels = subjectPage.getBindLabels();
if(CollectionUtil.isEmpty(bindLabels)){ if (CollectionUtil.isEmpty(bindLabels)) {
return ; return;
} }
if (StrUtil.equals(sourceBindType,"1")) { if (StrUtil.equals(sourceBindType, "1")) {
//绑定通用标签信息源 //绑定通用标签信息源
bindLabels(subjectId, bindLabels, BindTypeEnum.INFO_SOURCE_LABEL.getvalue()); bindLabels(subjectId, bindLabels, BindTypeEnum.INFO_SOURCE_LABEL.getvalue());
} }
if (StrUtil.equals(sourceBindType,"2")) { if (StrUtil.equals(sourceBindType, "2")) {
//绑定定向标签信息源 //绑定定向标签信息源
bindLabels(subjectId, bindLabels, BindTypeEnum.DIRECTIONA_INFO_SOURCE_LABEL.getvalue()); bindLabels(subjectId, bindLabels, BindTypeEnum.DIRECTIONA_INFO_SOURCE_LABEL.getvalue());
} }
if (StrUtil.equals(sourceBindType,"3")) { if (StrUtil.equals(sourceBindType, "3")) {
//绑定屏蔽标签信息源 //绑定屏蔽标签信息源
bindLabels(subjectId, bindLabels, BindTypeEnum.EXCLUDE_INFO_SOURCE_LABEL.getvalue()); bindLabels(subjectId, bindLabels, BindTypeEnum.EXCLUDE_INFO_SOURCE_LABEL.getvalue());
} }
} }
private void bindLabels(String subjectId, List<BindLabelVo> bindLabels, Integer bindType) { private void bindLabels(String subjectId, List<BindLabelVo> bindLabels, Integer bindType) {
List<SubjectInfoSourceMap> mapList = new ArrayList<>(); List<SubjectInfoSourceMap> mapList = new ArrayList<>();
......
...@@ -53,7 +53,7 @@ public class InfoDataSearchCondition { ...@@ -53,7 +53,7 @@ public class InfoDataSearchCondition {
//审核操作(0:未审核 1:审核通过 2:审核未通过 3:暂定 默认值为0) //审核操作(0:未审核 1:审核通过 2:审核未通过 3:暂定 默认值为0)
private Integer checkStatus; private Integer checkStatus;
//删除标记(1:删除;0:保留) //删除标记(1:删除;0:未删除)
private Integer deleteFlag = 0; private Integer deleteFlag = 0;
//关联标签名称 //关联标签名称
......
...@@ -169,3 +169,16 @@ clb: ...@@ -169,3 +169,16 @@ clb:
default: default:
processing: processing:
advanceMonth: 6 advanceMonth: 6
caiji:
infosourcebind:
url: http://1.95.133.166:8823/baseSourceInfo/api/subject/infoSourceEdit
keyWordsbind:
url: http://1.95.133.166:8823/baseSourceInfo/api/subject/keywordEdit
keyWordsEdit:
url: http://1.95.133.166:8823/baseSourceInfo/api/keyword/edit
allInfosourcebind:
url: http://1.95.133.166:8823/baseSourceInfo/api/subject/infoSourceSave
allKeyWordsBind:
url: http://1.95.133.166:8823/baseSourceInfo/api/subject/keywordSave
projectCode: zzsn_prod
projectName: 克虏宝正式
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论