收藏
回答

模板消息报错47003?

代码如下:

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"}

最后一次编辑于  03-18
回答关注问题邀请回答
收藏

2 个回答

  • 社区技术运营专员--许涛
    社区技术运营专员--许涛
    03-18

    {"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值有问题,把;去掉

    03-18
    有用
    回复 2
    • 鑫。
      鑫。
      03-19
      但是模版消息的示例上面有  ;, 那就是示例的问题吗
      03-19
      回复
    • 社区技术运营专员--许涛
      社区技术运营专员--许涛
      03-19回复鑫。
      示例上并没有多余的 “;”
      03-19
      回复
  • 智能回答 智能回答 本次回答由AI生成
    03-18
    有用
    回复 1
    • 鑫。
      鑫。
      03-18
      代码:  
      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();
      03-18
      回复
登录 后发表内容