| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | .eq(Company::getUserId, userId)); |
| | | return R.ok(company); |
| | | } |
| | | |
| | | /** |
| | | * 修改企业信息 |
| | | */ |
| | | @Operation(summary = "修改企业信息", tags = {"企业端"}) |
| | | @PutMapping("/updateCompany") |
| | | public R<Void> updateCompany(Company company){ |
| | | Long userId = SecurityUtils.getAppLoginUser().getUserId(); |
| | | Company companyDb = companyService.getOne(new LambdaQueryWrapper<Company>() |
| | | .eq(Company::getUserId, userId)); |
| | | company.setId(companyDb.getId()); |
| | | companyService.updateById(company); |
| | | return R.ok(); |
| | | } |
| | | } |