新增标准与修改标准 插入数据库取消时分秒

This commit is contained in:
zhaokaiyao@91isoft.com
2021-12-09 10:07:20 +08:00
parent c4eb74a211
commit ab07fbf9ce
@@ -108,7 +108,7 @@ public class FieldConvertUtil {
List<String> timeList = Arrays.asList(timeStr.split(",")); List<String> timeList = Arrays.asList(timeStr.split(","));
List<String> collect = timeList.stream() List<String> collect = timeList.stream()
.map(item -> "str_to_date('" + item + "','%Y-%m-%d %H:%i:%s')") .map(item -> "str_to_date('" + item + "','%Y-%m-%d')")
.collect(Collectors.toList()); .collect(Collectors.toList());
timeStr ="concat(" + String.join(", \',\' ,", collect) + ")"; timeStr ="concat(" + String.join(", \',\' ,", collect) + ")";
} else { } else {
@@ -143,7 +143,7 @@ public class FieldConvertUtil {
String mustValue = "'"+ UUIDUtils.randomUUID20() + "','" + id + "','0','" String mustValue = "'"+ UUIDUtils.randomUUID20() + "','" + id + "','0','"
+ LoginUserUtil.getUserId() + "'"; + LoginUserUtil.getUserId() + "'";
Date date = new Date(); Date date = new Date();
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
String nowTime = sf.format(date); String nowTime = sf.format(date);
String timeValue = "," + changeTimeValue(nowTime); String timeValue = "," + changeTimeValue(nowTime);
mustValue += timeValue + timeValue; mustValue += timeValue + timeValue;