Tencent / APIJSON

🏆 实时 零代码、全功能、强安全 ORM 库 🚀 后端接口和文档零代码,前端(客户端) 定制返回 JSON 的数据和结构 🏆 Real-Time coding-free, powerful and secure ORM 🚀 providing APIs and Docs without coding by Backend, and the returned JSON of API can be customized by Frontend(Client) users
http://apijson.cn
Other
17.27k stars 2.16k forks source link

6.1.0版本 crud 接口使用问题咨询 #593

Open awanghong opened 1 year ago

awanghong commented 1 year ago

APIJSON Version/APIJSON 版本号 6.1.0

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

Environment/环境信息

{ "@POST": { "WhP": { "tag": "WhP" }, "WhZ[]": { "tag": "WhZ:[]" } }, "WhP": { "name": "叶赫那拉·伟3" }, "WhZ[]": [ { "address": "高新区3", "foreign_id@": "WhP/id" }, { "address": "新区3", "foreign_id@": "WhP/id" } ], "@DELETE": { "WhZ:del": { "tag": "WhZ[]" } }, "WhZ": { "id{}": [ 143, 144 ] }, "tag": "WhP_WhZ[]", "formId": "1684508373846192130", "dataSourceId": "215w4mJk" }

image

Current Behavior/问题描述 多表新增和批量删除报别名异常

Expected Behavior/期望结果 操作正常执行

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

csx-bill commented 1 year ago

带 下划线 _ 给别名

awanghong commented 1 year ago

带 下划线 _ 给别名

尝试了,还是不行,能否给个CRUD接口,数据批量操作使用别名的例子,6.1.0版本的

csx-bill commented 1 year ago

https://github.com/csx-bill/quick-boot   参考我这个项目吧

------------------ 原始邮件 ------------------ 发件人: "Tencent/APIJSON" @.>; 发送时间: 2023年8月8日(星期二) 下午5:54 @.>; @.**@.>; 主题: Re: [Tencent/APIJSON] 6.1.0版本 crud 接口使用问题咨询 (Issue #593)

带 下划线 _ 给别名

尝试了,还是不行,能否给个CRUD接口,数据批量操作使用别名的例子,6.1.0版本的

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

awanghong commented 1 year ago

我这个springboot是 2.4.2,使用的apijson-framework.version 版本不一致,也可以吗?你那边入参例子吗,我直接在我这执行下试试

csx-bill commented 1 year ago

那就不要用 springboot3 的版本,其他一样

------------------ 原始邮件 ------------------ 发件人: "Tencent/APIJSON" @.>; 发送时间: 2023年8月8日(星期二) 晚上6:26 @.>; @.**@.>; 主题: Re: [Tencent/APIJSON] 6.1.0版本 crud 接口使用问题咨询 (Issue #593)

我这个springboot是 2.4.2,使用的apijson-framework.version 版本不一致,也可以吗?你那边入参例子吗,我直接在我这执行下试试

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

awanghong commented 1 year ago

咱两个用apijson,调用的底层方法不一样,我使用的是RequestMethod.CRUD,然后你这边是根据传入的Arrays.asList("get", "head", "gets", "heads", "post", "put", "delete");你这种我不知道,怎么进行多种操作,比如新增、修改、删除一起

csx-bill commented 1 year ago

post 就是新增 put 就是编辑

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: awanghong @.> 发送时间: 2023年8月8日 19:56 收件人: Tencent/APIJSON @.> 抄送: Bill @.>, Comment @.> 主题: Re: [Tencent/APIJSON] 6.1.0版本 crud 接口使用问题咨询 (Issue #593)

咱两个用apijson,调用的底层方法不一样,我使用的是RequestMethod.CRUD,然后你这边是根据传入的Arrays.asList("get", "head", "gets", "heads", "post", "put", "delete");你这种我不知道,怎么进行多种操作,比如新增、修改、删除一起

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

TommyLemon commented 1 year ago

带 下划线 _ 给别名

尝试了,还是不行,能否给个CRUD接口,数据批量操作使用别名的例子,6.1.0版本的

https://github.com/Tencent/APIJSON/issues/512#issuecomment-1433956429 https://github.com/Tencent/APIJSON/issues/575

TommyLemon commented 1 year ago

APIJSON Version/APIJSON 版本号 6.1.0

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

Environment/环境信息

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

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

{ "@post": { "WhP": { "tag": "WhP" }, "WhZ[]": { "tag": "WhZ:[]" } }, "WhP": { "name": "叶赫那拉·伟3" }, "WhZ[]": [ { "address": "高新区3", "foreign_id@": "WhP/id" }, { "address": "新区3", "foreign_id@": "WhP/id" } ], "@delete": { "WhZ:del": { "tag": "WhZ[]" } }, "WhZ": { "id{}": [ 143, 144 ] }, "tag": "WhP_WhZ[]", "formId": "1684508373846192130", "dataSourceId": "215w4mJk" }

image

Current Behavior/问题描述 多表新增和批量删除报别名异常

Expected Behavior/期望结果 操作正常执行

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

最外层 "WhZ": {} 没有取别名,和 WhZ[] 表名都是 WhZ,重复了

awanghong commented 1 year ago

APIJSON Version/APIJSON 版本号 6.1.0 Database Type & Version/数据库类型及版本号 5.7mysql Environment/环境信息

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

APIAuto Screenshots/APIAuto 请求与结果完整截屏 { "@post": { "WhP": { "tag": "WhP" }, "WhZ[]": { "tag": "WhZ:[]" } }, "WhP": { "name": "叶赫那拉·伟3" }, "WhZ[]": [ { "address": "高新区3", "foreign_id@": "WhP/id" }, { "address": "新区3", "foreign_id@": "WhP/id" } ], "@delete": { "WhZ:del": { "tag": "WhZ[]" } }, "WhZ": { "id{}": [ 143, 144 ] }, "tag": "WhP_WhZ[]", "formId": "1684508373846192130", "dataSourceId": "215w4mJk" } image Current Behavior/问题描述 多表新增和批量删除报别名异常 Expected Behavior/期望结果 操作正常执行 Any additional comments?/其它补充说明? No response

最外层 "WhZ": {} 没有取别名,和 WhZ[] 表名都是 WhZ,重复了

image 我这个写法是不是不对?

awanghong commented 1 year ago

需要的场景,可能就是,增删改同时存在,我想让它都执行,类似下面的例子 { "@POST": { "WhP:POST": { "tag": "WhP" }, "WhZ[]:POST": { "tag": "WhZ:[]" } }, "WhP:POST": { "name": "叶赫那拉·伟3" }, "WhZ[]:POST": [ { "address": "高新区3", "foreign_id@": "WhP/id" }, { "address": "新区3", "foreign_id@": "WhP/id" } ], "@DELETE": { "WhZ:DELETE": { "tag": "WhZ[]" } }, "WhZ:DELETE": { "id{}": [ 143, 144 ] }, "@PUT": { "WhP:PUT": { "tag": "WhP" }, "WhZ[]:PUT": { "tag": "WhZ:[]" } }, "WhP:PUT": { "name": "叶赫那拉·伟13", "id": "100" }, "WhZ[]:PUT": [ { "address": "高新区3", "id": "92" }, { "address": "新区3", "id": "91" } ], "tag": "WhP_WhZ[]", "formId": "1684508373846192130", "dataSourceId": "215w4mJk" }

TommyLemon commented 1 year ago

WhZ[]:POST 不是合法的数组对象 key,改成 WhZ:POST[]