代码如下:
LocalDateTime now = LocalDateTime.now();
// 定义格式:yyyy-MM-dd;H:mm:ss (H 表示小时不补零,若需要补零用 HH)
DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd;H:mm:ss");
String formatted2 = now.format(formatter2); // 例如:2023-02-21;9:58:23
// 构建消息
MsgContentVo msgContentVo = new MsgContentVo.ContentBuilder()
.builderContent("thing9", projectInfoName)
.builderContent("thing2", username)
.builderContent("time6", formatted2)
.build();
错误信息: URI[bba1e16f-fb2d-4946-a8fc-7a62d29d1564] elapsed time:1005 ms RESPONSE DATA:{"errcode":47003,"errmsg":"argument invalid! data.time6.value invalid rid: 69b91e12-134b528e-420e9da8"}

{"touser":"oEHcT1dmbHYXYM0A2wNiKHbPl1l4","template_id":"VllxdFNeOV37ZnkUdZ2IqOPv3kuQnqwySDVL3k-F3D4","miniprogram":{"appid":"wxbe11741655071965","pagepath":null},"url":"pages/manage/index","data":{"thing9":{"value":"黑白灰工作室","color":"#173177"},"thing2":{"value":"测试啦","color":"#173177"},"time6":{"value":"2026-03-17;17:25:34","color":"#173177"}}}
明显time值有问题,把;去掉
LocalDateTime now = LocalDateTime.now();
// 定义格式:yyyy-MM-dd;H:mm:ss (H 表示小时不补零,若需要补零用 HH)
DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd;H:mm:ss");
String formatted2 = now.format(formatter2); // 例如:2023-02-21;9:58:23
// 构建消息
MsgContentVo msgContentVo = new MsgContentVo.ContentBuilder()
.builderContent("thing9", projectInfoName)
.builderContent("thing2", username)
.builderContent("time6", formatted2)
.build();