fix
Helius
2022-07-04 aa01829055f7711f6b46c40632997641e1a9e38d
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
package com.xcong.farmer.cms.modules.system.controller;
 
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.modules.system.dto.*;
import com.xcong.farmer.cms.modules.system.service.ICompanyService;
import com.xcong.farmer.cms.modules.system.vo.AdminCompanyVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
import javax.validation.Valid;
 
@RestController
@RequestMapping(value = "/api/belong")
@Slf4j
@Api(value = "系统所属公司", tags = "系统所属公司")
public class AdminCompanyController {
 
    @Resource
    private ICompanyService iBelongService;
 
    @ApiOperation(value = "系统所属公司分页列表", notes = "系统所属公司分页列表")
    @ApiResponses({@ApiResponse(code = 200, message = "ok", response = AdminCompanyVo.class)})
    @PostMapping(value = "/belongInPage")
    public Result getBelongInPage(@RequestBody @Valid AdminBelongDto adminBelongDto) {
        return iBelongService.getBelongInPage(adminBelongDto);
    }
 
    @ApiOperation(value = "系统所属公司列表", notes = "系统所属公司列表")
    @ApiResponses({@ApiResponse(code = 200, message = "ok", response = AdminCompanyVo.class)})
    @GetMapping(value = "/belongInList")
    public Result getBelongInList() {
        return iBelongService.getBelongInList();
    }
 
    @ApiOperation(value = "添加系统所属公司", notes = "添加系统所属公司")
    @PostMapping(value = "/addBelong")
    public Result addBelong(@RequestBody @Valid AdminAddCompanyDto adminAddCompanyDto) {
        return iBelongService.addBelong(adminAddCompanyDto);
    }
 
    @ApiOperation(value = "查看系统所属公司", notes = "查看系统所属公司")
    @GetMapping(value = "/seeBelongInfo/{id}")
    public Result seeBelongInfo(@PathVariable(value = "id") Long id) {
        return iBelongService.seeBelongInfo(id);
    }
 
    @ApiOperation(value = "更新系统所属公司", notes = "更新系统所属公司")
    @PostMapping(value = "/updateBelong")
    public Result updateBelong(@RequestBody @Valid AdminUpdateCompanyDto adminUpdateCompanyDto) {
        return iBelongService.updateBelong(adminUpdateCompanyDto);
    }
 
    @ApiOperation(value = "删除系统所属公司", notes = "删除系统所属公司")
    @PostMapping(value = "/delObjs")
    public Result delObjs(@RequestBody @Valid AdminDeleteDto adminDeleteDto) {
        return iBelongService.delObjs(adminDeleteDto);
    }
}