'提交diam'

dev-discount
199901012 4 years ago
parent b8a32ec1f7
commit 5cf0af8aaa
  1. 21
      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 = "查询公司主账号")

Loading…
Cancel
Save