package cn.cslg.pas.controller; import cn.cslg.pas.common.core.base.Constants; import cn.cslg.pas.common.model.dto.GetPatentStarPartDTO; import cn.cslg.pas.common.model.dto.PatentDTO; import cn.cslg.pas.common.utils.Response; import cn.cslg.pas.service.getPatentStarPart.GetPatentStarPartService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import java.io.IOException; /** * 获取专利之星专利某部分(如权要、说明书等一项)控制层 * * @Author chenyu * @Date 2023/6/30 */ @Tag(name = "专利之星") @Slf4j @RequestMapping(Constants.API_VERSION_V2 + "/patentStar") @RestController @RequiredArgsConstructor public class GetPatentStarPartController { private final GetPatentStarPartService getPatentStarPartService; @Operation(summary = "根据专利号或申请号获取专利指定部分项") @PostMapping("/getPatentPart") public String getPatentPart(@RequestBody GetPatentStarPartDTO getPatentStarPartDTO) throws IOException { log.info("开始处理【根据专利号或申请号获取专利指定部分项】的请求,请求参数为:{}", getPatentStarPartDTO); PatentDTO patentPart = getPatentStarPartService.getPatentPart(getPatentStarPartDTO); return Response.success(patentPart); } }