rest风格的webservice接口,接list需要分装成实体类并且加@RequestBody注解
//批量生成塔机二维码
@RequestMapping(value="BatchGenerationQRCode",method=RequestMethod.POST)@ApiOperation(value="批量生成塔机二维码",notes="批量生成塔机二维码")
public ResponseEntity<Boolean> BatchGenerationQRCode(@RequestBody List<TowerCrane> listtowercrane) {
try {
service.BatchGenerationQRCode(listtowercrane);
return ResponseEntity.success(true);
} catch (Exception e) {
e.printStackTrace();
return ResponseEntity.fail(e);
}
}