parent
3563aaae96
commit
c4ed69a7ba
|
@ -402,10 +402,8 @@ public class ApiMappingBillPlugin extends AbstractFormPlugin implements Plugin {
|
|||
if ("String".equals(tartype)) {
|
||||
jsonObject.put(key, value);
|
||||
} else if ("Date".equals(tartype)) {
|
||||
// 将字符串时间戳转换为长整型
|
||||
long timestamp = Long.parseLong((String) value);
|
||||
// 创建一个Date对象
|
||||
Date date = new Date(timestamp);
|
||||
Date date = new Date((Long) value);
|
||||
// 创建一个SimpleDateFormat对象,指定格式为"yyyy-MM-dd"
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
jsonObject.put(key, sdf.format(date));
|
||||
|
|
Loading…
Reference in New Issue