leutu
2024-05-08 7922905e4987789b636abdce1a240f4cee7c971b
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
package com.terra.lfdcexp.controller;
 
 
import com.terra.lfdcexp.config.R;
import com.terra.lfdcexp.entity.SysOrgEntity;
import com.terra.lfdcexp.service.SysOrgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.Arrays;
 
 
/**
 * ${comments}
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2023-09-21 19:07:03
 */
@Api(tags = "SysOrgController")
@RestController
@RequestMapping("generator/sysorg")
public class SysOrgController {
    @Autowired
    private SysOrgService sysOrgService;
 
    /**
     * 列表
     */
    @RequestMapping("/list")
 
    @ApiOperation(value = "generator:sysorg:list", notes = "")
    public R list(@RequestBody SysOrgEntity sysOrgEntity){
        //PageUtils page = sysOrgService.queryPage(params);
 
        return R.ok().put("page", sysOrgService.list());
    }
 
 
    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
 
    @ApiOperation(value = "generator:sysorg:info", notes = "")
    public R info(@PathVariable("id") Long id){
        SysOrgEntity sysOrg = sysOrgService.getById(id);
 
        return R.ok().put("sysOrg", sysOrg);
    }
 
    /**
     * 保存
     */
    @RequestMapping("/save")
 
    @ApiOperation(value = "generator:sysorg:save", notes = "")
    public R save(@RequestBody SysOrgEntity sysOrg){
        sysOrgService.save(sysOrg);
 
        return R.ok();
    }
 
    /**
     * 修改
     */
    @RequestMapping("/update")
 
    @ApiOperation(value = "generator:sysorg:update", notes = "")
    public R update(@RequestBody SysOrgEntity sysOrg){
        sysOrgService.updateById(sysOrg);
 
        return R.ok();
    }
 
    /**
     * 删除
     */
    @RequestMapping("/delete")
 
    @ApiOperation(value = "generator:sysorg:delete", notes = "")
    public R delete(@RequestBody Long[] ids){
        sysOrgService.removeByIds(Arrays.asList(ids));
 
        return R.ok();
    }
 
}