#
luxiaotao1123
2024-03-15 0637ee442306226736d7e3e7e9568e607fbd39d6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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.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")
    @Transactional
    public R mapList() {
        return R.ok().add(mapService.getMapData(getLoginUserId()));
    }
 
//    @PreAuthorize("hasAuthority('core:map:save')")
    @PostMapping("/save")
    @Transactional
    public R mapSave(@RequestBody MapDataParam param) {
        mapService.saveMapData(param, getLoginUserId());
        return R.ok();
    }
 
}