suerprisePlus
2024-09-04 85af9acfccf2e944a97557d3e46d143b0e99e2f1
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
package com.yb.controller;
 
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
 
import com.yb.config.PageUtils;
import com.yb.config.R;
import com.yb.entity.GisOsmPoisFree1Entity;
 
import com.yb.service.GisOsmPoisFree1Service;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
 
 
 
/**
 * ${comments}
 *
 * @author yw
 * @email leutu@qq.com
 * @date 2024-09-03 17:26:02
 */
@RestController
@RequestMapping("malan/gisosmpoisfree1")
public class GisOsmPoisFree1Controller {
    @Autowired
    private GisOsmPoisFree1Service gisOsmPoisFree1Service;
 
    /**
     * 列表
     */
    @GetMapping("/list")
    @ApiOperation(value = "list", notes = "参数 : page,limit")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = gisOsmPoisFree1Service.queryPage(params);
 
        return R.ok().put("page", page);
    }
 
 
    /**
     * 列表
     */
    @GetMapping("/query")
    @ApiOperation(value = "query", notes = "")
    public R query(@RequestParam Map<String, Object> params){
        PageUtils page = gisOsmPoisFree1Service.query(params);
 
        return R.ok().put("page", page);
    }
    /**
        * 列表
        */
    @PostMapping("/listAll")
    @ApiOperation(value = "listAll", notes = "")
    public R listAll(){
        PageUtils page = gisOsmPoisFree1Service.queryPage(new HashMap<String,Object>());
 
        return R.ok().put("page", page);
    }
    /**
     * 信息
     */
    @PostMapping("/info/{gid}")
    @ApiOperation(value = "info", notes = "")
    public R info(@PathVariable("gid") Integer gid){
        GisOsmPoisFree1Entity gisOsmPoisFree1 = gisOsmPoisFree1Service.getById(gid);
 
        return R.ok().put("gisOsmPoisFree1", gisOsmPoisFree1);
    }
 
    /**
     * 保存
     */
    @PostMapping("/save")
    @ApiOperation(value = "save", notes = "")
    public R save(@RequestBody GisOsmPoisFree1Entity gisOsmPoisFree1){
        gisOsmPoisFree1Service.save(gisOsmPoisFree1);
 
        return R.ok();
    }
 
    /**
     * 修改
     */
    @PostMapping("/update")
    @ApiOperation(value = "update", notes = "")
    public R update(@RequestBody GisOsmPoisFree1Entity gisOsmPoisFree1){
        gisOsmPoisFree1Service.updateById(gisOsmPoisFree1);
 
        return R.ok();
    }
 
    /**
     * 删除
     */
    @PostMapping("/delete")
    @ApiOperation(value = "delete", notes = "")
    public R delete(@RequestBody Integer[] gids){
        gisOsmPoisFree1Service.removeByIds(Arrays.asList(gids));
 
        return R.ok();
    }
 
    /**
    * 修改
    */
    @PostMapping("/getTableMeta")
    @ApiOperation(value = "getTableMeta", notes = "")
    public R getTableMeta() {
        ArrayList<Map<String,String>> list  = new ArrayList<Map<String,String>>();
 
        Field[] fields =GisOsmPoisFree1Entity.class.getDeclaredFields();
        for (Field field : fields) {
            Map<String,String> map = new HashMap<>();
            System.out.println("属性名:" + field.getName());
            System.out.println("类型:" + field.getType().getName());
            map.put("name",field.getName());
            map.put("type",field.getType().getName());
            map.put("cname",field.getName());
            list.add(map);
        }
        return R.ok(list);
    }
}