From 5cf0af8aaa6790ef1270a3dc2fe3f6a8066c5987 Mon Sep 17 00:00:00 2001 From: 199901012 Date: Thu, 18 Mar 2021 20:48:06 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=8F=90=E4=BA=A4diam'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bweb/controller/BsCompanyController.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/hai-bweb/src/main/java/com/bweb/controller/BsCompanyController.java b/hai-bweb/src/main/java/com/bweb/controller/BsCompanyController.java index 4717350f..b7169738 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/BsCompanyController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/BsCompanyController.java @@ -270,6 +270,27 @@ public class BsCompanyController { } } + @RequestMapping(value = "/editStatus", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "编辑公司状态") + public ResponseData editStatus(@RequestParam(name = "companyId", required = true) Long companyId, + @RequestParam(name = "status", required = true) Integer status) { + try { + BsCompany company = bsCompanyService.getCompanyById(companyId); + if (company == null) { + log.error("BsCompanyController --> editStatus() error!", "未找到公司"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_COMPANY, ""); + } + company.setStatus(status); + bsCompanyService.updateCompany(company); + + return ResponseMsgUtil.success("操作成功"); + } catch (Exception e) { + log.error("BsCompanyController --> editStatus() error!", e); + return ResponseMsgUtil.exception(e); + } + } + @RequestMapping(value="/selectAdminUser",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询公司主账号")