想要批量修改产品信息,
想把产品id为 123,234,345.。。的产品批量修改
提供的接口api是获取产品详细信息接口,和修改产品的接口api
ajax要如何发送呢
后端应该如何处理呢? 使用的是node express
是ajax把要修改的id数组 传给后端吗 然后 后端 循环这个id数组发请求获取详情,再发修改产品的请求 ???
感觉不应该这样循环请求的吧
PHPz2017-04-17 15:29:23
The request will definitely not be looped. . There should also be batch methods for modification, and it is impossible for all interfaces to be modified individually
大家讲道理2017-04-17 15:29:23
It mainly depends on whether the content of the products you want to modify in batches is consistent. If they are consistent, you can only execute the SQL once and just throw the product ID to be modified into the SQL statement