提交 a4f9b9f8 作者: 刘伟刚

d代码修改更新29

上级 87fa1fb1
...@@ -2,6 +2,7 @@ package com.zzsn.modules.kgj.controller; ...@@ -2,6 +2,7 @@ package com.zzsn.modules.kgj.controller;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpUtil; import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
...@@ -392,7 +393,7 @@ public class BaseDataController { ...@@ -392,7 +393,7 @@ public class BaseDataController {
@ApiImplicitParam(name = "pTypeId",value = "父级分类ID(1-十大军工,2-论坛,3-高校)",dataType = "Long") @ApiImplicitParam(name = "pTypeId",value = "父级分类ID(1-十大军工,2-论坛,3-高校)",dataType = "Long")
}) })
@GetMapping("/getSuspectData") @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<Basedata> list = baseDataService.getBaseDataByType(type);
// List<Long> typeList = getUserSiteType(); // List<Long> typeList = getUserSiteType();
List<Long> typeList=new ArrayList<>(); List<Long> typeList=new ArrayList<>();
...@@ -401,14 +402,32 @@ public class BaseDataController { ...@@ -401,14 +402,32 @@ public class BaseDataController {
}else{ }else{
typeList = getSiteTypeIdsByPTypeId(pTypeId); 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>> 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>> 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); 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 词云 * @return 词云
...@@ -514,9 +533,11 @@ public class BaseDataController { ...@@ -514,9 +533,11 @@ public class BaseDataController {
} }
String s = typeList.toString(); 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个小时的状态是否失效 //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); List<WordCloud> WordClouds = JSON.parseArray(string, WordCloud.class);
if(StringUtils.isBlank(flag)){ if(StringUtils.isBlank(flag)){
...@@ -524,9 +545,9 @@ public class BaseDataController { ...@@ -524,9 +545,9 @@ public class BaseDataController {
new Thread(() -> { new Thread(() -> {
List<WordCloud> resultList = baseDataService.wordCloudMore(searchKey,typeId, finalTypeList); 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个小时 //有效时间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(); }).start();
} }
......
...@@ -412,7 +412,10 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC ...@@ -412,7 +412,10 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC
public ResultModel keywordCount(HttpServletRequest req){ public ResultModel keywordCount(HttpServletRequest req){
String beginTime =null; String beginTime =null;
String endTime = null; String endTime = null;
String keyword=null;
if(StringUtils.isNotBlank(req.getParameter("keyword"))){
keyword = req.getParameter("keyword");
}
if(StringUtils.isNotBlank(req.getParameter("beginTime"))){ if(StringUtils.isNotBlank(req.getParameter("beginTime"))){
beginTime = req.getParameter("beginTime"); beginTime = req.getParameter("beginTime");
}else{ }else{
...@@ -429,7 +432,7 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC ...@@ -429,7 +432,7 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC
} }
// beginTime="2022-07-01"; // beginTime="2022-07-01";
List<WordCloud> wordClouds=new ArrayList<>(); 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){ if(keywordCount.size()>50){
wordClouds = keywordCount.subList(0, 50); wordClouds = keywordCount.subList(0, 50);
}else{ }else{
...@@ -800,6 +803,7 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC ...@@ -800,6 +803,7 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC
String origin = ""; //信息来源 String origin = ""; //信息来源
if(StringUtils.isNotBlank(req.getParameter("origin"))){ if(StringUtils.isNotBlank(req.getParameter("origin"))){
origin = req.getParameter("origin"); origin = req.getParameter("origin");
origin = "%"+origin+"%";
} }
String locale = ""; //文章状态 String locale = ""; //文章状态
if(StringUtils.isNotBlank(req.getParameter("locale"))){ if(StringUtils.isNotBlank(req.getParameter("locale"))){
...@@ -1320,6 +1324,16 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC ...@@ -1320,6 +1324,16 @@ public class CisAnsBasedataController extends JeecgController<CisAnsBasedata, IC
detialMap.put("isScret", "否"); detialMap.put("isScret", "否");
} }
parameters.put("fileName",fileName); 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); fileAbsolutePath = DownloadService.downloadArticleWordUtils(detialMap, parameters,baseDataImages);
DownloadFileUtil.exportExcel(response, fileAbsolutePath); DownloadFileUtil.exportExcel(response, fileAbsolutePath);
......
...@@ -70,7 +70,7 @@ public interface BaseDataMapper extends BaseMapper<Basedata> { ...@@ -70,7 +70,7 @@ public interface BaseDataMapper extends BaseMapper<Basedata> {
* @param secretLevel 风险等级 * @param secretLevel 风险等级
* @return * @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 @@ ...@@ -352,7 +352,7 @@
</select> </select>
<select id="getDataCount" resultType="Long"> <select id="getDataCount" resultType="Long">
select count(1) from ( 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 ( inner join (
select t.* from CIS_ANS_BASEDATA_TYPE T select t.* from CIS_ANS_BASEDATA_TYPE T
where 1=1 where 1=1
...@@ -577,7 +577,7 @@ ...@@ -577,7 +577,7 @@
<select id="getSuspectDataNew" resultType="com.zzsn.modules.kgj.entity.BaseDataVO"> <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 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 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 inner join CIS_ANS_BASEDATA_TYPE T on t.bid=b.id
where 1=1 where 1=1
<if test="tid!=null "> <if test="tid!=null ">
...@@ -725,12 +725,15 @@ ...@@ -725,12 +725,15 @@
WHERE ROW_ID <![CDATA[>]]> #{offsetFrom} WHERE ROW_ID <![CDATA[>]]> #{offsetFrom}
</select> </select>
<select id="getWarningData" resultType="java.util.Map"> <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 ( FROM (
SELECT TMP_PAGE.*, ROWNUM ROW_ID SELECT TMP_PAGE.*, ROWNUM ROW_ID
FROM ( FROM (
select b.id as id, b.TITLE as title, b.PUBLISH_DATE as publishDate,N.DELFLAG as delFlag,d.SECRET_LEVEL as secretLevel 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 CIS_ANS_BASEDATA B 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 inner join (select t.BID,T.DELFLAG
from CIS_ANS_BASEDATA_TYPE T from CIS_ANS_BASEDATA_TYPE T
where 1 = 1 where 1 = 1
...@@ -746,7 +749,7 @@ ...@@ -746,7 +749,7 @@
) N on N.bid = B.id ) N on N.bid = B.id
inner join ( inner join (
select select
a.BID,a.SECRET_LEVEL a.BID,a.web_id,a.SECRET_LEVEL
from CIS_BASEDATA_WEB_MID a from CIS_BASEDATA_WEB_MID a
inner join CIS_COL_SITE_TYPE_MID b inner join CIS_COL_SITE_TYPE_MID b
on a.WEB_ID = b.SITEID on a.WEB_ID = b.SITEID
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<select id="getCisAnsBasedataCount2" parameterType="Map" resultType="java.lang.Integer"> <select id="getCisAnsBasedataCount2" parameterType="Map" resultType="java.lang.Integer">
SELECT count(1) 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 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 != '')"> <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 left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
<select id="getCisAnsBasedataCount3" parameterType="Map" resultType="java.lang.Integer"> <select id="getCisAnsBasedataCount3" parameterType="Map" resultType="java.lang.Integer">
SELECT count(1) 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 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 != '')"> <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 left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
...@@ -329,7 +329,7 @@ ...@@ -329,7 +329,7 @@
b.summary, b.summary,
b.locale, b.locale,
b.CONTENT_NO_TAG 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 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 != '')"> <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 left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
...@@ -377,7 +377,7 @@ ...@@ -377,7 +377,7 @@
b.summary, b.summary,
b.locale, b.locale,
b.CONTENT_NO_TAG 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 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 != '')"> <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 left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
......
...@@ -39,7 +39,7 @@ public interface BaseDataService extends IService<Basedata> { ...@@ -39,7 +39,7 @@ public interface BaseDataService extends IService<Basedata> {
List<WordCloud> analysisKeyWords(); List<WordCloud> analysisKeyWords();
List<WordCloud> analysisKeyWords(List<Long> typeList); 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> { ...@@ -60,7 +60,7 @@ public interface BaseDataService extends IService<Basedata> {
* @param siteId 网站ID * @param siteId 网站ID
* @return * @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 科工局 * @param tid 科工局
......
...@@ -592,7 +592,7 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im ...@@ -592,7 +592,7 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im
} }
@Override @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); List<Map<String,Object>> suspectDataList = baseDataMapper.getKeyWordCloud( pTypeId,beginTime, endTime);
HashMap<String,Integer> resultMap = new HashMap<>(); HashMap<String,Integer> resultMap = new HashMap<>();
if (CollectionUtils.isNotEmpty(suspectDataList)){ if (CollectionUtils.isNotEmpty(suspectDataList)){
...@@ -798,9 +798,9 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im ...@@ -798,9 +798,9 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im
* @return * @return
*/ */
@Override @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; 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; return list;
} }
...@@ -903,14 +903,17 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im ...@@ -903,14 +903,17 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im
// HashMap<String, Integer> hashMap = SortUtil.sortHashMap(secretMap); // HashMap<String, Integer> hashMap = SortUtil.sortHashMap(secretMap);
// Set<Map.Entry<String, Integer>> entries = hashMap.entrySet(); // Set<Map.Entry<String, Integer>> entries = hashMap.entrySet();
for (Map.Entry<String, Integer> map :secretMap.entrySet()) { for (Map.Entry<String, Integer> map :secretMap.entrySet()) {
WordCloud wordCloud = new WordCloud(); if(map.getValue()>0) {
wordCloud.setName(map.getKey()); WordCloud wordCloud = new WordCloud();
wordCloud.setValue(map.getValue()); wordCloud.setName(map.getKey());
list.add(wordCloud); wordCloud.setValue(map.getValue());
list.add(wordCloud);
}
} }
} }
return list; return list;
} }
@Override @Override
public List<WordCloud> wordCloudMore(String searchKey, String typeId,List<Long> typeList) { public List<WordCloud> wordCloudMore(String searchKey, String typeId,List<Long> typeList) {
QueryWrapper<CesSysSecret> queryWrapper = new QueryWrapper<>(); QueryWrapper<CesSysSecret> queryWrapper = new QueryWrapper<>();
...@@ -980,10 +983,12 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im ...@@ -980,10 +983,12 @@ public class BaseDataServiceImpl extends ServiceImpl<BaseDataMapper,Basedata> im
// HashMap<String, Integer> hashMap = SortUtil.sortHashMap(secretMap); // HashMap<String, Integer> hashMap = SortUtil.sortHashMap(secretMap);
// Set<Map.Entry<String, Integer>> entries = hashMap.entrySet(); // Set<Map.Entry<String, Integer>> entries = hashMap.entrySet();
for (Map.Entry<String, Integer> map :secretMap.entrySet()) { for (Map.Entry<String, Integer> map :secretMap.entrySet()) {
WordCloud wordCloud = new WordCloud(); if(map.getValue()>0) {
wordCloud.setName(map.getKey()); WordCloud wordCloud = new WordCloud();
wordCloud.setValue(map.getValue()); wordCloud.setName(map.getKey());
list.add(wordCloud); wordCloud.setValue(map.getValue());
list.add(wordCloud);
}
} }
} }
return list; return list;
......
...@@ -289,8 +289,8 @@ public class CisAnsBasedataServiceImpl extends ServiceImpl<CisAnsBasedataMapper, ...@@ -289,8 +289,8 @@ public class CisAnsBasedataServiceImpl extends ServiceImpl<CisAnsBasedataMapper,
System.out.println("调用数据库:"+dataend); System.out.println("调用数据库:"+dataend);
System.out.println("调用数据库时间:"+(dataend-data)); System.out.println("调用数据库时间:"+(dataend-data));
Page<CisAnsBasedata> page = new Page<>(baseDataDto.getPageNum(), baseDataDto.getPageSize()); Page<CisAnsBasedata> page = new Page<>(baseDataDto.getPageNum(), baseDataDto.getPageSize());
// page.setTotal(searchHits.getTotalHits().value); page.setTotal(searchHits.getTotalHits().value);
page.setTotal(basedataList.size()); // page.setTotal(basedataList.size());
page.setRecords(basedataList); page.setRecords(basedataList);
return page; return page;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论