fix:79049
This commit is contained in:
+18
-14
@@ -125,7 +125,10 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
@Transactional(rollbackFor = JeroBootException.class)
|
@Transactional(rollbackFor = JeroBootException.class)
|
||||||
public IPage<LawsHomeNormalSearchVO> getNormalSearchTitlePage(LawsHomeNormalSearchDTO lawsHomeNormalSearchDTO,
|
public IPage<LawsHomeNormalSearchVO> getNormalSearchTitlePage(LawsHomeNormalSearchDTO lawsHomeNormalSearchDTO,
|
||||||
Integer pageNo,Integer pageSize) {
|
Integer pageNo,Integer pageSize) {
|
||||||
String searchContent = checkSearchContent(lawsHomeNormalSearchDTO);
|
String searchContent = lawsHomeNormalSearchDTO.getSearchContent();
|
||||||
|
if (StringUtils.isBlank(searchContent)) {
|
||||||
|
return new Page<>(pageNo, pageSize);
|
||||||
|
}
|
||||||
// 添加检索历史
|
// 添加检索历史
|
||||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
LawsHomeNormalSearchHistory lawsHomeNormalSearchHistory = new LawsHomeNormalSearchHistory();
|
LawsHomeNormalSearchHistory lawsHomeNormalSearchHistory = new LawsHomeNormalSearchHistory();
|
||||||
@@ -443,7 +446,11 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LawsHomeNormalSearchStatisticsVO getNormalSearchTitleCount(LawsHomeNormalSearchDTO lawsHomeNormalSearchDTO) {
|
public LawsHomeNormalSearchStatisticsVO getNormalSearchTitleCount(LawsHomeNormalSearchDTO lawsHomeNormalSearchDTO) {
|
||||||
String searchContent = checkSearchContent(lawsHomeNormalSearchDTO);
|
LawsHomeNormalSearchStatisticsVO obj = new LawsHomeNormalSearchStatisticsVO();
|
||||||
|
String searchContent = lawsHomeNormalSearchDTO.getSearchContent();
|
||||||
|
if (StringUtils.isBlank(searchContent)) {
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
QueryWrapper<LawsHomeNormalSearchDTO> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<LawsHomeNormalSearchDTO> queryWrapper = new QueryWrapper<>();
|
||||||
String[] text = searchContent.split(BLANK_SPACE);
|
String[] text = searchContent.split(BLANK_SPACE);
|
||||||
queryWrapper.and(s->{
|
queryWrapper.and(s->{
|
||||||
@@ -463,7 +470,7 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardState()),"instr(concat(',',standard_state,','),concat(',','" + lawsHomeNormalSearchDTO.getStandardState() + str,0);
|
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardState()),"instr(concat(',',standard_state,','),concat(',','" + lawsHomeNormalSearchDTO.getStandardState() + str,0);
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardCode()),"instr(concat(',',standard_code,','),concat(',','" + lawsHomeNormalSearchDTO.getStandardCode() + str,0);
|
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getStandardCode()),"instr(concat(',',standard_code,','),concat(',','" + lawsHomeNormalSearchDTO.getStandardCode() + str,0);
|
||||||
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getGradeClassification()),"instr(concat(',',grade_classification,','),concat(',','" + lawsHomeNormalSearchDTO.getGradeClassification() + str,0);
|
queryWrapper.gt(!StringUtils.isEmpty(lawsHomeNormalSearchDTO.getGradeClassification()),"instr(concat(',',grade_classification,','),concat(',','" + lawsHomeNormalSearchDTO.getGradeClassification() + str,0);
|
||||||
LawsHomeNormalSearchStatisticsVO obj = new LawsHomeNormalSearchStatisticsVO();
|
|
||||||
switch (lawsHomeNormalSearchDTO.getResourceType()){
|
switch (lawsHomeNormalSearchDTO.getResourceType()){
|
||||||
case LawsHomeSearchCommon.LAWS_DOMESTIC_STANDARD:
|
case LawsHomeSearchCommon.LAWS_DOMESTIC_STANDARD:
|
||||||
List<LawsHomeNormalSearchCountVO> list1 = lawsHomeSearchMapper.getCount1(queryWrapper);
|
List<LawsHomeNormalSearchCountVO> list1 = lawsHomeSearchMapper.getCount1(queryWrapper);
|
||||||
@@ -570,7 +577,10 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<LawsHomeNormalSearchVO> getNormalSearchAllPage(LawsHomeNormalSearchDTO homeNormalSearchDTO,Integer pageNo,Integer pageSize) {
|
public IPage<LawsHomeNormalSearchVO> getNormalSearchAllPage(LawsHomeNormalSearchDTO homeNormalSearchDTO,Integer pageNo,Integer pageSize) {
|
||||||
String searchContent = checkSearchContent(homeNormalSearchDTO);
|
String searchContent = homeNormalSearchDTO.getSearchContent();
|
||||||
|
if (StringUtils.isBlank(searchContent)) {
|
||||||
|
return new Page<>(pageNo, pageSize);
|
||||||
|
}
|
||||||
// 添加检索历史
|
// 添加检索历史
|
||||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
LawsHomeNormalSearchHistory lawsHomeNormalSearchHistory = new LawsHomeNormalSearchHistory();
|
LawsHomeNormalSearchHistory lawsHomeNormalSearchHistory = new LawsHomeNormalSearchHistory();
|
||||||
@@ -722,15 +732,6 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
private String checkSearchContent(LawsHomeNormalSearchDTO homeNormalSearchDTO) {
|
|
||||||
String searchContent = homeNormalSearchDTO.getSearchContent();
|
|
||||||
if (StringUtils.isBlank(searchContent)) {
|
|
||||||
throw new JeroBootException(ResultCommon.PLEASE_SEARCH_TO_IMPORT);
|
|
||||||
}
|
|
||||||
return searchContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private IPage getIPage(JSONArray queryMapJson,Map<String,Object> highlightMap, Integer pageNo, Integer pageSize,
|
private IPage getIPage(JSONArray queryMapJson,Map<String,Object> highlightMap, Integer pageNo, Integer pageSize,
|
||||||
@@ -839,7 +840,10 @@ public class LawsHomeSearchServiceImpl implements ILawsHomeSearchService {
|
|||||||
@Override
|
@Override
|
||||||
public LawsHomeNormalSearchStatisticsVO getNormalSearchAllCount(LawsHomeNormalSearchDTO homeNormalSearchDTO) {
|
public LawsHomeNormalSearchStatisticsVO getNormalSearchAllCount(LawsHomeNormalSearchDTO homeNormalSearchDTO) {
|
||||||
LawsHomeNormalSearchStatisticsVO obj = new LawsHomeNormalSearchStatisticsVO();
|
LawsHomeNormalSearchStatisticsVO obj = new LawsHomeNormalSearchStatisticsVO();
|
||||||
String searchContent = checkSearchContent(homeNormalSearchDTO);
|
String searchContent = homeNormalSearchDTO.getSearchContent();
|
||||||
|
if (StringUtils.isBlank(searchContent)) {
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
//判断索引是否存在
|
//判断索引是否存在
|
||||||
boolean flagTemp;
|
boolean flagTemp;
|
||||||
|
|||||||
Reference in New Issue
Block a user