提交 303f7c07 作者: ZhangJingKun

bug修改

上级 113796bb
......@@ -45,7 +45,7 @@ public class QiyegaoguanExcutor implements CommandLineRunner {
@Override
public void run(String... args) {
scheduledExecutorService.scheduleAtFixedRate(()->{
run2();
//run2();
},5,PERIOD, TimeUnit.SECONDS);
}
......
......@@ -84,16 +84,6 @@ public class CharacterDetailsController {
log.info("根据关联咨询索引和id查询咨询详情:{}---{}", index, id);
if(id == null || "".equals(id))
return Result.error("id不能为空!");
if(index == null || "".equals(index)){
String[] arr = id.split(",");
if(arr.length == 2){
index = arr[0];
id = arr[1];
} else {
return Result.error("索引有误!");
}
}
return esServer.getInformation(index, id);
}
......
......@@ -59,11 +59,11 @@ public class EsServer {
public Result<?> getRelatedReportsList(RelatedReportsVo relatedReportsVo){
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
MultiMatchQueryBuilder multiMatchQueryBuilder = QueryBuilders.multiMatchQuery(relatedReportsVo.getKeyword(), "title", "content", "summary");
searchSourceBuilder.query(multiMatchQueryBuilder);
//MultiMatchQueryBuilder multiMatchQueryBuilder = QueryBuilders.multiMatchQuery(relatedReportsVo.getKeyword(), "title", "content", "summary");
//searchSourceBuilder.query(multiMatchQueryBuilder);
//searchSourceBuilder.sort("publishDate", SortOrder.DESC);//如果按发布时间排序,则会出现排在最前面的信息和关键词相关度不高
//高亮
//HighlightBuilder highlightBuilder = new HighlightBuilder();
searchSourceBuilder.query(QueryBuilders.termsQuery("content", relatedReportsVo.getKeyword()));
Page<SubjectInfoVo> page = null;
try {
......
......@@ -73,7 +73,10 @@ public class CharacterInfoServiceImpl implements CharacterInfoService {
//标签存储
String tagId = characterVo.getTagId();
String[] tagIdArr = tagId.split(",");
String[] tagIdArr = new String[0];
if(tagId != null && tagId.length() > 0){
tagIdArr = tagId.split(",");
}
List<CharacterTagMap> list = new ArrayList<>();
for (String s : tagIdArr) {
CharacterTagMap characterTagMap = new CharacterTagMap();
......@@ -172,7 +175,10 @@ public class CharacterInfoServiceImpl implements CharacterInfoService {
characterTagMapService.delByUid(characterVo.getUid());
//增加新的
String tagId = characterVo.getTagId();
String[] tagIdArr = tagId.split(",");
String[] tagIdArr = new String[0];
if(tagId != null && tagId.length() > 0){
tagIdArr = tagId.split(",");
}
List<CharacterTagMap> list = new ArrayList<>();
for (String s : tagIdArr) {
CharacterTagMap characterTagMap = new CharacterTagMap();
......@@ -437,7 +443,7 @@ public class CharacterInfoServiceImpl implements CharacterInfoService {
//状态为可用
characterVo.setStatus(1L);
//type状态取消
characterVo.setMergeStatus(-1L);
characterVo.setMergeStatus(0L);
//审核状态置为未审核
characterVo.setCheckResult(-1L);
this.edit(characterVo);
......
......@@ -111,11 +111,12 @@
ON b.type_id = c.id
where 1 = 1
and (b.status = 1 or b.status IS NULL)
AND b.article_id like '%${articleId}%'
AND b.article_id = '${articleId}'
and a.category != '企业高管'
<if test="checkResult != null and checkResult != ''">
AND b.check_result in ${checkResult}
</if>
order by b.id
AND b.check_result in ${checkResult}
</if>
order by a.id
</select>
......
......@@ -2,18 +2,28 @@ package com.zzsn.leaderbase;
import com.alibaba.fastjson.JSONArray;
import com.zzsn.leaderbase.service.IGeneratorIdService;
import org.apache.commons.lang3.time.DateUtils;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.BoundListOperations;
import org.springframework.data.redis.core.RedisTemplate;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
@SpringBootTest
class LeaderBaseApplicationTests {
public static void main(String[] args) {
String s = "";
String[] arr = s.split(",");
System.out.println(111);
}
@Autowired
private RedisTemplate redisTemplate;
......@@ -50,14 +60,18 @@ class LeaderBaseApplicationTests {
}
public static void main(String[] args) {
StringBuffer sb = new StringBuffer();
String s = sb.toString();
System.out.println(s);
public static boolean isValidDate(String deeStr, String[] fromats){
try {
DateUtils.parseDateStrictly(deeStr, fromats);
return true;
} catch (ParseException e) {
return false;
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论