package com.zy.asrs.wcs.core.map.controller; import com.zy.asrs.framework.common.R; import com.zy.asrs.wcs.core.map.controller.param.MapDataParam; import com.zy.asrs.wcs.core.map.controller.param.MapQueryParam; import com.zy.asrs.wcs.core.map.service.MapService; import com.zy.asrs.wcs.system.controller.BaseController; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * Created by vincent on 3/15/2024 */ @RestController @RequestMapping("/api/map") public class MapController extends BaseController { @Autowired private MapService mapService; // @PreAuthorize("hasAuthority('core:map:list')") @PostMapping("/list") public R mapList(@RequestBody MapQueryParam param) { return R.ok().add(mapService.getMapData(param, getLoginUserId())); } // @PreAuthorize("hasAuthority('core:map:save')") @PostMapping("/save") @Transactional public R mapSave(@RequestBody MapDataParam param) { mapService.saveMapData(param, getLoginUserId()); return R.ok(); } }