| | |
| | | @RestController |
| | | @RequestMapping("station3D") |
| | | @Api(tags = "3D机房配置") |
| | | public class Station3DController { |
| | | public class Station3DController extends BaseController{ |
| | | |
| | | @Autowired |
| | | private Station3DService service; |
| | |
| | | return new Response().setII(1,"新增成功"); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @PostMapping("delete") |
| | | @ApiOperation(value = "删除") |
| | | public Response delete(@RequestParam int stationId){ |
| | | service.delete(stationId); |
| | | return new Response().setII(1,"删除成功"); |
| | | } |
| | | |
| | | @PutMapping |
| | | @PostMapping("update") |
| | | @ApiOperation(value = "更新") |
| | | public Response update(@RequestBody Station3D station3D){ |
| | | service.update(station3D); |
| | | return new Response().setII(1,"更新成功"); |
| | | } |
| | | |
| | | @PutMapping("batch") |
| | | @PostMapping("updateBatch") |
| | | @ApiOperation(value = "更新批量") |
| | | public Response updateBatch(@RequestBody List<Station3D> station3DList){ |
| | | service.updateBatch(station3DList); |
| | |
| | | String fileData = (String)map.get("fileData"); |
| | | String pictureName = (String)map.get("pictureName"); |
| | | String stationName = (String)map.get("stationName"); |
| | | //过滤特殊字符,避免路径遍历攻击 |
| | | pictureName = ActionUtil.filterFileName(pictureName); |
| | | service.uploadPicture(stationName,fileData,pictureName,request); |
| | | return new Response().setII(1,"上传成功"); |
| | | |