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

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

APIJSON Version/APIJSON 版本号

6.1.0

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

5.7mysql

Environment/环境信息

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

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

Current Behavior/问题描述

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

Expected Behavior/期望结果

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

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

No response

mum43rcc

mum43rcc1#

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

9rygscc1

9rygscc12#

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

sdnqo3pr

sdnqo3pr3#

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

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

nlejzf6q

nlejzf6q4#

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

  1. {
  2. "@put": {
  3. "App_sys_user_1": {
  4. "tag": "App_sys_user_1"
  5. }
  6. },
  7. "@post": {
  8. "App_sys_user_post_1[]": {
  9. "tag": "App_sys_user_post_1[]"
  10. },
  11. "App_sys_user_role_1[]": {
  12. "tag": "App_sys_user_role_1[]"
  13. }
  14. },
  15. "@delete": {
  16. "App_sys_user_post_1:delUserPost": {
  17. "tag": "App_sys_user_post_1:delUserPost"
  18. },
  19. "App_sys_user_role_1:delUserRole": {
  20. "tag": "App_sys_user_role_1:delUserRole"
  21. }
  22. },
  23. "format": true,
  24. "@explain": true,
  25. "App_sys_user_1": {
  26. "id": "4732209c-5785-4827-b532-5092f154fd94",
  27. "nick_name": "1",
  28. "dept_id": "13d99300-c387-4345-a9df-9dd1ca7a1b28",
  29. "phonenumber": "1388888888",
  30. "email": "tt.t@qq.com",
  31. "user_name": "test",
  32. "password": "123456",
  33. "user_type": "00",
  34. "sex": 0,
  35. "status": 0,
  36. "remark": "test"
  37. },
  38. "App_sys_user_post_1[]": [
  39. {
  40. "user_id@": "App_sys_user_1/id",
  41. "post_id": "23ad79f3-7724-49be-8b5a-8031e562ee11"
  42. },
  43. {
  44. "user_id@": "App_sys_user_1/id",
  45. "post_id": "a98f1ea2-f383-4a21-9894-5f02806e9a012"
  46. }
  47. ],
  48. "App_sys_user_role_1[]": [
  49. {
  50. "user_id@": "App_sys_user_1/id",
  51. "role_id": "a824a122-bb8f-4656-b789-9d96d6dfd611"
  52. }
  53. ],
  54. "App_sys_user_post_1:delUserPost": {
  55. "user_id{}": [
  56. "4732209c-5785-4827-b532-5092f154fd94"
  57. ],
  58. "post_id{}": [
  59. "266d44e4-b74e-4f2d-a465-271aa5698625"
  60. ]
  61. },
  62. "App_sys_user_role_1:delUserRole": {
  63. "user_id{}": [
  64. "4732209c-5785-4827-b532-5092f154fd94"
  65. ],
  66. "role_id{}": [
  67. "a824a122-bb8f-4656-b789-9d96d6dfd611"
  68. ]
  69. },
  70. "@role": "LOGIN,OWNER,ADMIN"
  71. }

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

展开查看全部

相关问题