老师,为啥我从Postman传过去的参数是这样的,说数据类型错了


<update id="batchUpdateSellStatus">
update ethan_mall_product
set status = #{sellStatus}
where id in
<foreach collection="ids" close=")" item="id" open="(" separator=",">
#{id}
</foreach>
</update>3
收起
正在回答 回答被采纳积分+1
2回答
会java泰酷辣
2023-08-02 10:27:58
@ApiOperation("后台批量上下架接口")
@PostMapping("/admin/product/batchUpdateSellStatus")
public ApiRestResponse batchUpdateSellStatus(@RequestParam Integer[] ids,@RequestParam Integer[] sellStatus){
productService.batchUpdateSellStatus(ids,sellStatus);
return ApiRestResponse.success();
}@Override
public void batchUpdateSellStatus(Integer[] ids,Integer[] sellStatus){
productMapper.batchUpdateSellStatus(ids,sellStatus);
}确认方法应该是没问题的,之前发送的请求都没这种情况
2023版Java工程师
- 参与学习 人
- 提交作业 8788 份
- 解答问题 9886 个
综合就业常年第一,编程排行常年霸榜,北上广深月薪过万! 不需要基础,无需脱产即可学习,只要你有梦想,想高薪! 全新升级:技术栈升级(包含VUE3.0,ES6,Git)+项目升级(前后端联调与功能升级)
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星