File was renamed from src/main/java/com/xcong/farmer/cms/modules/system/controller/AdminBelongController.java |
| | |
| | | |
| | | 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 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; |
| | |
| | | @RequestMapping(value = "/api/belong") |
| | | @Slf4j |
| | | @Api(value = "系统所属公司", tags = "系统所属公司") |
| | | public class AdminBelongController { |
| | | public class AdminCompanyController { |
| | | |
| | | @Resource |
| | | private IBelongService iBelongService; |
| | | private ICompanyService iBelongService; |
| | | |
| | | @ApiOperation(value = "系统所属公司分页列表", notes = "系统所属公司分页列表") |
| | | @ApiResponses({@ApiResponse(code = 200, message = "ok", response = AdminBelongVo.class)}) |
| | | @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 = AdminBelongVo.class)}) |
| | | @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 AdminAddBelongDto adminAddBelongDto) { |
| | | return iBelongService.addBelong(adminAddBelongDto); |
| | | public Result addBelong(@RequestBody @Valid AdminAddCompanyDto adminAddCompanyDto) { |
| | | return iBelongService.addBelong(adminAddCompanyDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "查看系统所属公司", notes = "查看系统所属公司") |
| | |
| | | |
| | | @ApiOperation(value = "更新系统所属公司", notes = "更新系统所属公司") |
| | | @PostMapping(value = "/updateBelong") |
| | | public Result updateBelong(@RequestBody @Valid AdminUpdateBelongDto adminUpdateBelongDto) { |
| | | return iBelongService.updateBelong(adminUpdateBelongDto); |
| | | public Result updateBelong(@RequestBody @Valid AdminUpdateCompanyDto adminUpdateCompanyDto) { |
| | | return iBelongService.updateBelong(adminUpdateCompanyDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除系统所属公司", notes = "删除系统所属公司") |