提交 a4f9b9f8 作者: 刘伟刚

d代码修改更新29

上级 87fa1fb1
......@@ -205,80 +205,74 @@ public class DownloadFileUtil {
keywordMsg.setIndentationHanging(-540);
String keyword = "文章关键词:"+mapEntity.get("keywords").replace(";"," ");
DownLoadSupport.getParagraph(keywordMsg, keyword, ParagraphAlignment.LEFT, "宋体", 14, false);
if(mapEntity.get("isSumm").contains("true")) {
XWPFParagraph summaryMsg = doc.createParagraph();
summaryMsg.setIndentationHanging(-540);
String content = "摘要:" + mapEntity.get("summary").replace(" ","");
String content = "摘要:" + mapEntity.get("summary").replace(" ", "");
DownLoadSupport.getParagraph(summaryMsg, content, ParagraphAlignment.LEFT, "宋体", 14, false);
}
if(mapEntity.get("isScret").contains("true")) {
XWPFParagraph p7 = doc.createParagraph();
p7.setIndentationHanging(-540);
DownLoadSupport.getParagraph(p7, "敏感信息得分:", ParagraphAlignment.LEFT, "宋体", 14, false);
XWPFTable table3 = doc.createTable(4, 2);
DownLoadSupport.setTableWidthAndHeight(table3, 5000, 500);
DownLoadSupport.getCellParagraph(table3.getRow(0).getCell(0), "关键词得分", "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(0).getCell(1),mapEntity.get("score4key"), "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(1).getCell(0),"句子得分", "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(1).getCell(1),mapEntity.get("score4sentence"), "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(2).getCell(0),"图谱得分", "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(2).getCell(1),mapEntity.get("score4graph"), "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(3).getCell(0),"总得分", "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(3).getCell(1),mapEntity.get("totalscore"), "宋体", 14, false);
setTableLocation(table3,"center");
// setCellLocation(table3,"CENTER","center");
DownLoadSupport.getCellParagraph(table3.getRow(0).getCell(1), mapEntity.get("score4key"), "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(1).getCell(0), "句子得分", "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(1).getCell(1), mapEntity.get("score4sentence"), "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(2).getCell(0), "图谱得分", "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(2).getCell(1), mapEntity.get("score4graph"), "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(3).getCell(0), "总得分", "宋体", 14, false);
DownLoadSupport.getCellParagraph(table3.getRow(3).getCell(1), mapEntity.get("totalscore"), "宋体", 14, false);
setTableLocation(table3, "center");
XWPFParagraph p3 = doc.createParagraph();
p3.setIndentationHanging(-540);
DownLoadSupport.getParagraph(p3, "是否命中密点库:"+mapEntity.get("isScret"), ParagraphAlignment.LEFT, "宋体", 14, false);
DownLoadSupport.getParagraph(p3, "是否命中密点库:" + mapEntity.get("isScret"), ParagraphAlignment.LEFT, "宋体", 14, false);
}
if(mapEntity.get("isLink").contains("true")) {
XWPFParagraph sAddrtext = doc.createParagraph();
sAddrtext.setIndentationHanging(-540);
DownLoadSupport.getParagraph(sAddrtext, "来源链接: ", ParagraphAlignment.LEFT, "宋体", 14, false);
XWPFParagraph sAddr = doc.createParagraph();
DownLoadSupport.getParagraph(sAddr, mapEntity.get("sourceAddress"), ParagraphAlignment.LEFT, "宋体", 14, false);
}
if(mapEntity.get("isMsg").contains("true")) {
XWPFParagraph beizhuMsg = doc.createParagraph();
beizhuMsg.setIndentationHanging(-540);
String beizhu = "研判意见:" + mapEntity.get("beizhu");
DownLoadSupport.getParagraph(beizhuMsg, beizhu, ParagraphAlignment.LEFT, "宋体", 14, false);
}
if(mapEntity.get("isFile").contains("true")) {
XWPFParagraph fujianMsg = doc.createParagraph();
fujianMsg.setPageBreak(true);
DownLoadSupport.getParagraph(fujianMsg, "附件:", ParagraphAlignment.LEFT, "宋体", 14, false);
XWPFParagraph titlePh = doc.createParagraph();
String titlet= mapEntity.get("title");
String titlet = mapEntity.get("title");
DownLoadSupport.getParagraph(titlePh, titlet, ParagraphAlignment.CENTER, "宋体", 14, false);
XWPFParagraph sourcePh = doc.createParagraph();
String sourcet= mapEntity.get("time")+" "+mapEntity.get("source");
String sourcet = mapEntity.get("time") + " " + mapEntity.get("source");
DownLoadSupport.getParagraph(sourcePh, sourcet, ParagraphAlignment.RIGHT, "宋体", 14, false);
// XWPFParagraph contentMsg = doc.createParagraph();
// contentMsg.setIndentationHanging(-540);
String ctent= mapEntity.get("content");
// DownLoadSupport.getParagraph(contentMsg, ctent, ParagraphAlignment.LEFT, "宋体", 14, false);
String ctent = mapEntity.get("content");
String[] tt = ctent.split("(?<=[。])");
if (tt.length>1 && ctent.length()>50) {
String ms="";
if (tt.length > 1 && ctent.length() > 50) {
String ms = "";
for (int k = 0; k < tt.length; k++) {
ms+=tt[k];
if(ms.length()>50||k==tt.length-1) {
ms += tt[k];
if (ms.length() > 50 || k == tt.length - 1) {
XWPFParagraph textP = doc.createParagraph();
textP.setIndentationHanging(-540);
DownLoadSupport.getParagraph(textP, ms, ParagraphAlignment.LEFT, "宋体", 12, false);
ms="";
ms = "";
}
if (baseDataImages.size()>0 ) {
if( k < baseDataImages.size()){
if (baseDataImages.size() > 0) {
if (k < baseDataImages.size()) {
//图片:
XWPFParagraph p6 = doc.createParagraph();
p6.setAlignment(ParagraphAlignment.CENTER);
BaseDataImage base64 = baseDataImages.get(k);
InputStream input=null;
if(base64!=null) {
InputStream input = null;
if (base64 != null) {
byte[] bytes = new BASE64Decoder().decodeBuffer(base64.getDataImage());
input = new ByteArrayInputStream(bytes);
}
......@@ -288,19 +282,19 @@ public class DownloadFileUtil {
}
}
}else{
} else {
XWPFParagraph textP = doc.createParagraph();
textP.setIndentationHanging(-540);
DownLoadSupport.getParagraph(textP, ctent, ParagraphAlignment.LEFT, "宋体", 12, false);
if (baseDataImages.size()>0) {
if (baseDataImages.size() > 0) {
for (int i = 0; i < baseDataImages.size(); i++) {
//图片:
XWPFParagraph p6 = doc.createParagraph();
p6.setAlignment(ParagraphAlignment.CENTER);
BaseDataImage base64 = baseDataImages.get(i);
InputStream input=null;
if(base64!=null) {
InputStream input = null;
if (base64 != null) {
byte[] bytes = new BASE64Decoder().decodeBuffer(base64.getDataImage());
input = new ByteArrayInputStream(bytes);
}
......@@ -313,9 +307,9 @@ public class DownloadFileUtil {
}
XWPFParagraph linkPh = doc.createParagraph();
String link= mapEntity.get("sourceAddress");
String link = mapEntity.get("sourceAddress");
DownLoadSupport.getParagraph(linkPh, link, ParagraphAlignment.RIGHT, "宋体", 14, false);
}
File file = new File(fileAbsolutePath);
file.createNewFile();
......
......@@ -2,6 +2,7 @@ package com.zzsn.modules.kgj.controller;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
......@@ -392,7 +393,7 @@ public class BaseDataController {
@ApiImplicitParam(name = "pTypeId",value = "父级分类ID(1-十大军工,2-论坛,3-高校)",dataType = "Long")
})
@GetMapping("/getSuspectData")
public ResultModel getSuspectData(Long type,Long siteTypeId,Long secretLevel,Long siteId, Long pTypeId){
public ResultModel getSuspectData(Long type,Long siteTypeId,Long secretLevel,Long siteId, Long pTypeId,String title){
// List<Basedata> list = baseDataService.getBaseDataByType(type);
// List<Long> typeList = getUserSiteType();
List<Long> typeList=new ArrayList<>();
......@@ -401,14 +402,32 @@ public class BaseDataController {
}else{
typeList = getSiteTypeIdsByPTypeId(pTypeId);
}
if(StringUtils.isEmpty(title)){
title=null;
}
//确认信息
// List<Map<String, Object>> list = baseDataService.getWarningData(1,100,Contant.KGJ_TID,3L,typeList);
// 疑似信息
// List<Map<String, Object>> susList = baseDataService.getWarningData(1,100,Contant.KGJ_TID,type,typeList);
List<Map<String, Object>> list = baseDataService.getWarningData(1, 100, Contant.KGJ_TID, type, secretLevel, typeList,siteId);
List<Map<String, Object>> list = baseDataService.getWarningData(1, 100, Contant.KGJ_TID, type, secretLevel, typeList,siteId,title);
return ResultModel.OK(list);
}
@ApiOperation(value = "删除疑似信息")
@GetMapping("/deleteWarningData")
public ResultModel deleteWarningData(Long bid, Long webId){
String msg="";
if(bid!=null && webId !=null ) {
QueryWrapper<BaseDataWebMid> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("bid", bid);
queryWrapper.eq("web_id", webId);
boolean remove = baseDataWebMidService.remove(queryWrapper);
msg="删除成功!";
}else {
msg="删除失败!";
}
return ResultModel.OK(msg);
}
/**
* 词云
* @return 词云
......@@ -514,9 +533,11 @@ public class BaseDataController {
}
String s = typeList.toString();
String string = redisTemplate.opsForValue().get(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY+s);
// String string = redisTemplate.opsForValue().get(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY+s);
String string = redisTemplate.opsForValue().get(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY+s+searchKey);
//1个小时的状态是否失效
String flag = redisTemplate.opsForValue().get(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY_FLAG+s);
// String flag = redisTemplate.opsForValue().get(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY_FLAG+s);
String flag = redisTemplate.opsForValue().get(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY_FLAG+s+searchKey);
List<WordCloud> WordClouds = JSON.parseArray(string, WordCloud.class);
if(StringUtils.isBlank(flag)){
......@@ -524,9 +545,9 @@ public class BaseDataController {
new Thread(() -> {
List<WordCloud> resultList = baseDataService.wordCloudMore(searchKey,typeId, finalTypeList);
redisTemplate.opsForValue().set(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY+s,JSON.toJSONString(resultList));
redisTemplate.opsForValue().set(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY+s+searchKey,JSON.toJSONString(resultList));
//有效时间1个小时
redisTemplate.opsForValue().set(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY_FLAG+s,"true",1,TimeUnit.HOURS);
redisTemplate.opsForValue().set(Contant.BIG_SCREEN_WORD_CLOUD_MORE_KEY_FLAG+s+searchKey,"true",1,TimeUnit.HOURS);
}).start();
}
......
......@@ -412,7 +412,10 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC
public ResultModel keywordCount(HttpServletRequest req){
String beginTime =null;
String endTime = null;
String keyword=null;
if(StringUtils.isNotBlank(req.getParameter("keyword"))){
keyword = req.getParameter("keyword");
}
if(StringUtils.isNotBlank(req.getParameter("beginTime"))){
beginTime = req.getParameter("beginTime");
}else{
......@@ -429,7 +432,7 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC
}
// beginTime="2022-07-01";
List<WordCloud> wordClouds=new ArrayList<>();
List<WordCloud> keywordCount = baseDataService.countKeyWords(beginTime,endTime,pTypeId);
List<WordCloud> keywordCount = baseDataService.countKeyWords(beginTime,endTime,pTypeId,keyword);
if(keywordCount.size()>50){
wordClouds = keywordCount.subList(0, 50);
}else{
......@@ -800,6 +803,7 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC
String origin = ""; //信息来源
if(StringUtils.isNotBlank(req.getParameter("origin"))){
origin = req.getParameter("origin");
origin = "%"+origin+"%";
}
String locale = ""; //文章状态
if(StringUtils.isNotBlank(req.getParameter("locale"))){
......@@ -1320,6 +1324,16 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC
detialMap.put("isScret", "否");
}
parameters.put("fileName",fileName);
String isSumm=request.getParameter("isSumm")!=null?request.getParameter("isSumm"):"true";
String isScore=request.getParameter("isScore")!=null?request.getParameter("isScore"):"true";
String isLink=request.getParameter("isLink")!=null?request.getParameter("isLink"):"true";
String isMsg=request.getParameter("isMsg")!=null?request.getParameter("isMsg"):"true";
String isFile=request.getParameter("isFile")!=null?request.getParameter("isFile"):"true";
detialMap.put("isSumm",isSumm);
detialMap.put("isScore",isScore);
detialMap.put("isLink",isLink);
detialMap.put("isMsg",isMsg);
detialMap.put("isFile",isFile);
fileAbsolutePath = DownloadService.downloadArticleWordUtils(detialMap, parameters,baseDataImages);
DownloadFileUtil.exportExcel(response, fileAbsolutePath);
......
......@@ -70,7 +70,7 @@ public interface BaseDataMapper extends BaseMapper<Basedata> {
* @param secretLevel 风险等级
* @return
*/
List<Map<String, Object>> getWarningData(@Param("offsetFrom") int pageIndex, @Param("offsetEnd") int pageSize, @Param("tid") Long tid, @Param("delflag") Long type, @Param("secretLevel") Long secretLevel,@Param("list") List<Long> typeList,@Param("siteId")Long siteId);
List<Map<String, Object>> getWarningData(@Param("offsetFrom") int pageIndex, @Param("offsetEnd") int pageSize, @Param("tid") Long tid, @Param("delflag") Long type, @Param("secretLevel") Long secretLevel,@Param("list") List<Long> typeList,@Param("siteId")Long siteId,String title);
/**
* 地图信息
......
......@@ -352,7 +352,7 @@
</select>
<select id="getDataCount" resultType="Long">
select count(1) from (
select B.id, B.PUBLISH_DATE from (select * from cis_ans_basedata where publish_date > TO_CHAR((select sysdate - interval '1' year as starttime from dual) , 'YYYY-MM-DD')) B
select B.id, B.PUBLISH_DATE from (select * from ( SELECT * FROM cis_ans_basedata WHERE publish_date > TO_CHAR( ( SELECT SYSDATE - INTERVAL '1' year AS starttime FROM dual ), 'YYYY-MM-DD' ) ) where publish_date > TO_CHAR((select sysdate - interval '1' year as starttime from dual) , 'YYYY-MM-DD')) B
inner join (
select t.* from CIS_ANS_BASEDATA_TYPE T
where 1=1
......@@ -577,7 +577,7 @@
<select id="getSuspectDataNew" resultType="com.zzsn.modules.kgj.entity.BaseDataVO">
select c.id webSiteId,c.name as origin ,c.LONGITUDE_LATITUDE as longitudeLatitude,c.is_head_office as isHeadOffice ,c.TYPEID as siteTypeId,c.CHNAME as siteTypeName ,count(1) as count from (
select B.ID
from CIS_ANS_BASEDATA B
from (SELECT * FROM cis_ans_basedata WHERE publish_date > TO_CHAR((SELECT sysdate - INTERVAL '1' year AS starttime FROM dual), 'YYYY-MM-DD')) B
inner join CIS_ANS_BASEDATA_TYPE T on t.bid=b.id
where 1=1
<if test="tid!=null ">
......@@ -725,12 +725,15 @@
WHERE ROW_ID <![CDATA[>]]> #{offsetFrom}
</select>
<select id="getWarningData" resultType="java.util.Map">
SELECT a.id as "id", a.title as "title", a.publishDate as "publishDate",a.delFlag as "type",a.secretLevel as "secretLevel"
SELECT a.id as "id",a.web_id as "webId", a.title as "title", a.publishDate as "publishDate",a.delFlag as "type",a.secretLevel as "secretLevel"
FROM (
SELECT TMP_PAGE.*, ROWNUM ROW_ID
FROM (
select b.id as id, b.TITLE as title, b.PUBLISH_DATE as publishDate,N.DELFLAG as delFlag,d.SECRET_LEVEL as secretLevel
from CIS_ANS_BASEDATA B
select b.id as id,d.web_id as web_id, b.TITLE as title, b.PUBLISH_DATE as publishDate,N.DELFLAG as delFlag,d.SECRET_LEVEL as secretLevel
from (select * from CIS_ANS_BASEDATA where 1=1
<if test=' title != null and title != "" '>
and TITLE like '%${ title }%'
</if>) B
inner join (select t.BID,T.DELFLAG
from CIS_ANS_BASEDATA_TYPE T
where 1 = 1
......@@ -746,7 +749,7 @@
) N on N.bid = B.id
inner join (
select
a.BID,a.SECRET_LEVEL
a.BID,a.web_id,a.SECRET_LEVEL
from CIS_BASEDATA_WEB_MID a
inner join CIS_COL_SITE_TYPE_MID b
on a.WEB_ID = b.SITEID
......
......@@ -154,7 +154,7 @@
<select id="getCisAnsBasedataCount2" parameterType="Map" resultType="java.lang.Integer">
SELECT count(1)
FROM cis_ans_basedata b
FROM ( SELECT * FROM cis_ans_basedata WHERE publish_date > TO_CHAR( ( SELECT SYSDATE - INTERVAL '1' year AS starttime FROM dual ), 'YYYY-MM-DD' ) ) b
left JOIN cis_ans_basedata_type t ON t.bid = b.id
<if test=" (list!=null and list.size>0) or (siteId != null and siteId != '')">
left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
......@@ -186,7 +186,7 @@
<select id="getCisAnsBasedataCount3" parameterType="Map" resultType="java.lang.Integer">
SELECT count(1)
FROM cis_ans_basedata b
FROM ( SELECT * FROM cis_ans_basedata WHERE publish_date > TO_CHAR( ( SELECT SYSDATE - INTERVAL '1' year AS starttime FROM dual ), 'YYYY-MM-DD' ) ) b
left JOIN cis_ans_basedata_type t ON t.bid = b.id
<if test=" (list!=null and list.size>0) or (siteId != null and siteId != '')">
left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
......@@ -329,7 +329,7 @@
b.summary,
b.locale,
b.CONTENT_NO_TAG
FROM cis_ans_basedata b
FROM ( SELECT * FROM cis_ans_basedata WHERE publish_date > TO_CHAR( ( SELECT SYSDATE - INTERVAL '1' year AS starttime FROM dual ), 'YYYY-MM-DD' ) ) b
left JOIN cis_ans_basedata_type t ON t.bid = b.id
<if test=" (list!=null and list.size>0) or (siteId != null and siteId != '')">
left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
......@@ -377,7 +377,7 @@
b.summary,
b.locale,
b.CONTENT_NO_TAG
FROM cis_ans_basedata b
FROM ( SELECT * FROM cis_ans_basedata WHERE publish_date > TO_CHAR( ( SELECT SYSDATE - INTERVAL '1' year AS starttime FROM dual ), 'YYYY-MM-DD' ) ) b
left JOIN cis_ans_basedata_type t ON t.bid = b.id
<if test=" (list!=null and list.size>0) or (siteId != null and siteId != '')">
left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
......
......@@ -39,7 +39,7 @@ public interface BaseDataService extends IService<Basedata> {
List<WordCloud> analysisKeyWords();
List<WordCloud> analysisKeyWords(List<Long> typeList);
List<WordCloud> countKeyWords(String beginTime,String endTime,Long pTypeId);
List<WordCloud> countKeyWords(String beginTime,String endTime,Long pTypeId,String keyword);
/**
* 获取预警信息
......@@ -60,7 +60,7 @@ public interface BaseDataService extends IService<Basedata> {
* @param siteId 网站ID
* @return
*/
List<Map<String, Object>> getWarningData(int pageIndex, int pageSize, Long tid, Long type,Long secretLevel,List<Long> typeList,Long siteId);
List<Map<String, Object>> getWarningData(int pageIndex, int pageSize, Long tid, Long type,Long secretLevel,List<Long> typeList,Long siteId,String title);
/**
* 获取地图上需要的信息
* @param tid 科工局
......
......@@ -592,7 +592,7 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im
}
@Override
public List<WordCloud> countKeyWords(String beginTime,String endTime,Long pTypeId) {
public List<WordCloud> countKeyWords(String beginTime,String endTime,Long pTypeId,String keyword) {
List<Map<String,Object>> suspectDataList = baseDataMapper.getKeyWordCloud( pTypeId,beginTime, endTime);
HashMap<String,Integer> resultMap = new HashMap<>();
if (CollectionUtils.isNotEmpty(suspectDataList)){
......@@ -798,9 +798,9 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im
* @return
*/
@Override
public List<Map<String, Object>> getWarningData(int pageIndex, int pageSize, Long tid, Long type,Long secretLevel,List<Long> typeList,Long siteId) {
public List<Map<String, Object>> getWarningData(int pageIndex, int pageSize, Long tid, Long type,Long secretLevel,List<Long> typeList,Long siteId,String title) {
int offset = (pageIndex-1)*pageSize;
List<Map<String, Object>> list = baseDataMapper.getWarningData(offset,offset+pageSize,tid,type,secretLevel,typeList,siteId);
List<Map<String, Object>> list = baseDataMapper.getWarningData(offset,offset+pageSize,tid,type,secretLevel,typeList,siteId,title);
return list;
}
......@@ -903,14 +903,17 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im
// HashMap<String, Integer> hashMap = SortUtil.sortHashMap(secretMap);
// Set<Map.Entry<String, Integer>> entries = hashMap.entrySet();
for (Map.Entry<String, Integer> map :secretMap.entrySet()) {
if(map.getValue()>0) {
WordCloud wordCloud = new WordCloud();
wordCloud.setName(map.getKey());
wordCloud.setValue(map.getValue());
list.add(wordCloud);
}
}
}
return list;
}
@Override
public List<WordCloud> wordCloudMore(String searchKey, String typeId,List<Long> typeList) {
QueryWrapper<CesSysSecret> queryWrapper = new QueryWrapper<>();
......@@ -980,12 +983,14 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im
// HashMap<String, Integer> hashMap = SortUtil.sortHashMap(secretMap);
// Set<Map.Entry<String, Integer>> entries = hashMap.entrySet();
for (Map.Entry<String, Integer> map :secretMap.entrySet()) {
if(map.getValue()>0) {
WordCloud wordCloud = new WordCloud();
wordCloud.setName(map.getKey());
wordCloud.setValue(map.getValue());
list.add(wordCloud);
}
}
}
return list;
}
......
......@@ -289,8 +289,8 @@ public class CisAnsBasedataServiceImpl extends ServiceImpl<CisAnsBasedataMapper,
System.out.println("调用数据库:"+dataend);
System.out.println("调用数据库时间:"+(dataend-data));
Page<CisAnsBasedata> page = new Page<>(baseDataDto.getPageNum(), baseDataDto.getPageSize());
// page.setTotal(searchHits.getTotalHits().value);
page.setTotal(basedataList.size());
page.setTotal(searchHits.getTotalHits().value);
// page.setTotal(basedataList.size());
page.setRecords(basedataList);
return page;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论