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.IBelongService;
|
import com.xcong.farmer.cms.modules.system.vo.AdminBelongVo;
|
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 AdminBelongController {
|
|
@Resource
|
private IBelongService iBelongService;
|
|
@ApiOperation(value = "系统所属公司分页列表", notes = "系统所属公司分页列表")
|
@ApiResponses({@ApiResponse(code = 200, message = "ok", response = AdminBelongVo.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 = AdminBelongVo.class)})
|
@GetMapping(value = "/belongInList")
|
public Result getBelongInList() {
|
return iBelongService.getBelongInList();
|
}
|
|
@ApiOperation(value = "添加系统所属公司", notes = "添加系统所属公司")
|
@PostMapping(value = "/addBelong")
|
public Result addBelong(@RequestBody @Valid AdminAddBelongDto adminAddBelongDto) {
|
return iBelongService.addBelong(adminAddBelongDto);
|
}
|
|
@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 AdminUpdateBelongDto adminUpdateBelongDto) {
|
return iBelongService.updateBelong(adminUpdateBelongDto);
|
}
|
|
@ApiOperation(value = "删除系统所属公司", notes = "删除系统所属公司")
|
@PostMapping(value = "/delObjs")
|
public Result delObjs(@RequestBody @Valid AdminDeleteDto adminDeleteDto) {
|
return iBelongService.delObjs(adminDeleteDto);
|
}
|
}
|