Skip to content

[问题咨询] 同一个json请求中,同时新增和删除 #809

Closed

Description

@zc0707

Description

请求CURD方法参数:{
"@post": ["MobilizeTaskInfo[]"],
"MobilizeTaskInfo": {
"id{}": ["09a7a740-1935-469a-ab76-ea1ee1f94ddc"]
},
"@delete": ["MobilizeTaskInfo"],
"MobilizeTaskInfo[]": [{
"leading_unit_name": "市交通局",
"serial_number": "GD2025-064",
"task_content": "提前勘察部队过境路线,确保道路具备安全通行条件",
"issue_time": "2025-04-09 15:51:06",
"predict_end_time": "2025年3月31日上午10:00前完成",
"status": 1
}]
}
报错信息:服务器内部错误:getColumnString 不支持 CRUD 等 [GET,GETS,HEAD,HEADS,POST] 外的ReuqestMethod!
版本号:6.3.0

Activity

  1. changed the title [-][问题咨询] 同一个josn请求中,同时新增和删除[/-] [+][问题咨询] 同一个json请求中,同时新增和删除[/+] on Apr 9, 2025
  2. TommyLemon commented on Apr 11, 2025

    @TommyLemon
    Member

    @zc0707 @post, @delete 等对应值只支持 String 和 JSONObject
    https://github.com/Tencent/APIJSON/blob/master/README-extend.md

    Image

    POST http://apijson.cn:8080/crud

    {
        "@delete": "Moment:Moment", // 目前 7.0.3+ 有 bug,不支持直接写 Table 来省略 tag,而是必须 Table:tag
        "Moment": { // 目前 7.0.3+ 有 bug,会把要删除的记录查出来返回,而不是删除,改成 6.3.0 等其它版本试试
            "id": 1719226824391
        },
        "@post": "Comment[]",
        "Comment[]": [
            {
                "momentId": 12,
                "content": "test post comment"
            },
            {
                "momentId": 12,
                "content": "test post comment2"
            }
        ]
    }

    http://apijson.cn/api

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions