APIJSON 同表批量插入 和删除报错

hgtggwj0  于 4个月前  发布在  其他
关注(0)|答案(4)|浏览(115)

APIJSON Version/APIJSON 版本号

6.1.0

Database Type & Version/数据库类型及版本号

5.7mysql

Environment/环境信息

- JDK/基础库: 1.8
- OS/系统:windows

APIAuto Screenshots/APIAuto 请求与结果完整截屏

Current Behavior/问题描述

crud 批量插入 和批量删除同一个表 提示错误

Expected Behavior/期望结果

crud 批量插入 和批量删除同一个表 可以执行

Any additional comments?/其它补充说明?

No response

mum43rcc

mum43rcc1#

这是一种解决办法,但是不是理想的

9rygscc1

9rygscc12#

@wahowaho
配置别名进行区分即可

sdnqo3pr

sdnqo3pr3#

@wahowaho 配置别名进行区分即可

这个是怎么配置的呀?我一直都试不出来

nlejzf6q

nlejzf6q4#

@awanghong
http://localhost:8080/forms/api/crud

{
    "@put": {
        "App_sys_user_1": {
            "tag": "App_sys_user_1"
        }
    },
    "@post": {
        "App_sys_user_post_1[]": {
            "tag": "App_sys_user_post_1[]"
        },
        "App_sys_user_role_1[]": {
            "tag": "App_sys_user_role_1[]"
        }
    },
    "@delete": {
        "App_sys_user_post_1:delUserPost": {
            "tag": "App_sys_user_post_1:delUserPost"
        },
        "App_sys_user_role_1:delUserRole": {
            "tag": "App_sys_user_role_1:delUserRole"
        }
    },
    "format": true,
    "@explain": true,
    "App_sys_user_1": {
        "id": "4732209c-5785-4827-b532-5092f154fd94",
        "nick_name": "1",
        "dept_id": "13d99300-c387-4345-a9df-9dd1ca7a1b28",
        "phonenumber": "1388888888",
        "email": "tt.t@qq.com",
        "user_name": "test",
        "password": "123456",
        "user_type": "00",
        "sex": 0,
        "status": 0,
        "remark": "test"
    },
    "App_sys_user_post_1[]": [
        {
            "user_id@": "App_sys_user_1/id",
            "post_id": "23ad79f3-7724-49be-8b5a-8031e562ee11"
        },
        {
            "user_id@": "App_sys_user_1/id",
            "post_id": "a98f1ea2-f383-4a21-9894-5f02806e9a012"
        }
    ],
    "App_sys_user_role_1[]": [
        {
            "user_id@": "App_sys_user_1/id",
            "role_id": "a824a122-bb8f-4656-b789-9d96d6dfd611"
        }
    ],
    "App_sys_user_post_1:delUserPost": {
        "user_id{}": [
            "4732209c-5785-4827-b532-5092f154fd94"
        ],
        "post_id{}": [
            "266d44e4-b74e-4f2d-a465-271aa5698625"
        ]
    },
    "App_sys_user_role_1:delUserRole": {
        "user_id{}": [
            "4732209c-5785-4827-b532-5092f154fd94"
        ],
        "role_id{}": [
            "a824a122-bb8f-4656-b789-9d96d6dfd611"
        ]
    },
    "@role": "LOGIN,OWNER,ADMIN"
}

Request 数据库需要配置别名(update、delete、put, get不用配置)

相关问题