package com.glxp.api.controller.system; import com.glxp.api.entity.system.CompanyEntity; import com.glxp.api.service.system.CompanyService; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @ApiIgnore @RestController public class CompanyController { @Resource private CompanyService companyService; @GetMapping("/warehouse/info/company") public BaseResponse getCompanyInfo() { CompanyEntity companyEntity = companyService.findCompany(); if (companyEntity != null) { return ResultVOUtils.success(companyEntity); } return ResultVOUtils.error(500, "企业信息为空"); } @PostMapping("/warehouse/info/modifyCompany") public BaseResponse modifyCompany(@RequestBody CompanyEntity companyEntity) { boolean b = companyService.modifyCompany(companyEntity); return ResultVOUtils.success("修改成功"); } }