| | |
| | | package cc.mrbird.febs.ai.controller.productDependency; |
| | | |
| | | import cc.mrbird.febs.ai.entity.AiCompanyMemberApply; |
| | | import cc.mrbird.febs.ai.entity.AiProduct; |
| | | import cc.mrbird.febs.ai.entity.AiProductDependency; |
| | | import cc.mrbird.febs.ai.service.AiCompanyMemberApplyService; |
| | | import cc.mrbird.febs.ai.service.AiProductDependencyService; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | @PostMapping("add") |
| | | @ControllerEndpoint(operation = "新增", exceptionMessage = "操作失败") |
| | | public FebsResponse add(@RequestBody @Valid AiProductDependency dto) { |
| | | |
| | | String companyId = getCurrentUserCompanyId(); |
| | | dto.setCompanyId(companyId); |
| | | return service.add(dto); |
| | | } |
| | | |
| | | @GetMapping("delete/{id}") |
| | | @ControllerEndpoint(operation = "删除", exceptionMessage = "操作失败") |
| | | public FebsResponse delete( |
| | | @NotNull(message = "{required}") @PathVariable String id |
| | | ) { |
| | | |
| | | return service.delete(id); |
| | | } |
| | | |
| | | } |