@@ -16,7 +16,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; | |||||
* @Date 2021/7/21 11:26 | * @Date 2021/7/21 11:26 | ||||
* @Version 1.0 | * @Version 1.0 | ||||
**/ | **/ | ||||
@RestControllerAdvice(basePackages = {}) | |||||
@RestControllerAdvice(basePackages = {"com.ningdatech.pmapi.fiscal.controller"}) | |||||
public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | public class GlobalResponseHandler implements ResponseBodyAdvice<Object> { | ||||
private static final String SWAGGER_CLASS_PREFIX = "springfox.documentation"; | private static final String SWAGGER_CLASS_PREFIX = "springfox.documentation"; | ||||
@@ -7,8 +7,12 @@ import io.swagger.annotations.ApiOperation; | |||||
import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||
import org.springframework.stereotype.Controller; | import org.springframework.stereotype.Controller; | ||||
import org.springframework.web.bind.annotation.GetMapping; | 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.RequestMapping; | import org.springframework.web.bind.annotation.RequestMapping; | ||||
import javax.validation.Valid; | |||||
/** | /** | ||||
* <p> | * <p> | ||||
* 前端控制器 | * 前端控制器 | ||||
@@ -25,11 +29,13 @@ public class CompanyFiscalCodeController { | |||||
private final CompanyFiscalCodeManage companyFiscalCodeManage; | private final CompanyFiscalCodeManage companyFiscalCodeManage; | ||||
@ApiOperation(value = "财政编码/配置", notes = "财政编码配置") | @ApiOperation(value = "财政编码/配置", notes = "财政编码配置") | ||||
@GetMapping("/configure") | |||||
public void fiscalAndSealCodeConfigure(ReqCompanyFiscalCodeAndSealSnPO reqCompanyFiscalCodeAndSealSnPO) { | |||||
@PostMapping("/configure") | |||||
public void fiscalAndSealCodeConfigure(@Valid @RequestBody ReqCompanyFiscalCodeAndSealSnPO reqCompanyFiscalCodeAndSealSnPO) { | |||||
companyFiscalCodeManage.fiscalCodeConfigure(reqCompanyFiscalCodeAndSealSnPO); | companyFiscalCodeManage.fiscalCodeConfigure(reqCompanyFiscalCodeAndSealSnPO); | ||||
} | } | ||||
} | } |
@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel; | |||||
import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.ApiModelProperty; | ||||
import lombok.Data; | import lombok.Data; | ||||
import javax.validation.constraints.NotBlank; | |||||
/** | /** | ||||
* @author liuxinxin | * @author liuxinxin | ||||
* @date 2023/2/10 下午4:24 | * @date 2023/2/10 下午4:24 | ||||
@@ -12,9 +14,11 @@ import lombok.Data; | |||||
@ApiModel("财政编码配置") | @ApiModel("财政编码配置") | ||||
public class ReqCompanyFiscalCodeAndSealSnPO { | public class ReqCompanyFiscalCodeAndSealSnPO { | ||||
@NotBlank | |||||
@ApiModelProperty("财政编码") | @ApiModelProperty("财政编码") | ||||
private String fiscalCode; | private String fiscalCode; | ||||
@NotBlank | |||||
@ApiModelProperty("印章编号") | @ApiModelProperty("印章编号") | ||||
private String sealSn; | private String sealSn; | ||||