bug修复

This commit is contained in:
yuezhihang
2022-02-24 17:55:22 +08:00
parent 7c271fa204
commit af11a626df
7 changed files with 57 additions and 27 deletions
@@ -106,10 +106,16 @@ public class FieldConvertUtil {
if (StringUtils.isNotBlank(timeStr)) {
List<String> timeList = Arrays.asList(timeStr.split(","));
List<String> collect = timeList.stream()
.map(item -> "str_to_date('" + item + "','%Y-%m-%d')")
.collect(Collectors.toList());
List<String> collect;
if (timeStr.length()<=10) {
collect = timeList.stream()
.map(item -> "str_to_date('" + item + "','%Y-%m-%d')")
.collect(Collectors.toList());
}else {
collect = timeList.stream()
.map(item -> "str_to_date('" + item.substring(0,10) + "','%Y-%m-%d ')")
.collect(Collectors.toList());
}
timeStr ="concat(" + String.join(", \',\' ,", collect) + ")";
} else {
timeStr = "null";