剖析 js

controller层

@ RequestMapping("updateStatus/{status}")public SysResult doInstockItem(@PathVariable Integer status,Long[]ids) { itemService.updateStatus(status,ids); return SysResult.success();}

service层

//商品的上架 下架操作 就批改状态信息 void updateStatus(Integer status,Long[]ids);
@Overridepublic void updateStatus(Integer status,Long[]ids) { Item item = new Item(); item.setStatus(status);//批改状态 UpdateWrapper<Item> updateWrapper=new UpdateWrapper<>(); List<Long>idList= Arrays.asList(ids);//数组转汇合 updateWrapper.in("id",idList);//参数须要的是汇合类型 itemMapper.update(item,updateWrapper);}