| | |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.company.api.domain.Company; |
| | | import com.ruoyi.company.api.domain.dto.MgtCompanyDTO; |
| | | import com.ruoyi.company.service.CompanyService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | |
| | | */ |
| | | @Operation(summary = "修改企业信息", tags = {"企业端"}) |
| | | @PutMapping("/updateCompany") |
| | | public R<Void> updateCompany(Company company){ |
| | | public R<Void> updateCompany(MgtCompanyDTO mgtCompanyDTO){ |
| | | Long userId = SecurityUtils.getAppLoginUser().getUserId(); |
| | | Company companyDb = companyService.getOne(new LambdaQueryWrapper<Company>() |
| | | .eq(Company::getUserId, userId)); |
| | | company.setId(companyDb.getId()); |
| | | companyService.updateById(company); |
| | | mgtCompanyDTO.setId(companyDb.getId()); |
| | | companyService.editCompany(mgtCompanyDTO); |
| | | return R.ok(); |
| | | } |
| | | } |