diff --git a/jianshui-admin/pom.xml b/jianshui-admin/pom.xml index 38da840..86e4bec 100644 --- a/jianshui-admin/pom.xml +++ b/jianshui-admin/pom.xml @@ -23,18 +23,25 @@ true - + + com.github.xiaoymin + knife4j-spring-boot-starter + 3.0.3 + + + + - + @@ -94,6 +101,8 @@ jianshui-invoice-all + + diff --git a/jianshui-admin/src/main/java/com/jianshui/api/controller/http/income/v1/InvoiceAuthController.java b/jianshui-admin/src/main/java/com/jianshui/api/controller/http/income/v1/InvoiceAuthController.java index fee0cee..f34ddac 100644 --- a/jianshui-admin/src/main/java/com/jianshui/api/controller/http/income/v1/InvoiceAuthController.java +++ b/jianshui-admin/src/main/java/com/jianshui/api/controller/http/income/v1/InvoiceAuthController.java @@ -65,7 +65,7 @@ public class InvoiceAuthController { @ApiOperation("状态采集") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/statusAcquisition/{identity}", "/statusAcquisition"}) public Object statusAcquisition(HttpServletRequest request, String identity) throws Exception { @@ -109,7 +109,7 @@ public class InvoiceAuthController { @ApiOperation("申请认证") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/applyForCertification/{identity}", "/applyForCertification"}) public Object applyForCertification(HttpServletRequest request, String identity) throws Exception { @@ -150,7 +150,7 @@ public class InvoiceAuthController { @ApiOperation("获取认证结果") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/getCertificationResult/{identity}", "/getCertificationResult"}) public Object getCertificationResult(HttpServletRequest request, String identity) throws Exception { @@ -191,7 +191,7 @@ public class InvoiceAuthController { @ApiOperation("申请确认") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/applicationConfirmation/{identity}", "/applicationConfirmation"}) public Object applicationConfirmation(HttpServletRequest request, String identity) throws Exception { @@ -232,7 +232,7 @@ public class InvoiceAuthController { @ApiOperation("获取确认结果") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/getConfirmationResult/{identity}", "/getConfirmationResult"}) public Object getConfirmationResult(HttpServletRequest request, String identity) throws Exception { @@ -272,7 +272,7 @@ public class InvoiceAuthController { @ApiOperation("获取企业档案") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/getCorporateProfile/{identity}", "/getCorporateProfile"}) public Object getCorporateProfile(HttpServletRequest request, String identity) throws Exception { @@ -313,7 +313,7 @@ public class InvoiceAuthController { @ApiOperation("重置密码") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/restPassword/{identity}", "/restPassword"}) public Object restPassword(HttpServletRequest request, String identity) throws Exception { @@ -354,7 +354,7 @@ public class InvoiceAuthController { @ApiOperation("设置密码") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/setPassword/{identity}", "/setPassword"}) public Object setPassword(HttpServletRequest request, String identity) throws Exception { diff --git a/jianshui-admin/src/main/java/com/jianshui/api/controller/http/income/v1/InvoiceCheckController.java b/jianshui-admin/src/main/java/com/jianshui/api/controller/http/income/v1/InvoiceCheckController.java index a52b413..8b57286 100644 --- a/jianshui-admin/src/main/java/com/jianshui/api/controller/http/income/v1/InvoiceCheckController.java +++ b/jianshui-admin/src/main/java/com/jianshui/api/controller/http/income/v1/InvoiceCheckController.java @@ -54,7 +54,7 @@ public class InvoiceCheckController { @ApiOperation("单个发票查验接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/income/v1/invoice_check/single/{identity}", "/checkinvoice/single"}) public Object single(HttpServletRequest request, String identity) throws Exception { diff --git a/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceController.java b/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceController.java index fce173a..3331512 100644 --- a/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceController.java +++ b/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceController.java @@ -39,7 +39,8 @@ import javax.servlet.http.HttpServletRequest; * @Author 巩权林 * @Date 2022/3/26 10:11 **/ -@Api("销项接口") +@Api(tags = "销项接口",value = "aaaa") +@ApiOperation("aaaaaaaaaaaaaaaaa") @RestController // @RequestMapping("/api/invoice/v1/invoice") // 为了兼容老版本航信接口 @Slf4j @@ -856,7 +857,7 @@ public class InvoiceController { @ApiOperation("获取发票下载地址") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v2/getFileUrl/{identity}", "/api/invoice_all/v2/getFileUrl"}) public Object getFileUrl(HttpServletRequest request, String identity) throws Exception { @@ -891,7 +892,7 @@ public class InvoiceController { @ApiOperation("全电文件获取") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v2/getFileAcquisition/{identity}", "/api/invoice_all/v2/getFileAcquisition"}) public Object getFileAcquisition(HttpServletRequest request, String identity) throws Exception { @@ -929,7 +930,7 @@ public class InvoiceController { @ApiOperation("获取人脸识别二维码") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v2/qrcode/{identity}", "/api/invoice_all/v2/qrcode"}) public Object qrcode(HttpServletRequest request, String identity) throws Exception { @@ -965,7 +966,7 @@ public class InvoiceController { @ApiOperation("发票查询") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v2/query/{identity}", "/api/invoice_all/v2/query"}) public Object query(HttpServletRequest request, String identity) throws Exception { @@ -1001,7 +1002,7 @@ public class InvoiceController { @ApiOperation("获取发票打印XML") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v2/print_xml/{identity}", "/api/invoice_all/v2/print_xml"}) public Object printXmlml(HttpServletRequest request, String identity) throws Exception { @@ -1037,7 +1038,7 @@ public class InvoiceController { @ApiOperation("快速红冲") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v2/issueFastRedInvoice/{identity}", "/api/invoice_all/v2/issueFastRedInvoice"}) public Object issueFastRedInvoice(HttpServletRequest request, String identity) throws Exception { @@ -1075,7 +1076,7 @@ public class InvoiceController { @ApiOperation("蓝字发票统计") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v2/invoice_statistics/{identity}", "/api/invoice_all/v2/invoice_statistics"}) public Object invoiceStatistics(HttpServletRequest request, String identity) throws Exception { @@ -1111,7 +1112,7 @@ public class InvoiceController { @ApiOperation("审核红字信息表") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v2/auditRedInfo/{identity}", "/api/invoice_all/v2/auditRedInfo"}) public Object auditRedInfo(HttpServletRequest request, String identity) throws Exception { @@ -1149,7 +1150,7 @@ public class InvoiceController { @ApiOperation("查询红字信息表明细") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v2/queryRedInfoDetail/{identity}", "/api/invoice_all/v2/queryRedInfoDetail"}) public Object queryRedInfoDetail(HttpServletRequest request, String identity) throws Exception { diff --git a/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoiceall/v1/InvoiceAllController.java b/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoiceall/v1/InvoiceAllController.java index dba0e44..7186a88 100644 --- a/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoiceall/v1/InvoiceAllController.java +++ b/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoiceall/v1/InvoiceAllController.java @@ -58,7 +58,7 @@ public class InvoiceAllController { @ApiOperation("用户登记接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/registration/{identity}", "/api/invoice_all/v1/registration"}) public Object registration(HttpServletRequest request, String identity) throws Exception { @@ -98,7 +98,7 @@ public class InvoiceAllController { @ApiOperation("通用查询接口") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/generalQuery/{identity}", "/api/invoice_all/v1/generalQuery"}) public Object generalQuery(HttpServletRequest request, String identity) throws Exception { @@ -138,7 +138,7 @@ public class InvoiceAllController { @ApiOperation("获取发票下载地址") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/getFileUrl/{identity}", "/api/invoice_all/v1/getFileUrl"}) public Object getFileUrl(HttpServletRequest request, String identity) throws Exception { @@ -178,7 +178,7 @@ public class InvoiceAllController { @ApiOperation("全电文件获取") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/getFileAcquisition/{identity}", "/api/invoice_all/v1/getFileAcquisition"}) public Object getFileAcquisition(HttpServletRequest request, String identity) throws Exception { @@ -219,7 +219,7 @@ public class InvoiceAllController { @ApiOperation("蓝字发票开具") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/addInvoice/{identity}", "/api/invoice_all/v1/addInvoice"}) public Object addInvoice(HttpServletRequest request, String identity) throws Exception { @@ -260,7 +260,7 @@ public class InvoiceAllController { @ApiOperation("获取人脸识别二维码") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/qrcode/{identity}", "/api/invoice_all/v1/qrcode"}) public Object qrcode(HttpServletRequest request, String identity) throws Exception { @@ -299,7 +299,7 @@ public class InvoiceAllController { @ApiOperation("发票查询") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/query/{identity}", "/api/invoice_all/v1/query"}) public Object query(HttpServletRequest request, String identity) throws Exception { @@ -338,7 +338,7 @@ public class InvoiceAllController { @ApiOperation("获取发票打印XML") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/print_xml/{identity}", "/api/invoice_all/v1/print_xml"}) public Object printXmlml(HttpServletRequest request, String identity) throws Exception { @@ -377,7 +377,7 @@ public class InvoiceAllController { @ApiOperation("红字发票开具") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/add_red_invoice/{identity}", "/api/invoice_all/v1/add_red_invoice"}) public Object addRedInvoice(HttpServletRequest request, String identity) throws Exception { @@ -416,7 +416,7 @@ public class InvoiceAllController { @ApiOperation("快速红冲") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/issueFastRedInvoice/{identity}", "/api/invoice_all/v1/issueFastRedInvoice"}) public Object issueFastRedInvoice(HttpServletRequest request, String identity) throws Exception { @@ -459,7 +459,7 @@ public class InvoiceAllController { @ApiOperation("蓝字发票统计") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/invoice_statistics/{identity}", "/api/invoice_all/v1/invoice_statistics"}) public Object invoiceStatistics(HttpServletRequest request, String identity) throws Exception { @@ -501,7 +501,7 @@ public class InvoiceAllController { @ApiOperation("申请红字信息表") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/uploadRedInfo/{identity}", "/api/invoice_all/v1/uploadRedInfo"}) public Object uploadRedInfo(HttpServletRequest request, String identity) throws Exception { @@ -540,7 +540,7 @@ public class InvoiceAllController { @ApiOperation("查询红字信息表") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/queryRedInfo/{identity}", "/api/invoice_all/v1/queryRedInfo"}) public Object queryRedInfo(HttpServletRequest request, String identity) throws Exception { @@ -579,7 +579,7 @@ public class InvoiceAllController { @ApiOperation("审核红字信息表") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/auditRedInfo/{identity}", "/api/invoice_all/v1/auditRedInfo"}) public Object auditRedInfo(HttpServletRequest request, String identity) throws Exception { @@ -620,7 +620,7 @@ public class InvoiceAllController { @ApiOperation("查询红字信息表明细") @ApiImplicitParams({ - @ApiImplicitParam(name = "", value = "身份认证", dataType = "string", example = "1130", required = true), + @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "string", example = "1130", required = true), @ApiImplicitParam(name = "order", value = "请求体", required = true)}) @PostMapping({"/api/invoice_all/v1/queryRedInfoDetail/{identity}", "/api/invoice_all/v1/queryRedInfoDetail"}) public Object queryRedInfoDetail(HttpServletRequest request, String identity) throws Exception { diff --git a/jianshui-admin/src/main/java/com/jianshui/web/controller/invoice/BillInfoController.java b/jianshui-admin/src/main/java/com/jianshui/web/controller/invoice/BillInfoController.java index b87c0ff..d0d623f 100644 --- a/jianshui-admin/src/main/java/com/jianshui/web/controller/invoice/BillInfoController.java +++ b/jianshui-admin/src/main/java/com/jianshui/web/controller/invoice/BillInfoController.java @@ -4,6 +4,8 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.jianshui.invoice.domain.BillInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -28,6 +30,7 @@ import com.jianshui.common.core.page.TableDataInfo; * @author Gong Quanlin * @date 2022-03-06 */ +@Api(tags = "测试接口文档",value = "ceceshi") @RestController @RequestMapping("/invoice/billinfo") public class BillInfoController extends BaseController @@ -38,6 +41,7 @@ public class BillInfoController extends BaseController /** * 查询开票信息列表 */ + @ApiOperation("查询开票信息列表") @PreAuthorize("@ss.hasPermi('invoice:billinfo:list')") @GetMapping("/list") public TableDataInfo list(BillInfo billInfo) diff --git a/jianshui-admin/src/main/java/com/jianshui/web/core/config/SwaggerConfig.java b/jianshui-admin/src/main/java/com/jianshui/web/core/config/SwaggerConfig.java index 1a2f9d5..fcf8450 100644 --- a/jianshui-admin/src/main/java/com/jianshui/web/core/config/SwaggerConfig.java +++ b/jianshui-admin/src/main/java/com/jianshui/web/core/config/SwaggerConfig.java @@ -21,6 +21,7 @@ import springfox.documentation.service.SecurityScheme; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.service.contexts.SecurityContext; import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; /** * Swagger2的接口配置 @@ -58,7 +59,7 @@ public class SwaggerConfig // 扫描所有有注解的api,用这种方式更灵活 .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) // 扫描指定包中的swagger注解 - // .apis(RequestHandlerSelectors.basePackage("com.jianshui.project.tool.swagger")) +// .apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger")) // 扫描所有 .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) .build() diff --git a/jianshui-admin/src/main/resources/application.yml b/jianshui-admin/src/main/resources/application.yml index 883d23c..7b20ab2 100644 --- a/jianshui-admin/src/main/resources/application.yml +++ b/jianshui-admin/src/main/resources/application.yml @@ -100,6 +100,8 @@ swagger: # 请求前缀 pathMapping: /dev-api + + # 防止XSS攻击 xss: # 过滤开关 diff --git a/jianshui-framework/src/main/java/com/jianshui/framework/config/SecurityConfig.java b/jianshui-framework/src/main/java/com/jianshui/framework/config/SecurityConfig.java index ca41d2c..bb166fc 100644 --- a/jianshui-framework/src/main/java/com/jianshui/framework/config/SecurityConfig.java +++ b/jianshui-framework/src/main/java/com/jianshui/framework/config/SecurityConfig.java @@ -122,11 +122,14 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { "/checkinvoice/multilreqult" ) .permitAll() + .antMatchers("/swagger-ui.html").anonymous() + .antMatchers("/doc.html").anonymous() .antMatchers("/swagger-resources/**").anonymous() - .antMatchers("/webjars/**").anonymous() .antMatchers("/*/api-docs").anonymous() + .antMatchers("/webjars/**").anonymous() .antMatchers("/druid/**").anonymous() + // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated() .and() diff --git a/jianshui-invoice/src/main/java/com/jianshui/invoice/utils/JcskTest.java b/jianshui-invoice/src/main/java/com/jianshui/invoice/utils/JcskTest.java index e496017..0f6e4e7 100644 --- a/jianshui-invoice/src/main/java/com/jianshui/invoice/utils/JcskTest.java +++ b/jianshui-invoice/src/main/java/com/jianshui/invoice/utils/JcskTest.java @@ -14,14 +14,16 @@ public class JcskTest { public static void main(String[] args) throws Exception { - String key = "ZWaJUo9tKNKKQTQCryW9dw=="; // 1242 +// String key = "ZWaJUo9tKNKKQTQCryW9dw=="; // 1242 +// String key = "GAu2XyVU4AYiqzPuoVGi4g=="; // 1245 + String key = "5lkC/Y5cRCtdzeroilBYFw=="; // 1246 // String key = "kpP/pYUBGWdIRNFswh+1Qg=="; // 1240 String order = ""; String m = ""; - order = "{ \n" + + /* order = "{ \n" + " \"appkey\": \"935248bf224f6c8431cdc1969f029519\",\n" + " \"async\": false,\n" + " \"bsrysfzjhm\":\"440823199706182127\",\n" + @@ -42,6 +44,28 @@ public class JcskTest { " \"zjh\": \"\",\n" + " \"loginType\": \"0\"\n" + " }\n" + + "}";*/ + order = "{ \n" + + " \"appkey\": \"935248bf224f6c8431cdc1969f029519\",\n" + + " \"async\": false,\n" + + " \"bsrysfzjhm\":\"440823199706182127\",\n" + + " \"serviceId\": \"yhdj\",\n" + + " \"dqbm\": \"guangdong\",\n" + + " \"nsrsbh\": \"91440101MA5CT3T24L\",\n" + + " \"jsonData\": {\n" + + " \"bsryxm\": \"苏丽云\",\n" + + " \"dlsf\": \"7\",\n" + + " \"dlsfmm\": \"668899Sly\",\n" + + " \"dlfs\": \"6\",\n" + + " \"dlmm\": \"668899Sly\",\n" + + " \"dlzh\": \"S蘇小姐\",\n" + + " \"nsrmc\": \"广东道珉供应链管理有限公司\",\n" + + " \"nsrsbh\": \"91440101MA59QWT32W\",\n" + + " \"bsrysfzjhm\": \"440823199706182127\",\n" + + " \"bsrysjhm\": \"18588747827\",\n" + + " \"zjh\": \"\",\n" + + " \"loginType\": \"0\"\n" + + " }\n" + "}"; System.out.println(order); m = AisinoInvoiceDecryptUtil.encrypt(order, key); diff --git a/jianshui-ui/src/views/tool/swagger/index.vue b/jianshui-ui/src/views/tool/swagger/index.vue index b8becc6..7c57b68 100644 --- a/jianshui-ui/src/views/tool/swagger/index.vue +++ b/jianshui-ui/src/views/tool/swagger/index.vue @@ -8,7 +8,8 @@ export default { components: { iFrame }, data() { return { - url: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html" + // url: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html" + url: process.env.VUE_APP_BASE_API + "/doc.html" }; }, }; diff --git a/pom.xml b/pom.xml index 0e2cc4f..fb74e5e 100644 --- a/pom.xml +++ b/pom.xml @@ -20,6 +20,7 @@ 1.2.8 1.21 3.0.0 + 3.0.0 2.3.2 2.2.0 1.4.0 @@ -95,7 +96,7 @@ - + + + + + com.github.xiaoymin + knife4j-spring-boot-starter + ${knife4j.version}