Merge remote-tracking branch 'origin/master'
This commit is contained in:
+3
-1
@@ -25,6 +25,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
@@ -77,7 +78,8 @@ public class SysDictItemController {
|
|||||||
try {
|
try {
|
||||||
sysDictItem.setCreateTime(new Date());
|
sysDictItem.setCreateTime(new Date());
|
||||||
sysDictItem.setDelFlag(CommonConstant.DEL_FLAG_0);
|
sysDictItem.setDelFlag(CommonConstant.DEL_FLAG_0);
|
||||||
sysDictItem.setItemValue(String.valueOf(RandomUtils.nextLong()));
|
sysDictItem.setItemValue(UUID.randomUUID().toString().replace("-", ""));
|
||||||
|
// sysDictItem.setItemValue(String.valueOf(RandomUtils.nextLong()));
|
||||||
sysDictItem.setStatus(1);
|
sysDictItem.setStatus(1);
|
||||||
sysDictItemService.save(sysDictItem);
|
sysDictItemService.save(sysDictItem);
|
||||||
result.success("保存成功!");
|
result.success("保存成功!");
|
||||||
|
|||||||
+21
-7
@@ -300,16 +300,30 @@ public class DocumentSearchServiceImpl implements IDocumentSearchService {
|
|||||||
String key = entry.getKey();
|
String key = entry.getKey();
|
||||||
String value = (String) entry.getValue();
|
String value = (String) entry.getValue();
|
||||||
if (ObjectUtils.isNotEmpty(value)) {
|
if (ObjectUtils.isNotEmpty(value)) {
|
||||||
for (String s : value.split(",")) {
|
Map<String, Object> queryMap = new HashMap<>();
|
||||||
Map<String, Object> queryMap = new HashMap<>();
|
Map<String, Object> queryMapTemp = new HashMap<>();
|
||||||
Map<String, Object> queryMapTemp = new HashMap<>();
|
queryMapTemp.put(key, "*"+value.replaceAll(",","*")+"*");
|
||||||
queryMapTemp.put(key, s);
|
// queryMapTemp.put(key, "*"+value+"*");
|
||||||
queryMap.put("match_phrase", queryMapTemp);
|
queryMap.put("wildcard", queryMapTemp);
|
||||||
must.add(queryMap);
|
must.add(queryMap);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// if (ObjectUtils.isNotEmpty(otherMap)) {
|
||||||
|
// for (Map.Entry<String, Object> entry : otherMap.entrySet()) {
|
||||||
|
// String key = entry.getKey();
|
||||||
|
// String value = (String) entry.getValue();
|
||||||
|
// if (ObjectUtils.isNotEmpty(value)) {
|
||||||
|
// for (String s : value.split(",")) {
|
||||||
|
// Map<String, Object> queryMap = new HashMap<>();
|
||||||
|
// Map<String, Object> queryMapTemp = new HashMap<>();
|
||||||
|
// queryMapTemp.put(key, s);
|
||||||
|
// queryMap.put("match_phrase", queryMapTemp);
|
||||||
|
// must.add(queryMap);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
//封装时间类型字段查询(时间范围)
|
//封装时间类型字段查询(时间范围)
|
||||||
if (ObjectUtils.isNotEmpty(dateMap)) {
|
if (ObjectUtils.isNotEmpty(dateMap)) {
|
||||||
for (Map.Entry<String, Object> entry : dateMap.entrySet()) {
|
for (Map.Entry<String, Object> entry : dateMap.entrySet()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user