mysql数据库中createTime字段类型为timestamp,在mybatis查询中使用String来接收,去掉时间中最后的.0
list.stream().forEach(it->{
String time= it.getCreateTime();
if(StringUtils.isNotEmpty(time)){
it.setCreateTime(time.substring(0,time.lastIndexOf(".")));
}
}
上一篇:CDATA
Copyright © 叮叮声的奶酪 版权所有
备案号:鄂ICP备17018671号-1