提交内容:API映射公共单据

备注:关于日期字段修改
提交人:邹江涛
This commit is contained in:
zoujiangtao 2024-12-10 10:14:41 +08:00
parent 3563aaae96
commit c4ed69a7ba
1 changed files with 1 additions and 3 deletions

View File

@ -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));