提交 4a1f6bb3 作者: 925993793@qq.com

调试修改

上级 107e2609
...@@ -102,4 +102,7 @@ public class Constants { ...@@ -102,4 +102,7 @@ public class Constants {
} }
public static final String HISTORY_DATE_QUEUE = "HISTORY_DATE_QUEUE:"; public static final String HISTORY_DATE_QUEUE = "HISTORY_DATE_QUEUE:";
//obs 文件浏览地址 前部分
public static final String OBS_FILE_PATH_URL_PREFIX = "http://obs.ciglobal.cn/";
} }
...@@ -146,6 +146,10 @@ public class FileController { ...@@ -146,6 +146,10 @@ public class FileController {
@PostMapping("/importInfo") @PostMapping("/importInfo")
public Result<?> importInfo(HttpServletRequest request) { public Result<?> importInfo(HttpServletRequest request) {
UserVo userVo = UserUtil.getLoginUser(); UserVo userVo = UserUtil.getLoginUser();
String subjectId = request.getParameter("subjectId");
if (StringUtils.isBlank(subjectId)) {
return Result.FAIL(500, "专题id不能为空");
}
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap(); Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
if (fileMap.size() < 1) { if (fileMap.size() < 1) {
...@@ -158,7 +162,6 @@ public class FileController { ...@@ -158,7 +162,6 @@ public class FileController {
CompletableFuture.runAsync(()->{ CompletableFuture.runAsync(()->{
//开启日志 //开启日志
ClbFileOperationLog clbFileOperationLog = clbFileOperationLogService.operationStart(multipartFile.getOriginalFilename(), userVo); ClbFileOperationLog clbFileOperationLog = clbFileOperationLogService.operationStart(multipartFile.getOriginalFilename(), userVo);
String subjectId = request.getParameter("subjectId");
String isTopping = request.getParameter("isTopping"); String isTopping = request.getParameter("isTopping");
String isExamine = request.getParameter("isExamine"); String isExamine = request.getParameter("isExamine");
try { try {
...@@ -302,7 +305,6 @@ public class FileController { ...@@ -302,7 +305,6 @@ public class FileController {
String fileSuffix = multipartFile.getOriginalFilename().substring(index + 1); String fileSuffix = multipartFile.getOriginalFilename().substring(index + 1);
if ("xls".equals(fileSuffix) || "xlsx".equals(fileSuffix)) { if ("xls".equals(fileSuffix) || "xlsx".equals(fileSuffix)) {
CompletableFuture.runAsync(() -> { CompletableFuture.runAsync(() -> {
try { try {
byte[] fileData = multipartFile.getBytes(); byte[] fileData = multipartFile.getBytes();
//读取文件内容 //读取文件内容
......
...@@ -14,6 +14,8 @@ import com.zzsn.event.es.EsService; ...@@ -14,6 +14,8 @@ import com.zzsn.event.es.EsService;
import com.zzsn.event.feign.api.RemoteModelService; import com.zzsn.event.feign.api.RemoteModelService;
import com.zzsn.event.service.*; import com.zzsn.event.service.*;
import com.zzsn.event.util.*; import com.zzsn.event.util.*;
import com.zzsn.event.util.user.UserUtil;
import com.zzsn.event.util.user.UserVo;
import com.zzsn.event.vo.*; import com.zzsn.event.vo.*;
import com.zzsn.event.vo.es.SpecialInformation; import com.zzsn.event.vo.es.SpecialInformation;
import com.zzsn.event.xxljob.entity.XxlJobInfo; import com.zzsn.event.xxljob.entity.XxlJobInfo;
...@@ -91,7 +93,7 @@ public class SubjectManageController { ...@@ -91,7 +93,7 @@ public class SubjectManageController {
private KafkaTemplate<String, String> kafkaTemplate; private KafkaTemplate<String, String> kafkaTemplate;
@Autowired @Autowired
private PythonUtil pythonUtil; private PythonUtil pythonUtil;
@Autowired @Autowired(required = false)
private RemoteModelService remoteModelService; private RemoteModelService remoteModelService;
...@@ -141,6 +143,22 @@ public class SubjectManageController { ...@@ -141,6 +143,22 @@ public class SubjectManageController {
} }
/** /**
* 当前用户可见的专题列表-研究中心
*
* @param subjectName 专题名称
* @author lkg
* @date 2025/2/8
*/
@GetMapping("/visiblePageList")
public Result<?> visiblePageList(@RequestParam(required = false) String subjectName,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize){
UserVo loginUser = UserUtil.getLoginUser();
Page<String> pageList = subjectService.visiblePageList(loginUser.getUsername(),subjectName, pageNo, pageSize);
return Result.OK(pageList);
}
/**
* 分页列表查询 * 分页列表查询
* *
* @param subjectCondition 搜索条件 * @param subjectCondition 搜索条件
......
...@@ -1732,22 +1732,31 @@ public class EsService { ...@@ -1732,22 +1732,31 @@ public class EsService {
} }
} }
Integer checkStatus = searchCondition.getCheckStatus(); Integer checkStatus = searchCondition.getCheckStatus();
Integer deleteFlag = searchCondition.getDeleteFlag();
if (checkStatus != null) { if (checkStatus != null) {
boolQuery.must(QueryBuilders.termQuery("checkStatus", checkStatus)); boolQuery.must(QueryBuilders.termQuery("checkStatus", checkStatus));
}
if (StringUtils.isNotBlank(searchCondition.getVideo())) {
boolQuery.must(QueryBuilders.matchQuery("type", "video"));
} else { } else {
boolQuery.mustNot(QueryBuilders.matchQuery("type", "video")); if (deleteFlag == null) {
deleteFlag = 0;
}
} }
//删除状态查询 //删除状态查询
if (searchCondition.getDeleteFlag() != null) { if (deleteFlag != null) {
if (searchCondition.getDeleteFlag() != 0) { if (deleteFlag != 0) {
boolQuery.must(QueryBuilders.termQuery("deleteFlag", "1")); boolQuery.must(QueryBuilders.termQuery("deleteFlag", "1"));
} else { } else {
boolQuery.mustNot(QueryBuilders.termQuery("deleteFlag", "1")); boolQuery.mustNot(QueryBuilders.termQuery("deleteFlag", "1"));
} }
} }
//免审核状态
if (searchCondition.getIsFreeCheck() != null) {
boolQuery.must(QueryBuilders.termQuery("isFreeCheck", 1));
}
if (StringUtils.isNotBlank(searchCondition.getVideo())) {
boolQuery.must(QueryBuilders.matchQuery("type", "video"));
} else {
boolQuery.mustNot(QueryBuilders.matchQuery("type", "video"));
}
//专题库类别筛选 //专题库类别筛选
if (CollectionUtils.isNotEmpty(searchCondition.getClassificationType())) { if (CollectionUtils.isNotEmpty(searchCondition.getClassificationType())) {
boolQuery.must(QueryBuilders.termsQuery("classificationType", searchCondition.getClassificationType())); boolQuery.must(QueryBuilders.termsQuery("classificationType", searchCondition.getClassificationType()));
......
...@@ -37,6 +37,7 @@ public interface SubjectMapper extends BaseMapper<Subject> { ...@@ -37,6 +37,7 @@ public interface SubjectMapper extends BaseMapper<Subject> {
* @date 2024/12/18 * @date 2024/12/18
*/ */
Page<SubjectPage> researchCenterPageList(@Param("subjectCondition") SubjectCondition subjectCondition, Page<SubjectPage> page); Page<SubjectPage> researchCenterPageList(@Param("subjectCondition") SubjectCondition subjectCondition, Page<SubjectPage> page);
/** /**
* 专题分页列表(公开)-研究中心 * 专题分页列表(公开)-研究中心
* *
...@@ -48,6 +49,16 @@ public interface SubjectMapper extends BaseMapper<Subject> { ...@@ -48,6 +49,16 @@ public interface SubjectMapper extends BaseMapper<Subject> {
Page<SubjectPage> researchCenterFacePageList(@Param("subjectCondition") SubjectCondition subjectCondition, Page<SubjectPage> page); Page<SubjectPage> researchCenterFacePageList(@Param("subjectCondition") SubjectCondition subjectCondition, Page<SubjectPage> page);
/** /**
* 当前用户可见的专题分页列表(公开和个人非公开)-研究中心
*
* @param username 用户名称
* @param page 分页参数
* @author lkg
* @date 2025/2/8
*/
Page<String> visibleList(String username,String subjectName, Page<String> page);
/**
* 获取专题详情(包含样例文章信息) * 获取专题详情(包含样例文章信息)
* *
* @param subjectId 专题id * @param subjectId 专题id
...@@ -55,6 +66,7 @@ public interface SubjectMapper extends BaseMapper<Subject> { ...@@ -55,6 +66,7 @@ public interface SubjectMapper extends BaseMapper<Subject> {
* @date 2025/1/8 * @date 2025/1/8
*/ */
SubjectDetailVO queryInfo(@Param("subjectId") String subjectId); SubjectDetailVO queryInfo(@Param("subjectId") String subjectId);
/** /**
* 专题详情 * 专题详情
* *
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
from subject d from subject d
LEFT JOIN subject_type_map b ON b.subject_id = d.id LEFT JOIN subject_type_map b ON b.subject_id = d.id
LEFT JOIN subject_type c ON b.type_id = c.id LEFT JOIN subject_type c ON b.type_id = c.id
where face_public = 1 where d.face_public = 1
<if test="subjectCondition.id !=null and subjectCondition.id !=''"> <if test="subjectCondition.id !=null and subjectCondition.id !=''">
and d.id =#{subjectCondition.id} and d.id =#{subjectCondition.id}
</if> </if>
...@@ -149,6 +149,13 @@ ...@@ -149,6 +149,13 @@
order by d.create_time desc order by d.create_time desc
</select> </select>
<select id="visibleList" resultType="String">
select subject_name from subject d where (d.face_public = 1 or d.create_by = #{username})
<if test="subjectName != null and subjectName != ''">
and d.subject_name like concat('%',#{subjectName},'%')
</if>
</select>
<resultMap id="SubjectDetailVOMap" type="com.zzsn.event.vo.SubjectDetailVO"> <resultMap id="SubjectDetailVOMap" type="com.zzsn.event.vo.SubjectDetailVO">
<result column="subject_name" property="subjectName"/> <result column="subject_name" property="subjectName"/>
<result column="subjectTypeId" property="subjectTypeId"/> <result column="subjectTypeId" property="subjectTypeId"/>
......
...@@ -39,6 +39,17 @@ public interface SubjectService extends IService<Subject> { ...@@ -39,6 +39,17 @@ public interface SubjectService extends IService<Subject> {
Page<SubjectPage> researchCenterPageList(SubjectCondition subjectCondition, Integer pageNo, Integer pageSize); Page<SubjectPage> researchCenterPageList(SubjectCondition subjectCondition, Integer pageNo, Integer pageSize);
/** /**
* 当前用户可见的专题分页列表(公开和个人非公开)-研究中心
*
* @param username 用户名称
* @param pageNo 当前页
* @param pageSize 每页返回条数
* @author lkg
* @date 2025/2/8
*/
Page<String> visiblePageList(String username,String subjectName, Integer pageNo, Integer pageSize);
/**
* 获取专题详情(包含样例文章信息) * 获取专题详情(包含样例文章信息)
* *
* @param subjectId 专题id * @param subjectId 专题id
......
...@@ -2,6 +2,7 @@ package com.zzsn.event.service.impl; ...@@ -2,6 +2,7 @@ package com.zzsn.event.service.impl;
import cn.hutool.core.io.FileUtil; import cn.hutool.core.io.FileUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzsn.event.constant.Constants;
import com.zzsn.event.entity.ClbSysAttachment; import com.zzsn.event.entity.ClbSysAttachment;
import com.zzsn.event.mapper.ClbSysAttachmentMapper; import com.zzsn.event.mapper.ClbSysAttachmentMapper;
import com.zzsn.event.service.IClbSysAttachmentService; import com.zzsn.event.service.IClbSysAttachmentService;
...@@ -50,7 +51,7 @@ public class ClbSysAttachmentServiceImpl extends ServiceImpl<ClbSysAttachmentMap ...@@ -50,7 +51,7 @@ public class ClbSysAttachmentServiceImpl extends ServiceImpl<ClbSysAttachmentMap
this.save(clbSysAttachment); this.save(clbSysAttachment);
AttachmentInfo attachmentInfo = new AttachmentInfo(); AttachmentInfo attachmentInfo = new AttachmentInfo();
attachmentInfo.setAttachmentName(file.getOriginalFilename()); attachmentInfo.setAttachmentName(file.getOriginalFilename());
attachmentInfo.setAttachmentFullPath("http://obs.ciglobal.cn/" + url); attachmentInfo.setAttachmentFullPath(Constants.OBS_FILE_PATH_URL_PREFIX + url);
attachmentInfo.setCategory(fileSuffix); attachmentInfo.setCategory(fileSuffix);
attachmentInfo.setFileSize(FileUtil.readableFileSize(file.getSize())); attachmentInfo.setFileSize(FileUtil.readableFileSize(file.getSize()));
attachmentInfo.setAttachmentId(clbSysAttachment.getId().toString()); attachmentInfo.setAttachmentId(clbSysAttachment.getId().toString());
......
...@@ -87,6 +87,8 @@ public class InformationServiceImpl implements InformationService { ...@@ -87,6 +87,8 @@ public class InformationServiceImpl implements InformationService {
private ICollectionMapService collectionMapService; private ICollectionMapService collectionMapService;
@Autowired @Autowired
private SysDictItemService sysDictItemService; private SysDictItemService sysDictItemService;
@Autowired
private IClbSysAttachmentService csAttachmentService;
@Override @Override
...@@ -158,6 +160,7 @@ public class InformationServiceImpl implements InformationService { ...@@ -158,6 +160,7 @@ public class InformationServiceImpl implements InformationService {
@Override @Override
public DisplayInfo queryInfo(Integer type,String index, String id) { public DisplayInfo queryInfo(Integer type,String index, String id) {
DisplayInfo info = (DisplayInfo) esOpUtil.getInfoById(index, id, DisplayInfo.class); DisplayInfo info = (DisplayInfo) esOpUtil.getInfoById(index, id, DisplayInfo.class);
info.setDbIndex(index);
if (StringUtils.isNotEmpty(info.getContentWithTag())) { if (StringUtils.isNotEmpty(info.getContentWithTag())) {
String contentNoTag = Utility.TransferHTML2TextWithImg(info.getContentWithTag()); String contentNoTag = Utility.TransferHTML2TextWithImg(info.getContentWithTag());
String contentNoTag2 = Utility.dealImg(contentNoTag); String contentNoTag2 = Utility.dealImg(contentNoTag);
...@@ -165,6 +168,30 @@ public class InformationServiceImpl implements InformationService { ...@@ -165,6 +168,30 @@ public class InformationServiceImpl implements InformationService {
} }
info.setPublishDate(EsDateUtil.esFieldDateMapping(info.getPublishDate())); info.setPublishDate(EsDateUtil.esFieldDateMapping(info.getPublishDate()));
if (type == 2) { if (type == 2) {
//获取附件信息
if (info.getAttachmentIds() != null && info.getAttachmentIds().size() > 0) {
List<AttachmentInfo> attachmentInfoList = new ArrayList<>();
for (String attachmentId : info.getAttachmentIds()) {
QueryWrapper<ClbSysAttachment> queryWrapper = Wrappers.query();
queryWrapper.eq("id", attachmentId);
ClbSysAttachment clbSysAttachment = clbSysAttachmentService.getOne(queryWrapper);
if (clbSysAttachment != null) {
AttachmentInfo attachmentInfo = new AttachmentInfo();
attachmentInfo.setAttachmentName(clbSysAttachment.getName());
attachmentInfo.setAttachmentPath(clbSysAttachment.getPath());
attachmentInfo.setGroup(clbSysAttachment.getGroupName());
attachmentInfo.setAttachmentId(String.valueOf(clbSysAttachment.getId()));
attachmentInfo.setAttachmentFullPath(Constants.OBS_FILE_PATH_URL_PREFIX + clbSysAttachment.getObjectKey());
attachmentInfo.setPageSize(clbSysAttachment.getPageSize());
attachmentInfo.setSource(clbSysAttachment.getSource());
attachmentInfo.setFileSize(clbSysAttachment.getFileSize());
attachmentInfoList.add(attachmentInfo);
}
}
info.setAttachmentInfos(attachmentInfoList);
info.setYnArticle(false);
}
CompletableFuture.runAsync(()-> addReadNum(info, index)); CompletableFuture.runAsync(()-> addReadNum(info, index));
} }
return info; return info;
...@@ -303,6 +330,7 @@ public class InformationServiceImpl implements InformationService { ...@@ -303,6 +330,7 @@ public class InformationServiceImpl implements InformationService {
specialInformation.setId(id); specialInformation.setId(id);
specialInformation.setUniqueCode(id); specialInformation.setUniqueCode(id);
specialInformation.setDeleteFlag(0); specialInformation.setDeleteFlag(0);
specialInformation.setCheckStatus(0);
specialInformation.setTopNum(0); specialInformation.setTopNum(0);
specialInformation.setFlag("1"); specialInformation.setFlag("1");
specialInformation.setCreateDate(EsDateUtil.esFieldDateFormat(cn.hutool.core.date.DateUtil.formatDateTime(new Date()))); specialInformation.setCreateDate(EsDateUtil.esFieldDateFormat(cn.hutool.core.date.DateUtil.formatDateTime(new Date())));
......
...@@ -73,6 +73,7 @@ public class KeyWordsServiceImpl extends ServiceImpl<KeyWordsMapper, KeyWords> i ...@@ -73,6 +73,7 @@ public class KeyWordsServiceImpl extends ServiceImpl<KeyWordsMapper, KeyWords> i
Node node = new Node(); Node node = new Node();
node.setId(e.getId()); node.setId(e.getId());
node.setPid(e.getPid()); node.setPid(e.getPid());
nodeList.add(node);
}); });
typeIds = TreeUtil.belowList(nodeList,keyWordsTypeId,true); typeIds = TreeUtil.belowList(nodeList,keyWordsTypeId,true);
} }
...@@ -137,7 +138,9 @@ public class KeyWordsServiceImpl extends ServiceImpl<KeyWordsMapper, KeyWords> i ...@@ -137,7 +138,9 @@ public class KeyWordsServiceImpl extends ServiceImpl<KeyWordsMapper, KeyWords> i
KeyWords keyWords = new KeyWords(); KeyWords keyWords = new KeyWords();
BeanUtils.copyProperties(keyWordsPage, keyWords); BeanUtils.copyProperties(keyWordsPage, keyWords);
//更细redis缓存 //更细redis缓存
KeyWordsDTO keyWordsDTO = (KeyWordsDTO)redisUtil.get(Constants.KEY_WORDS_TO_REDIS_PREFIX + keyWords.getWordsCode()); Object object = redisUtil.get(Constants.KEY_WORDS_TO_REDIS_PREFIX + keyWords.getWordsCode());
if (object != null) {
KeyWordsDTO keyWordsDTO = (KeyWordsDTO) object;
keyWordsDTO.setKeyWord(keyWordsPage.getKeyWord()); keyWordsDTO.setKeyWord(keyWordsPage.getKeyWord());
keyWordsDTO.setExclusionWord(keyWordsPage.getExclusionWord()); keyWordsDTO.setExclusionWord(keyWordsPage.getExclusionWord());
redisUtil.set(Constants.KEY_WORDS_TO_REDIS_PREFIX + keyWords.getWordsCode(), keyWordsDTO); redisUtil.set(Constants.KEY_WORDS_TO_REDIS_PREFIX + keyWords.getWordsCode(), keyWordsDTO);
...@@ -153,6 +156,7 @@ public class KeyWordsServiceImpl extends ServiceImpl<KeyWordsMapper, KeyWords> i ...@@ -153,6 +156,7 @@ public class KeyWordsServiceImpl extends ServiceImpl<KeyWordsMapper, KeyWords> i
keyWordsCodes.add(keyWordsDTO.getWordsCode()); keyWordsCodes.add(keyWordsDTO.getWordsCode());
xxlJobInfoService.keyWordsUpdate(keyWordsCodes, keyWordsPage.getStatus()); xxlJobInfoService.keyWordsUpdate(keyWordsCodes, keyWordsPage.getStatus());
} }
}
//插入关键词表 //插入关键词表
baseMapper.updateById(keyWords); baseMapper.updateById(keyWords);
//删除关键词-类别映射关系 //删除关键词-类别映射关系
......
...@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; ...@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzsn.event.entity.InfoSourceGroup; import com.zzsn.event.entity.InfoSourceGroup;
...@@ -280,13 +281,18 @@ public class SubjectInfoSourceMapServiceImpl extends ServiceImpl<SubjectInfoSour ...@@ -280,13 +281,18 @@ public class SubjectInfoSourceMapServiceImpl extends ServiceImpl<SubjectInfoSour
.eq(SubjectInfoSourceMap::getSubjectId, subjectId) .eq(SubjectInfoSourceMap::getSubjectId, subjectId)
.eq(SubjectInfoSourceMap::getType, sourceType)); .eq(SubjectInfoSourceMap::getType, sourceType));
if (CollUtil.isNotEmpty(list)){ if (CollUtil.isNotEmpty(list)){
this.update(Wrappers.<SubjectInfoSourceMap>lambdaUpdate() LambdaUpdateWrapper<SubjectInfoSourceMap> updateWrapper = Wrappers.<SubjectInfoSourceMap>lambdaUpdate()
.set(ObjectUtil.isNotEmpty(infoSourceGroupPage.getIsExemptKeyword()),SubjectInfoSourceMap::getIsExemptKeyword,infoSourceGroupPage.getIsExemptKeyword()) .set(ObjectUtil.isNotEmpty(infoSourceGroupPage.getIsExemptKeyword()), SubjectInfoSourceMap::getIsExemptKeyword, infoSourceGroupPage.getIsExemptKeyword())
.set(ObjectUtil.isNotEmpty(infoSourceGroupPage.getIsFreeCheck()),SubjectInfoSourceMap::getIsFreeCheck,infoSourceGroupPage.getIsFreeCheck()) .set(ObjectUtil.isNotEmpty(infoSourceGroupPage.getIsFreeCheck()), SubjectInfoSourceMap::getIsFreeCheck, infoSourceGroupPage.getIsFreeCheck())
.set(ObjectUtil.isNotEmpty(infoSourceGroupPage.getWeight()),SubjectInfoSourceMap::getWeight,infoSourceGroupPage.getWeight()) .eq(SubjectInfoSourceMap::getSourceId, id)
.eq(SubjectInfoSourceMap::getSourceId,id) .eq(SubjectInfoSourceMap::getSubjectId, subjectId)
.eq(SubjectInfoSourceMap::getSubjectId,subjectId) .eq(SubjectInfoSourceMap::getType, sourceType);
.eq(SubjectInfoSourceMap::getType,sourceType)); if (ObjectUtil.isNotEmpty(infoSourceGroupPage.getWeight())){
updateWrapper.set(SubjectInfoSourceMap::getWeight, infoSourceGroupPage.getWeight());
} else {
updateWrapper.set(SubjectInfoSourceMap::getWeight, null);
}
this.update(updateWrapper);
}else { }else {
SubjectInfoSourceMap subjectInfoSourceMap = new SubjectInfoSourceMap(); SubjectInfoSourceMap subjectInfoSourceMap = new SubjectInfoSourceMap();
subjectInfoSourceMap.setSubjectId(subjectId); subjectInfoSourceMap.setSubjectId(subjectId);
......
...@@ -154,6 +154,12 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl ...@@ -154,6 +154,12 @@ public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> impl
} }
@Override @Override
public Page<String> visiblePageList(String username,String subjectName, Integer pageNo, Integer pageSize) {
Page<String> page = new Page<>(pageNo, pageSize);
return baseMapper.visibleList(username,subjectName, page);
}
@Override
public SubjectDetailVO queryInfo(String subjectId) { public SubjectDetailVO queryInfo(String subjectId) {
return baseMapper.queryInfo(subjectId); return baseMapper.queryInfo(subjectId);
} }
......
...@@ -12,6 +12,7 @@ import com.zzsn.event.es.EsService; ...@@ -12,6 +12,7 @@ import com.zzsn.event.es.EsService;
import com.zzsn.event.service.*; import com.zzsn.event.service.*;
import com.zzsn.event.util.CodeGenerateUtil; import com.zzsn.event.util.CodeGenerateUtil;
import com.zzsn.event.util.EsOpUtil; import com.zzsn.event.util.EsOpUtil;
import com.zzsn.event.util.PythonUtil;
import com.zzsn.event.vo.*; import com.zzsn.event.vo.*;
import com.zzsn.event.vo.es.SpecialInformation; import com.zzsn.event.vo.es.SpecialInformation;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
...@@ -20,7 +21,6 @@ import org.elasticsearch.index.query.BoolQueryBuilder; ...@@ -20,7 +21,6 @@ import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -70,6 +70,8 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService { ...@@ -70,6 +70,8 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
private EsOpUtil esOpUtil; private EsOpUtil esOpUtil;
@Autowired @Autowired
private CodeGenerateUtil codeGenerateUtil; private CodeGenerateUtil codeGenerateUtil;
@Autowired
private PythonUtil pythonUtil;
//关键词默认分类 //关键词默认分类
private static final String KEYWORDS_TYPE_ID = "1476498704680194050"; private static final String KEYWORDS_TYPE_ID = "1476498704680194050";
...@@ -403,8 +405,10 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService { ...@@ -403,8 +405,10 @@ public class SubjectSimpleServiceImpl implements SubjectSimpleService {
.set(Subject::getFirstOpenTime, null) .set(Subject::getFirstOpenTime, null)
.set(Subject::getEstimateStatus, null); .set(Subject::getEstimateStatus, null);
subjectService.update(updateWrapper); subjectService.update(updateWrapper);
//todo 调用python接口
CompletableFuture.runAsync(() -> { CompletableFuture.runAsync(() -> {
//调用python接口
pythonUtil.clearDuplicateHistory(subjectId);
//清空专题数据
BoolQueryBuilder boolQuery = QueryBuilders.boolQuery(); BoolQueryBuilder boolQuery = QueryBuilders.boolQuery();
boolQuery.must(QueryBuilders.termQuery("subjectId.keyword", subjectId)); boolQuery.must(QueryBuilders.termQuery("subjectId.keyword", subjectId));
esOpUtil.docDeleteByQuery(Constants.SUBJECT_INDEX, boolQuery); esOpUtil.docDeleteByQuery(Constants.SUBJECT_INDEX, boolQuery);
......
...@@ -25,6 +25,8 @@ public class PythonUtil { ...@@ -25,6 +25,8 @@ public class PythonUtil {
private String keywordExtractUrl; private String keywordExtractUrl;
@Value("${python.judgeDuplicateUrl:}") @Value("${python.judgeDuplicateUrl:}")
private String judgeDuplicateUrl; private String judgeDuplicateUrl;
@Value("${python.clearDuplicateHistoryUrl:}")
private String clearDuplicateHistoryUrl;
/** /**
* 提取关键词 * 提取关键词
...@@ -93,4 +95,21 @@ public class PythonUtil { ...@@ -93,4 +95,21 @@ public class PythonUtil {
} }
return repeat; return repeat;
} }
/**
* 清空去重服务历史数据
*
* @param subjectId 专题id
* @author lkg
* @date 2025/2/10
*/
public void clearDuplicateHistory(String subjectId) {
Map<String, String> params = new HashMap<>();
params.put("subjectId", subjectId);
try {
HttpUtil.doGet(clearDuplicateHistoryUrl, params, "UTF-8");
} catch (Exception e) {
e.printStackTrace();
}
}
} }
package com.zzsn.event.vo; package com.zzsn.event.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -22,6 +24,8 @@ public class KeywordsTypeVo { ...@@ -22,6 +24,8 @@ public class KeywordsTypeVo {
/** /**
* 创建日期 * 创建日期
*/ */
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date createTime; private Date createTime;
/** /**
* 更新人 * 更新人
...@@ -30,6 +34,8 @@ public class KeywordsTypeVo { ...@@ -30,6 +34,8 @@ public class KeywordsTypeVo {
/** /**
* 更新日期 * 更新日期
*/ */
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
private Date updateTime; private Date updateTime;
/** /**
* 所属部门 * 所属部门
......
...@@ -20,6 +20,6 @@ public class AttachmentInfo { ...@@ -20,6 +20,6 @@ public class AttachmentInfo {
private String category; private String category;
private String fileSize; private String fileSize;
private String group; private String group;
private Long pageSize; private Integer pageSize;
private String source; private String source;
} }
...@@ -112,6 +112,10 @@ public class DisplayInfo { ...@@ -112,6 +112,10 @@ public class DisplayInfo {
private List<String> riskTypes; private List<String> riskTypes;
//标签集合 //标签集合
private List<LabelInfo> labelInfos; private List<LabelInfo> labelInfos;
//资讯关联的附件id
private List<String> attachmentIds;
//附件集合
private List<AttachmentInfo> attachmentInfos;
//是否为资讯(true:资讯 false:附件类) //是否为资讯(true:资讯 false:附件类)
private Boolean ynArticle = true; private Boolean ynArticle = true;
//法规号 //法规号
......
...@@ -50,7 +50,12 @@ spring: ...@@ -50,7 +50,12 @@ spring:
password: _PSuWVQ4CLpX password: _PSuWVQ4CLpX
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
multi-datasource1: multi-datasource1:
url: jdbc:mysql://1.95.14.228:3306/clb_xxl_job?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai url: jdbc:mysql://1.95.78.131:3306/clb_xxl_job?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: ciglobal
password: qwer@9988&zzsn
driver-class-name: com.mysql.cj.jdbc.Driver
multi-datasource2:
url: jdbc:mysql://1.95.14.228:3306/clb_system?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: ciglobal username: ciglobal
password: _PSuWVQ4CLpX password: _PSuWVQ4CLpX
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
...@@ -135,6 +140,5 @@ python: ...@@ -135,6 +140,5 @@ python:
subjectProcessorUrl: http://114.116.36.231:8085/subject/subject_processor subjectProcessorUrl: http://114.116.36.231:8085/subject/subject_processor
#判重 #判重
judgeDuplicateUrl: http://114.116.36.231:8080/subject/judg_duplicate judgeDuplicateUrl: http://114.116.36.231:8080/subject/judg_duplicate
#热词抽取地址 #抽取关键词
hotWords: keyWordsExtractUrl: http://1.95.91.200:7006/get_phrase/
extractUrl: http://114.116.99.6:8055/task/dispose/extractKeyword \ No newline at end of file
\ No newline at end of file
...@@ -42,7 +42,7 @@ spring: ...@@ -42,7 +42,7 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource: datasource:
master: master:
url: jdbc:mysql://114.116.44.11:3306/clb_project?useUnicode=true&characterEncoding=utf-8&AllowPublicKeyRetrieval=True&serverTimezone=Asia/Shanghai&autoReconnect=true&rewriteBatchedStatements=true url: jdbc:mysql://1.95.14.228:3306/clb_project?useUnicode=true&characterEncoding=utf-8&AllowPublicKeyRetrieval=True&serverTimezone=Asia/Shanghai&autoReconnect=true&rewriteBatchedStatements=true
username: ciglobal username: ciglobal
password: _PSuWVQ4CLpX password: _PSuWVQ4CLpX
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
...@@ -51,6 +51,11 @@ spring: ...@@ -51,6 +51,11 @@ spring:
username: ciglobal username: ciglobal
password: qwer@9988&zzsn password: qwer@9988&zzsn
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
multi-datasource2:
url: jdbc:mysql://1.95.14.228:3306/clb_system?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
username: ciglobal
password: _PSuWVQ4CLpX
driver-class-name: com.mysql.cj.jdbc.Driver
elasticsearch: elasticsearch:
uris: ["192.168.0.24:9700","192.168.0.150:9200","192.168.0.81:9700"] uris: ["192.168.0.24:9700","192.168.0.150:9200","192.168.0.81:9700"]
username: elastic username: elastic
......
...@@ -144,6 +144,8 @@ python: ...@@ -144,6 +144,8 @@ python:
judgeDuplicateUrl: http://1.95.13.40:8080/subject/judg_duplicate judgeDuplicateUrl: http://1.95.13.40:8080/subject/judg_duplicate
#抽取关键词 #抽取关键词
keyWordsExtractUrl: http://1.95.91.200:7006/get_phrase/ keyWordsExtractUrl: http://1.95.91.200:7006/get_phrase/
#清空去重服务历史数据
clearDuplicateHistoryUrl: http://1.95.13.40:8080/subject/delete_history_data
jeecg: jeecg:
shiro: shiro:
excludeUrls: excludeUrls:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论