提交 d3c09024 作者: 刘伟刚

新增专题

上级 a797ca77
......@@ -65,6 +65,7 @@
<guava.version>26.0-jre</guava.version>
<swagger2.version>2.9.2</swagger2.version>
<elasticsearch.version>7.8.1</elasticsearch.version>
<!--<elasticsearch.version>6.8.1</elasticsearch.version>-->
</properties>
<dependencies>
......
......@@ -123,6 +123,7 @@ public class ShiroConfig {
//大屏设计器排除
filterChainDefinitionMap.put("/big/screen/**", "anon");
filterChainDefinitionMap.put("/kgj/cisAnsBasedata/**", "anon");
// filterChainDefinitionMap.put("/kgj/**/**", "anon");
//测试示例
filterChainDefinitionMap.put("/test/jeecgDemo/html", "anon"); //模板页面
......@@ -130,6 +131,9 @@ public class ShiroConfig {
//websocket排除
filterChainDefinitionMap.put("/websocket/**", "anon");
// //测试
// filterChainDefinitionMap.put("/kgj/basedata/**", "anon");
// 添加自己的过滤器并且取名为jwt
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
filterMap.put("jwt", new JwtFilter());
......
......@@ -158,9 +158,9 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<!--<configuration>
<excludes>
<!--注意这玩意从编译结果目录开始算目录结构-->
&lt;!&ndash;注意这玩意从编译结果目录开始算目录结构&ndash;&gt;
<exclude>/jeecg/**</exclude>
<exclude>/static/**</exclude>
<exclude>/templates/**</exclude>
......@@ -168,7 +168,7 @@
<exclude>/*.yml</exclude>
<exclude>/*.xml</exclude>
</excludes>
</configuration>
</configuration>-->
</plugin>
</plugins>
</build>
......
......@@ -90,7 +90,11 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/sys/common/static/**", "anon");//图片预览 &下载文件不限制token
filterChainDefinitionMap.put("/sys/common/pdf/**", "anon");//pdf预览
filterChainDefinitionMap.put("/generic/**", "anon");//pdf预览需要文件
// filterChainDefinitionMap.put("/kgj/cisAnsBasedata/**", "anon");//pdf预览需要文件
filterChainDefinitionMap.put("/", "anon");
filterChainDefinitionMap.put("/analysis/**", "anon");
// filterChainDefinitionMap.put("/kgj/subject/**", "anon");
filterChainDefinitionMap.put("/doc.html", "anon");
filterChainDefinitionMap.put("/**/*.js", "anon");
filterChainDefinitionMap.put("/**/*.css", "anon");
......
......@@ -63,4 +63,7 @@ public class ResultModel<T> implements Serializable {
return new ResultModel(false, -200, msg);
}
public static ResultModel<Object> OKStr(String data) {
return new ResultModel<>(true, 200, "成功", data);
}
}
package com.zzsn.modules.kgj.controller;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.zzsn.common.api.vo.Result;
import com.zzsn.common.aspect.annotation.AutoLog;
import com.zzsn.common.system.vo.LoginUser;
import com.zzsn.modules.kgj.common.Contant;
import com.zzsn.modules.kgj.common.ResultModel;
import com.zzsn.modules.kgj.entity.*;
import com.zzsn.modules.kgj.entity.VO.CesSysWebVo;
import com.zzsn.modules.kgj.entity.VO.SiteTypeVo;
import com.zzsn.modules.kgj.mapper.SubjectMapper;
import com.zzsn.modules.kgj.service.*;
import com.zzsn.modules.kgj.utils.Pager;
import com.zzsn.modules.kgj.utils.TimeUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
* @author
* @description: 专题数据
* @date 2020/9/28 9:09
*/
@Api(tags = "科工局专题数据")
@RestController
@RequestMapping("/analysis")
public class SubjectController {
private Logger logger = LoggerFactory.getLogger(SubjectController.class);
@Autowired
private SubjectService subjectService;
@Autowired
private SubjectMapper subjectMapper;
/**
* 专题列表
* 查询所有的专题
* @return 数据
*/
@ApiOperation(value = "专题列表")
@GetMapping("/list")
public ResultModel subjectList(){
QueryWrapper<Subject> queryWrapper = new QueryWrapper<Subject>();
queryWrapper.select("id", "title");
List<Subject> subjects = subjectMapper.selectList(queryWrapper);
return ResultModel.OK(subjects);
}
/**
* 新增专题
* 查询所有的专题
* @return 数据
*/
@ApiOperation(value = "新增专题")
@GetMapping("/saveSubject")
public ResultModel saveSubject(@RequestParam("subjectName") String subjectName){
Subject subject = new Subject();
// subject.setId(subjectid);
subject.setTitle(subjectName);
subjectService.save(subject);
String save="新增专题成功";
return ResultModel.OK(save);
}
/**
* 专题动态
* 查询专题动态
* @return 数据
*/
@ApiOperation(value = "专题动态")
@GetMapping("/sujectDy")
public String sujectDy(@RequestParam("id") String id){
String subjectdy="";
if(StringUtils.isNotEmpty(id)) {
QueryWrapper<Subject> queryWrapper = new QueryWrapper<Subject>();
queryWrapper.select("suject_dy").eq("id", id);
Subject subject = subjectMapper.selectOne(queryWrapper);
subjectdy=subject.getSujectDy();
}
// JSONObject data = JSONObject.parseObject(subjectdy);//获取jsonobject对象
// subjectdy = data.getString("result");
// subjectdy=subjectdy.replace("\\","");
return subjectdy;
// return ResultModel.OK(subjectdy);
}
/**
* 观点分析
* 查询专题动态
* @return 数据
*/
@ApiOperation(value = "观点分析")
@GetMapping("/viewPointAnalysis")
public String viewPointAnalysis(@RequestParam("id") String id){
String pointAnalysis="";
if(StringUtils.isNotEmpty(id)) {
QueryWrapper<Subject> queryWrapper = new QueryWrapper<Subject>();
queryWrapper.select("point_analysis").eq("id", id);
Subject subject = subjectMapper.selectOne(queryWrapper);
pointAnalysis=subject.getPointAnalysis();
}
// JSONObject data = JSONObject.parseObject(pointAnalysis);//获取jsonobject对象
// pointAnalysis = data.getString("result");
// pointAnalysis=pointAnalysis.replace("\\","");
return pointAnalysis;
// return ResultModel.OK(pointAnalysis);
}
/**
* 事件脉络
* 查询专题动态
* @return 数据
*/
@ApiOperation(value = "事件脉络")
@GetMapping("/eventContext")
public String eventContext(@RequestParam("id") String id){
String eventContext="";
if(StringUtils.isNotEmpty(id)) {
QueryWrapper<Subject> queryWrapper = new QueryWrapper<Subject>();
queryWrapper.select("event_context").eq("id", id);
Subject subject = subjectMapper.selectOne(queryWrapper);
eventContext=subject.getEventContext();
}
// JSONObject data = JSONObject.parseObject(eventContext);//获取jsonobject对象
// eventContext = data.getString("result");
// eventContext=eventContext.replace("\\","");
return eventContext;
// return ResultModel.OK(eventContext);
}
/**
* 传播路径
* 查询专题动态
* @return 数据
*/
@ApiOperation(value = "传播路径")
@GetMapping("/propagationPath")
public String propagationPath(@RequestParam("id") String id){
String propagationPath="";
if(StringUtils.isNotEmpty(id)) {
QueryWrapper<Subject> queryWrapper = new QueryWrapper<Subject>();
queryWrapper.select("propagation_path").eq("id", id);
Subject subject = subjectMapper.selectOne(queryWrapper);
propagationPath=subject.getPropagationPath();
}
// JSONObject data = JSONObject.parseObject(propagationPath);//获取jsonobject对象
// propagationPath = data.getString("result");
// propagationPath=propagationPath.replace("\\","");
return propagationPath;
// return ResultModel.OK(propagationPath);
}
/**
* 统计分析
* 查询专题动态
* @return 数据
*/
@ApiOperation(value = "统计分析")
@GetMapping("/statisticAnalysis")
public String statisticAnalysis(@RequestParam("id") String id){
String statisticAnalysis="";
if(StringUtils.isNotEmpty(id)) {
QueryWrapper<Subject> queryWrapper = new QueryWrapper<Subject>();
queryWrapper.select("statistic_analysis").eq("id", id);
Subject subject = subjectMapper.selectOne(queryWrapper);
statisticAnalysis=subject.getStatisticAnalysis();
}
// JSONObject data = JSONObject.parseObject(statisticAnalysis);//获取jsonobject对象
// statisticAnalysis = data.getString("result");
// statisticAnalysis=statisticAnalysis.replace("\\","");
return statisticAnalysis;
// return ResultModel.OK(statisticAnalysis);
}
}
package com.zzsn.modules.kgj.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import java.io.Serializable;
@Data
@TableName(value = "CIS_SUBJECT")
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
public class Subject implements Serializable {
/*
id
*/
String id;
/*
专题名称
*/
String title;
/*
专题动态
*/
@TableField(value="suject_dy")
String sujectDy;
/*
观点分析
*/
@TableField(value="point_analysis")
String pointAnalysis;
/*
事件脉络
*/
@TableField(value="event_context")
String eventContext;
/*
传播路径
*/
@TableField(value="propagation_path")
String propagationPath;
/*
统计分析
*/
@TableField(value="statistic_analysis")
String statisticAnalysis;
}
......@@ -33,13 +33,16 @@ public interface CisAnsBasedataMapper extends BaseMapper<CisAnsBasedata> {
@DS("master")
List<CisAnsBasedata> getCisAnsBasedataList2Old(@Param("publishDate_begin") String publishDate_begin
, @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1, @Param("delflag") Long delFlag);
List<CisAnsBasedata> getCisAnsBasedataList3(@Param("publishDate_begin") String publishDate_begin
, @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1, @Param("delflag") Long delFlag,@Param("list") List<Long> webTypeList
,@Param("siteId") Long siteId,@Param("title") String title);
List<CisAnsBasedata> getCisAnsBasedataList2(@Param("publishDate_begin") String publishDate_begin
, @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1, @Param("delflag") Long delFlag,@Param("list") List<Long> webTypeList
,@Param("siteId") Long siteId);
//add lihuawei 新曾按打分查询
List<CisAnsBasedata> getCisAnsBasedataListByscore(@Param("publishDate_begin") String publishDate_begin
, @Param("publishDate_end") String publishDate_end, Integer offset, Integer offset1, @Param("min") Long min,@Param("max") Long max,@Param("list") List<Long> webTypeList
,@Param("siteId") Long siteId);
,@Param("siteId") Long siteId,@Param("title") String title, @Param("delflag")Long flag);
@DS("master")
int getCisAnsBasedataCount2Old(@Param("publishDate_begin") String publishDate_begin
, @Param("publishDate_end") String publishDate_end,Integer offset, Integer offset1, @Param("delflag")Long delFlag);
......@@ -47,11 +50,16 @@ public interface CisAnsBasedataMapper extends BaseMapper<CisAnsBasedata> {
int getCisAnsBasedataCount2(@Param("publishDate_begin") String publishDate_begin
, @Param("publishDate_end") String publishDate_end,Integer offset, Integer offset1, @Param("delflag")Long delFlag,@Param("list") List<Long> webTypeList
,@Param("siteId") Long siteId);
@DS("master")
int getCisAnsBasedataCount3(@Param("publishDate_begin") String publishDate_begin
, @Param("publishDate_end") String publishDate_end,Integer offset, Integer offset1, @Param("delflag")Long delFlag,@Param("list") List<Long> webTypeList
,@Param("siteId") Long siteId,@Param("title") String title);
@DS("master")
int getCisAnsBasedataCountByscore(@Param("publishDate_begin") String publishDate_begin
, @Param("publishDate_end") String publishDate_end,Integer offset, Integer offset1,@Param("min")Long min, @Param("max")Long max,@Param("list") List<Long> webTypeList
,@Param("siteId") Long siteId);
,@Param("siteId") Long siteId,@Param("title") String title,@Param("delflag")Long delFlag);
/**
* 功能描述: 批量查询ID
* @author chen
......@@ -72,4 +80,7 @@ public interface CisAnsBasedataMapper extends BaseMapper<CisAnsBasedata> {
List<CisAnsBasedata> selectByIds(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList);
@DS("master")
List<CisAnsBasedata> selectByOlnyIds(@Param("list") List<Long> list,@Param("webList") List<Long> webTypeList,@Param("siteId") Long siteId);
@DS("master")
List<CisAnsBasedata> selectBaseData(@Param("") List<Long> list,@Param("webList") List<Long> webTypeList,@Param("siteId") Long siteId);
}
package com.zzsn.modules.kgj.mapper;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzsn.modules.kgj.entity.Subject;
public abstract interface SubjectMapper extends BaseMapper<Subject> {
// @DS("master")
// public abstract int save(@Param("item") Subject paramBasedata);
//
// @DS("master")
// public abstract int update(@Param("item") Subject paramBasedata);
}
......@@ -117,24 +117,72 @@
and m.WEB_ID = #{siteId}
</if>
</select>
<select id="getCisAnsBasedataCountByscore" parameterType="Map" resultType="java.lang.Integer">
<select id="getCisAnsBasedataCount3" parameterType="Map" resultType="java.lang.Integer">
SELECT count(1)
FROM cis_ans_basedata 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
left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
</if>
<if test=" list!=null and list.size>0 ">
left JOIN CIS_COL_SITE_TYPE_MID s on s.SITEID =m.WEB_ID
</if>
WHERE t.tid = 16865 AND b.id>20092000000000 AND t.org_id=3942
<if test="title!=null and title!=''">
AND b.title like #{title}
</if>
<if test="publishDate_begin!=null and publishDate_begin!=''">
AND t.publish_date > #{publishDate_begin}
</if>
<if test="publishDate_end!=null and publishDate_end!=''">
AND #{publishDate_end} > t.publish_date
</if>
<if test='delflag != null and delflag!="0"'>
and t.DELFLAG = #{delflag}
</if>
<if test="list!=null and list.size>0">
and s.TYPEID in
<foreach collection="list" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</if>
<if test="siteId != null and siteId != ''">
and m.WEB_ID = #{siteId}
</if>
</select>
<select id="getCisAnsBasedataCountByscore" parameterType="Map" resultType="java.lang.Integer">
SELECT count(1)
FROM cis_ans_basedata b
left JOIN cis_ans_basedata_type t ON t.bid = b.id
left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
<!--<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
</if>-->
<if test=" list!=null and list.size>0">
left JOIN CIS_COL_SITE_TYPE_MID s on s.SITEID =m.WEB_ID
</if>
WHERE t.tid = 16865 AND b.id>20092000000000 AND t.org_id=3942
<if test="title!=null and title!=''">
AND b.title like #{title}
</if>
<if test="publishDate_begin!=null and publishDate_begin!=''">
AND t.publish_date > #{publishDate_begin}
</if>
<if test="publishDate_end!=null and publishDate_end!=''">
AND #{publishDate_end} > t.publish_date
</if>
<if test='delflag != null'>
<if test='delflag =="2" or delflag =="3" '>
and t.delflag = #{delflag}
</if>
<if test='delflag =="1"'>
and t.delflag no in ('0','2','3')
</if>
</if>
<if test='min != null and min!="0"'>
and m.secret_level >= #{min}
</if>
......@@ -236,7 +284,8 @@
WHERE ROWNUM <![CDATA[<=]]> #{offset1})
WHERE ROW_ID <![CDATA[>]]> #{offset}
</select>
<select id="getCisAnsBasedataListByscore" parameterType="Map" resultType="com.zzsn.modules.kgj.entity.CisAnsBasedata">
<select id="getCisAnsBasedataList3" parameterType="Map" resultType="com.zzsn.modules.kgj.entity.CisAnsBasedata">
SELECT *
FROM (
SELECT TMP_PAGE.*, ROWNUM ROW_ID
......@@ -257,13 +306,77 @@
<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
</if>
<if test="list!=null and list.size>0">
left JOIN CIS_COL_SITE_TYPE_MID s on s.SITEID =m.WEB_ID
</if>
WHERE t.tid = 16865 AND b.id>20092000000000 AND t.org_id=3942
<if test="title!=null and title!=''">
AND b.title like #{title}
</if>
<if test="publishDate_begin!=null and publishDate_begin!=''">
AND t.publish_date > #{publishDate_begin}
</if>
<if test="publishDate_end!=null and publishDate_end!=''">
AND #{publishDate_end} > t.publish_date
</if>
<if test='delflag != null and delflag!="0"'>
and t.DELFLAG = #{delflag}
</if>
<if test="list!=null and list.size>0">
and s.TYPEID in
<foreach collection="list" open="(" close=")" separator="," item="item">
#{item}
</foreach>
</if>
<if test="siteId != null and siteId != ''">
and m.WEB_ID = #{siteId}
</if>
order by t.publish_date desc ,t.id desc) TMP_PAGE
WHERE ROWNUM <![CDATA[<=]]> #{offset1})
WHERE ROW_ID <![CDATA[>]]> #{offset}
</select>
<select id="getCisAnsBasedataListByscore" parameterType="Map" resultType="com.zzsn.modules.kgj.entity.CisAnsBasedata">
SELECT *
FROM (
SELECT TMP_PAGE.*, ROWNUM ROW_ID
FROM (
SELECT b.id,
t.publish_date,
b.title,
b.content,
t.match_keywords AS keywords,
b.origin,
b.sourceaddress,
b.author,
b.summary,
b.locale,
b.CONTENT_NO_TAG,
b.reliability,
t.delflag
FROM cis_ans_basedata b
left JOIN cis_ans_basedata_type t ON t.bid = b.id
left JOIN CIS_BASEDATA_WEB_MID m on b.ID=m.BID
<!--<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
</if> -->
<if test=" list!=null and list.size>0">
left JOIN CIS_COL_SITE_TYPE_MID s on s.SITEID =m.WEB_ID
</if>
WHERE t.tid = 16865 AND b.id>20092000000000 AND t.org_id=3942
<if test="title!=null and title!=''">
AND b.title like #{title}
</if>
<if test="publishDate_begin!=null and publishDate_begin!=''">
AND t.publish_date > #{publishDate_begin}
</if>
<if test='delflag != null'>
<if test='delflag =="2" or delflag =="3" '>
and t.delflag = #{delflag}
</if>
<if test='delflag =="1"'>
and t.delflag no in ('0','2','3')
</if>
</if>
<if test="publishDate_end!=null and publishDate_end!=''">
AND #{publishDate_end} > t.publish_date
</if>
......@@ -273,6 +386,7 @@
<if test='max != null and max!="0"'>
and m.secret_level &lt;= #{max}
</if>
<if test="list!=null and list.size>0">
and s.TYPEID in
<foreach collection="list" open="(" close=")" separator="," item="item">
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zzsn.modules.kgj.mapper.SubjectMapper">
<resultMap id="basedataMap" type="com.zzsn.modules.kgj.entity.Subject" >
<result property="id" column="ID" />
<result property="title" column="title" />
<result property="sujectDy" column="suject_dy" />
<result property="pointAnalysis" column="point_analysis" />
<result property="eventContext" column="event_context" />
<result property="propagationPath" column="propagation_path" />
<result property="statisticAnalysis" column="statistic_analysis" />
</resultMap>
</mapper>
\ No newline at end of file
......@@ -22,6 +22,7 @@ public interface ICisAnsBasedataService extends IService<CisAnsBasedata>, Runnab
*/
Page<CisAnsBasedata> findEsByKey(BaseDataDto baseDataDto);
Page<CisAnsBasedata> findEsByKey(BaseDataDto baseDataDto, List<Long> webTypeList);
Page<CisAnsBasedata> findByKey(BaseDataDto baseDataDto, List<Long> webTypeList);
/**
* 审核保存
......
package com.zzsn.modules.kgj.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzsn.modules.kgj.entity.Subject;
public interface SubjectService extends IService<Subject> {
}
......@@ -241,17 +241,16 @@ public class CisAnsBasedataServiceImpl extends ServiceImpl<CisAnsBasedataMapper,
boolQuery.filter(rangeQuery);
}
//add lihuawei 增加分数条件
if(baseDataDto.getMax()>0||baseDataDto.getMin()>0){
RangeQueryBuilder scoreQuery = QueryBuilders.rangeQuery("publishDate");
scoreQuery.gt(baseDataDto.getMin());
if(baseDataDto.getMax()>0){
scoreQuery.lt(baseDataDto.getMax());
}
boolQuery.filter(scoreQuery);
}
// if(baseDataDto.getMax()>0||baseDataDto.getMin()>0){
//
// RangeQueryBuilder scoreQuery = QueryBuilders.rangeQuery("publishDate");
// scoreQuery.gt(baseDataDto.getMin());
// if(baseDataDto.getMax()>0){
//
// scoreQuery.lt(baseDataDto.getMax());
// }
// boolQuery.filter(scoreQuery);
// }
//打印e查询语句
System.out.println(boolQuery.toString());
......@@ -296,6 +295,12 @@ public class CisAnsBasedataServiceImpl extends ServiceImpl<CisAnsBasedataMapper,
return page;
}
@Override
public Page<CisAnsBasedata> findByKey(BaseDataDto baseDataDto, List<Long> webTypeList) {
return null;
}
/**
* 涉密信息确认保存
* @param cisAnsBasedata
......@@ -345,6 +350,7 @@ public class CisAnsBasedataServiceImpl extends ServiceImpl<CisAnsBasedataMapper,
}
}
}
//3.保存的时候同步信息到es库
Basedata basedata = baseDataMapper.queryById(cisAnsBasedata.getId());
basedata.setContent(null);
......@@ -358,12 +364,12 @@ public class CisAnsBasedataServiceImpl extends ServiceImpl<CisAnsBasedataMapper,
if(StringUtils.isNotBlank(cisAnsBasedata.getLocale())){
basedata.setLocale(cisAnsBasedata.getLocale());
}
String s = JSON.toJSONString(basedata);
boolean kgj = esOpUtil.docUpdateById("kgj", String.valueOf(cisAnsBasedata.getId()), s);
if(!kgj){
logger.info("审核信息更新es库失败!");
throw new RuntimeException("审核信息确认保存失败");
}
// String s = JSON.toJSONString(basedata);
// boolean kgj = esOpUtil.docUpdateById("kgj", String.valueOf(cisAnsBasedata.getId()), s);
// if(!kgj){
// logger.info("审核信息更新es库失败!");
// throw new RuntimeException("审核信息确认保存失败");
// }
}
/**
......
package com.zzsn.modules.kgj.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzsn.modules.kgj.entity.Subject;
import com.zzsn.modules.kgj.mapper.SubjectMapper;
import com.zzsn.modules.kgj.service.SubjectService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject>
implements SubjectService
{
private static final Logger log = LoggerFactory.getLogger(SubjectServiceImpl.class);
@Autowired
private SubjectMapper subjectMapper;
}
\ No newline at end of file
......@@ -93,11 +93,14 @@ zzsn:
es:
host: localhost
port: 9200
userName: elastic
passWord: zzsn9988
userName:
passWord:
# userName: elastic
# passWord: zzsn9988
#是否开启集群
clusterIsStart: true
url: 114.115.215.250:9700,114.115.215.250:9701,114.115.136.255:9700
clusterIsStart: false
url: 127.0.0.1:9200
# url: 114.115.215.250:9700,114.115.215.250:9701,114.115.136.255:9700
# #库中索引名称,非库中所建索引不让操作
indexs: kgj
......@@ -238,14 +241,19 @@ spring:
datasource:
master:
#url: jdbc:oracle:thin:@1.203.103.158:1521:orcl
#url: jdbc:oracle:thin:@192.168.10.10:1521:orcl
#username: cis
#password: cis
url: jdbc:oracle:thin:@localhost:1521:orcl
username: cis
password: cis
# username: kegongju
# password: kegongju
# driver-class-name: oracle.jdbc.driver.OracleDriver
url: jdbc:oracle:thin:@127.0.0.1:1521:orcl
# url: jdbc:mysql://localhost:3306/cis?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
# url: jdbc:oracle:thin:@192.168.1.65:1521:orcl
username: kegongju
password: kegongju
# username: root
# password: root
# username: kegongju
# password: kegongju
# driver-class-name: com.mysql.jdbc.Driver
driver-class-name: oracle.jdbc.driver.OracleDriver
# 多数据源配置
# multi-datasource1:
......@@ -338,5 +346,7 @@ management:
enabled: false
file:
imgPath:
tupu:
secretkrul: http://127.0.0.1:8018/Text/similarity/
graphkrul: http://127.0.0.1:8018/Text/graph/
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论