diff --git a/migrate-swagger-to-springdoc.sh b/migrate-swagger-to-springdoc.sh
new file mode 100755
index 0000000..6e72d55
--- /dev/null
+++ b/migrate-swagger-to-springdoc.sh
@@ -0,0 +1,84 @@
+#!/bin/bash
+
+# Swagger 到 SpringDoc OpenAPI 注解迁移脚本
+
+echo "开始 Swagger 到 SpringDoc OpenAPI 注解迁移..."
+
+# 查找所有 Java 文件
+find src/main/java -name "*.java" -type f | while read file; do
+ echo "处理文件: $file"
+
+ # 替换 import 语句
+ sed -i '' 's/import io\.swagger\.annotations\.Api;/import io.swagger.v3.oas.annotations.tags.Tag;/g' "$file"
+ sed -i '' 's/import io\.swagger\.annotations\.ApiModel;/import io.swagger.v3.oas.annotations.media.Schema;/g' "$file"
+ sed -i '' 's/import io\.swagger\.annotations\.ApiModelProperty;/import io.swagger.v3.oas.annotations.media.Schema;/g' "$file"
+ sed -i '' 's/import io\.swagger\.annotations\.ApiOperation;/import io.swagger.v3.oas.annotations.Operation;/g' "$file"
+ sed -i '' 's/import io\.swagger\.annotations\.ApiParam;/import io.swagger.v3.oas.annotations.Parameter;/g' "$file"
+
+ # 替换注解
+ sed -i '' 's/@Api(tags = \([^)]*\))/@Tag(name = \1)/g' "$file"
+ sed -i '' 's/@ApiModel(value = \([^,]*\), description = \([^)]*\))/@Schema(name = \1, description = \2)/g' "$file"
+ sed -i '' 's/@ApiModel(description = \([^)]*\))/@Schema(description = \1)/g' "$file"
+ sed -i '' 's/@ApiModelProperty(value = \([^)]*\))/@Schema(description = \1)/g' "$file"
+ sed -i '' 's/@ApiModelProperty(\([^)]*\))/@Schema(description = \1)/g' "$file"
+ sed -i '' 's/@ApiOperation(\([^)]*\))/@Operation(summary = \1)/g' "$file"
+ sed -i '' 's/@ApiParam(\([^)]*\))/@Parameter(\1)/g' "$file"
+
+done
+
+echo "注解迁移完成!"
+
+# 更新 SwaggerConfig.java
+echo "更新 SwaggerConfig.java..."
+
+cat > src/main/java/com/gxwebsoft/common/core/config/OpenApiConfig.java << 'EOF'
+package com.gxwebsoft.common.core.config;
+
+import io.swagger.v3.oas.models.OpenAPI;
+import io.swagger.v3.oas.models.info.Contact;
+import io.swagger.v3.oas.models.info.Info;
+import io.swagger.v3.oas.models.security.SecurityRequirement;
+import io.swagger.v3.oas.models.security.SecurityScheme;
+import io.swagger.v3.oas.models.Components;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.annotation.Resource;
+
+/**
+ * OpenAPI 配置
+ *
+ * @author WebSoft
+ * @since 2025-09-11
+ */
+@Configuration
+public class OpenApiConfig {
+
+ @Resource
+ private ConfigProperties config;
+
+ @Bean
+ public OpenAPI customOpenAPI() {
+ return new OpenAPI()
+ .info(new Info()
+ .title(config.getSwaggerTitle())
+ .description(config.getSwaggerDescription())
+ .version(config.getSwaggerVersion())
+ .contact(new Contact()
+ .name("科技小王子")
+ .url("https://websoft.top")
+ .email("170083662@qq.com")))
+ .addSecurityItem(new SecurityRequirement().addList("Authorization"))
+ .components(new Components()
+ .addSecuritySchemes("Authorization",
+ new SecurityScheme()
+ .type(SecurityScheme.Type.HTTP)
+ .scheme("bearer")
+ .bearerFormat("JWT")
+ .description("JWT 认证")));
+ }
+}
+EOF
+
+echo "OpenAPI 配置文件创建完成!"
+echo "迁移脚本执行完成!请检查编译结果。"
diff --git a/pom-backup.xml b/pom-backup.xml
new file mode 100644
index 0000000..83b4bc2
--- /dev/null
+++ b/pom-backup.xml
@@ -0,0 +1,370 @@
+
+
+ 4.0.0
+
+ com.gxwebsoft
+ com-gxwebsoft-modules
+ 1.5.0
+
+ com-gxwebsoft-api
+ WebSoftApi project for Spring Boot
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.7.18
+
+
+
+
+ 17
+ UTF-8
+ UTF-8
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-devtools
+ runtime
+ true
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+
+
+ mysql
+ mysql-connector-java
+ runtime
+
+
+
+
+ com.alibaba
+ druid-spring-boot-starter
+ 1.2.6
+
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ 3.4.3.3
+
+
+
+
+ com.github.yulichang
+ mybatis-plus-join-boot-starter
+ 1.4.5
+
+
+
+
+ com.baomidou
+ mybatis-plus-generator
+ 3.4.1
+
+
+
+
+ cn.hutool
+ hutool-core
+ 5.8.11
+
+
+ cn.hutool
+ hutool-extra
+ 5.8.11
+
+
+ cn.hutool
+ hutool-http
+ 5.8.11
+
+
+ cn.hutool
+ hutool-crypto
+ 5.8.11
+
+
+
+
+ cn.afterturn
+ easypoi-base
+ 4.4.0
+
+
+
+
+ org.apache.tika
+ tika-core
+ 2.1.0
+
+
+
+
+ com.github.livesense
+ jodconverter-core
+ 1.0.5
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-mail
+
+
+
+
+ com.ibeetl
+ beetl
+ 3.6.1.RELEASE
+
+
+
+
+ io.springfox
+ springfox-boot-starter
+ 3.0.0
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+
+ io.jsonwebtoken
+ jjwt-impl
+ 0.11.2
+
+
+ io.jsonwebtoken
+ jjwt-jackson
+ 0.11.2
+
+
+
+
+ com.github.whvcse
+ easy-captcha
+ 1.6.2
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ com.aliyun
+ aliyun-java-sdk-core
+ 4.4.3
+
+
+
+ com.alipay.sdk
+ alipay-sdk-java
+ 4.35.0.ALL
+
+
+
+ org.bouncycastle
+ bcprov-jdk15on
+ 1.70
+
+
+
+ commons-logging
+ commons-logging
+ 1.2
+
+
+
+ com.alibaba
+ fastjson
+ 2.0.20
+
+
+
+
+ com.google.zxing
+ core
+ 3.3.3
+
+
+
+ com.google.code.gson
+ gson
+ 2.8.0
+
+
+
+ com.vaadin.external.google
+ android-json
+ 0.0.20131108.vaadin1
+ compile
+
+
+
+
+ com.corundumstudio.socketio
+ netty-socketio
+ 2.0.3
+
+
+
+
+ com.github.wechatpay-apiv3
+ wechatpay-java
+ 0.2.15
+
+
+
+ com.github.binarywang
+ weixin-java-miniapp
+ 4.5.0
+
+
+
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ 3.17.0
+
+
+
+
+ com.aliyun
+ green20220302
+ 1.0.8
+
+
+
+ org.springframework.boot
+ spring-boot-starter-freemarker
+
+
+
+
+ com.getui.push
+ restful-sdk
+ 1.0.0.14
+
+
+
+
+ com.github.xiaoymin
+ knife4j-spring-boot-starter
+ 3.0.3
+
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*Mapper.xml
+
+
+
+ src/main/resources
+
+ **
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 2.5.4
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 17
+ 17
+
+
+
+
+
+
+
+
+
+ aliYunMaven
+ https://maven.aliyun.com/repository/public
+
+
+ com.e-iceblue
+ e-iceblue
+ https://repo.e-iceblue.cn/repository/maven-public/
+
+
+
+
diff --git a/pom-optimized.xml b/pom-optimized.xml
new file mode 100644
index 0000000..73af85a
--- /dev/null
+++ b/pom-optimized.xml
@@ -0,0 +1,364 @@
+
+
+ 4.0.0
+
+ com.gxwebsoft
+ com-gxwebsoft-server
+ 1.5.2
+
+ com-gxwebsoft-api
+ WebSoftApi project for Spring Boot
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.7.18
+
+
+
+
+ 17
+ UTF-8
+ UTF-8
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-devtools
+ runtime
+ true
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+
+
+ com.mysql
+ mysql-connector-j
+ runtime
+
+
+
+
+ com.alibaba
+ druid-spring-boot-starter
+ 1.2.20
+
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ 3.4.3.3
+
+
+
+
+ com.github.yulichang
+ mybatis-plus-join-boot-starter
+ 1.4.5
+
+
+
+
+ com.baomidou
+ mybatis-plus-generator
+ 3.4.1
+
+
+
+
+ cn.hutool
+ hutool-core
+ 5.8.25
+
+
+ cn.hutool
+ hutool-extra
+ 5.8.25
+
+
+ cn.hutool
+ hutool-http
+ 5.8.25
+
+
+ cn.hutool
+ hutool-crypto
+ 5.8.25
+
+
+
+
+ cn.afterturn
+ easypoi-base
+ 4.4.0
+
+
+
+
+ org.apache.tika
+ tika-core
+ 2.9.1
+
+
+
+
+ com.github.livesense
+ jodconverter-core
+ 1.0.5
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-mail
+
+
+
+
+ com.ibeetl
+ beetl
+ 3.15.10.RELEASE
+
+
+
+
+ org.springdoc
+ springdoc-openapi-ui
+ 1.7.0
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+
+ io.jsonwebtoken
+ jjwt-api
+ 0.11.5
+
+
+ io.jsonwebtoken
+ jjwt-impl
+ 0.11.5
+ runtime
+
+
+ io.jsonwebtoken
+ jjwt-jackson
+ 0.11.5
+ runtime
+
+
+
+
+ com.github.whvcse
+ easy-captcha
+ 1.6.2
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+
+
+ com.aliyun
+ aliyun-java-sdk-core
+ 4.4.3
+
+
+
+ com.alipay.sdk
+ alipay-sdk-java
+ 4.35.0.ALL
+
+
+
+ org.bouncycastle
+ bcprov-jdk18on
+ 1.77
+
+
+
+ commons-logging
+ commons-logging
+ 1.3.0
+
+
+
+ com.alibaba
+ fastjson
+ 2.0.43
+
+
+
+
+ com.google.zxing
+ core
+ 3.5.2
+
+
+
+ com.google.code.gson
+ gson
+ 2.10.1
+
+
+
+ com.vaadin.external.google
+ android-json
+ 0.0.20131108.vaadin1
+ compile
+
+
+
+
+ com.corundumstudio.socketio
+ netty-socketio
+ 2.0.2
+
+
+
+
+ com.github.wechatpay-apiv3
+ wechatpay-java
+ 0.2.17
+
+
+
+
+ com.github.binarywang
+ weixin-java-miniapp
+ 4.6.0
+
+
+
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ 3.17.4
+
+
+
+
+ com.github.xiaoymin
+ knife4j-openapi3-spring-boot-starter
+ 4.3.0
+
+
+
+
+ com.squareup.okhttp3
+ okhttp
+ 4.12.0
+
+
+
+
+ com.github.ben-manes.caffeine
+ caffeine
+ 3.1.8
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*Mapper.xml
+
+
+
+ src/main/resources
+
+ **
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 17
+ 17
+
+
+
+
+
+
+
+ aliYunMaven
+ https://maven.aliyun.com/repository/public
+
+
+
+
diff --git a/pom.xml b/pom.xml
index d32d3f6..73af85a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -13,14 +13,12 @@
org.springframework.boot
spring-boot-starter-parent
- 2.5.4
+ 2.7.18
17
- 17
- 17
UTF-8
UTF-8
@@ -47,7 +45,7 @@
spring-boot-starter-web
-
+
com.fasterxml.jackson.datatype
jackson-datatype-jsr310
@@ -75,8 +73,8 @@
- mysql
- mysql-connector-java
+ com.mysql
+ mysql-connector-j
runtime
@@ -84,7 +82,7 @@
com.alibaba
druid-spring-boot-starter
- 1.2.6
+ 1.2.20
@@ -112,22 +110,22 @@
cn.hutool
hutool-core
- 5.8.11
+ 5.8.25
cn.hutool
hutool-extra
- 5.8.11
+ 5.8.25
cn.hutool
hutool-http
- 5.8.11
+ 5.8.25
cn.hutool
hutool-crypto
- 5.8.11
+ 5.8.25
@@ -141,7 +139,7 @@
org.apache.tika
tika-core
- 2.1.0
+ 2.9.1
@@ -161,14 +159,14 @@
com.ibeetl
beetl
- 3.6.1.RELEASE
+ 3.15.10.RELEASE
-
+
- io.springfox
- springfox-boot-starter
- 3.0.0
+ org.springdoc
+ springdoc-openapi-ui
+ 1.7.0
@@ -178,15 +176,22 @@
+
+ io.jsonwebtoken
+ jjwt-api
+ 0.11.5
+
io.jsonwebtoken
jjwt-impl
- 0.11.2
+ 0.11.5
+ runtime
io.jsonwebtoken
jjwt-jackson
- 0.11.2
+ 0.11.5
+ runtime
@@ -202,12 +207,6 @@
spring-boot-starter-data-redis
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
com.aliyun
@@ -220,36 +219,36 @@
alipay-sdk-java
4.35.0.ALL
-
+
org.bouncycastle
- bcprov-jdk15on
- 1.70
+ bcprov-jdk18on
+ 1.77
-
+
commons-logging
commons-logging
- 1.2
+ 1.3.0
-
+
com.alibaba
fastjson
- 2.0.20
+ 2.0.43
com.google.zxing
core
- 3.3.3
+ 3.5.2
com.google.code.gson
gson
- 2.8.0
+ 2.10.1
@@ -263,55 +262,56 @@
com.corundumstudio.socketio
netty-socketio
- 2.0.3
+ 2.0.2
com.github.wechatpay-apiv3
wechatpay-java
- 0.2.15
+ 0.2.17
+
com.github.binarywang
weixin-java-miniapp
- 4.5.0
+ 4.6.0
com.aliyun.oss
aliyun-sdk-oss
- 3.17.0
+ 3.17.4
-
-
- com.aliyun
- green20220302
- 1.0.8
-
-
-
- org.springframework.boot
- spring-boot-starter-freemarker
-
-
-
-
- com.getui.push
- restful-sdk
- 1.0.0.14
-
-
-
+
com.github.xiaoymin
- knife4j-spring-boot-starter
- 3.0.3
+ knife4j-openapi3-spring-boot-starter
+ 4.3.0
+
+
+ com.squareup.okhttp3
+ okhttp
+ 4.12.0
+
+
+
+
+ com.github.ben-manes.caffeine
+ caffeine
+ 3.1.8
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+
@@ -334,7 +334,6 @@
org.springframework.boot
spring-boot-maven-plugin
- 2.5.4
@@ -344,17 +343,15 @@
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 17
- 17
-
-
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 17
+ 17
+
+
-
-
@@ -362,11 +359,6 @@
aliYunMaven
https://maven.aliyun.com/repository/public
-
- com.e-iceblue
- e-iceblue
- https://repo.e-iceblue.cn/repository/maven-public/
-
diff --git a/src/main/java/com/gxwebsoft/cms/controller/CmsAdController.java b/src/main/java/com/gxwebsoft/cms/controller/CmsAdController.java
index 006681c..a65a624 100644
--- a/src/main/java/com/gxwebsoft/cms/controller/CmsAdController.java
+++ b/src/main/java/com/gxwebsoft/cms/controller/CmsAdController.java
@@ -10,8 +10,8 @@ import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -24,21 +24,21 @@ import java.util.List;
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
-@Api(tags = "广告位管理")
+@Tag(name = "广告位管理")
@RestController
@RequestMapping("/api/cms/cms-ad")
public class CmsAdController extends BaseController {
@Resource
private CmsAdService cmsAdService;
- @ApiOperation("分页查询广告位")
+ @Operation(summary = "分页查询广告位")
@GetMapping("/page")
public ApiResult> page(CmsAdParam param) {
// 使用关联查询
return success(cmsAdService.pageRel(param));
}
- @ApiOperation("查询全部广告位")
+ @Operation(summary = "查询全部广告位")
@GetMapping()
public ApiResult> list(CmsAdParam param) {
PageParam page = new PageParam<>(param);
@@ -50,7 +50,7 @@ public class CmsAdController extends BaseController {
@PreAuthorize("hasAuthority('cms:cmsAd:list')")
@OperationLog
- @ApiOperation("根据id查询广告位")
+ @Operation(summary = "根据id查询广告位")
@GetMapping("/{id}")
public ApiResult get(@PathVariable("id") Integer id) {
return success(cmsAdService.getById(id));
@@ -58,7 +58,7 @@ public class CmsAdController extends BaseController {
//return success(cmsAdService.getByIdRel(id));
}
- @ApiOperation("添加广告位")
+ @Operation(summary = "添加广告位")
@PostMapping()
public ApiResult> save(@RequestBody CmsAd cmsAd) {
// 记录当前登录用户id
@@ -72,7 +72,7 @@ public class CmsAdController extends BaseController {
return fail("添加失败");
}
- @ApiOperation("修改广告位")
+ @Operation(summary = "修改广告位")
@PutMapping()
public ApiResult> update(@RequestBody CmsAd cmsAd) {
if (cmsAdService.updateById(cmsAd)) {
@@ -81,7 +81,7 @@ public class CmsAdController extends BaseController {
return fail("修改失败");
}
- @ApiOperation("删除广告位")
+ @Operation(summary = "删除广告位")
@DeleteMapping("/{id}")
public ApiResult> remove(@PathVariable("id") Integer id) {
if (cmsAdService.removeById(id)) {
@@ -90,7 +90,7 @@ public class CmsAdController extends BaseController {
return fail("删除失败");
}
- @ApiOperation("批量添加广告位")
+ @Operation(summary = "批量添加广告位")
@PostMapping("/batch")
public ApiResult> saveBatch(@RequestBody List list) {
if (cmsAdService.saveBatch(list)) {
@@ -99,7 +99,7 @@ public class CmsAdController extends BaseController {
return fail("添加失败");
}
- @ApiOperation("批量修改广告位")
+ @Operation(summary = "批量修改广告位")
@PutMapping("/batch")
public ApiResult> removeBatch(@RequestBody BatchParam batchParam) {
if (batchParam.update(cmsAdService, "ad_id")) {
@@ -108,7 +108,7 @@ public class CmsAdController extends BaseController {
return fail("修改失败");
}
- @ApiOperation("批量删除广告位")
+ @Operation(summary = "批量删除广告位")
@DeleteMapping("/batch")
public ApiResult> removeBatch(@RequestBody List ids) {
if (cmsAdService.removeByIds(ids)) {
diff --git a/src/main/java/com/gxwebsoft/cms/controller/CmsAdRecordController.java b/src/main/java/com/gxwebsoft/cms/controller/CmsAdRecordController.java
index 53ad1c7..e449a3f 100644
--- a/src/main/java/com/gxwebsoft/cms/controller/CmsAdRecordController.java
+++ b/src/main/java/com/gxwebsoft/cms/controller/CmsAdRecordController.java
@@ -10,8 +10,8 @@ import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -24,21 +24,21 @@ import java.util.List;
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
-@Api(tags = "广告图片管理")
+@Tag(name = "广告图片管理")
@RestController
@RequestMapping("/api/cms/cms-ad-record")
public class CmsAdRecordController extends BaseController {
@Resource
private CmsAdRecordService cmsAdRecordService;
- @ApiOperation("分页查询广告图片")
+ @Operation(summary = "分页查询广告图片")
@GetMapping("/page")
public ApiResult> page(CmsAdRecordParam param) {
// 使用关联查询
return success(cmsAdRecordService.pageRel(param));
}
- @ApiOperation("查询全部广告图片")
+ @Operation(summary = "查询全部广告图片")
@GetMapping()
public ApiResult> list(CmsAdRecordParam param) {
PageParam page = new PageParam<>(param);
@@ -50,7 +50,7 @@ public class CmsAdRecordController extends BaseController {
@PreAuthorize("hasAuthority('cms:cmsAdRecord:list')")
@OperationLog
- @ApiOperation("根据id查询广告图片")
+ @Operation(summary = "根据id查询广告图片")
@GetMapping("/{id}")
public ApiResult get(@PathVariable("id") Integer id) {
return success(cmsAdRecordService.getById(id));
@@ -58,7 +58,7 @@ public class CmsAdRecordController extends BaseController {
//return success(cmsAdRecordService.getByIdRel(id));
}
- @ApiOperation("添加广告图片")
+ @Operation(summary = "添加广告图片")
@PostMapping()
public ApiResult> save(@RequestBody CmsAdRecord cmsAdRecord) {
if (cmsAdRecordService.save(cmsAdRecord)) {
@@ -67,7 +67,7 @@ public class CmsAdRecordController extends BaseController {
return fail("添加失败");
}
- @ApiOperation("修改广告图片")
+ @Operation(summary = "修改广告图片")
@PutMapping()
public ApiResult> update(@RequestBody CmsAdRecord cmsAdRecord) {
if (cmsAdRecordService.updateById(cmsAdRecord)) {
@@ -76,7 +76,7 @@ public class CmsAdRecordController extends BaseController {
return fail("修改失败");
}
- @ApiOperation("删除广告图片")
+ @Operation(summary = "删除广告图片")
@DeleteMapping("/{id}")
public ApiResult> remove(@PathVariable("id") Integer id) {
if (cmsAdRecordService.removeById(id)) {
@@ -85,7 +85,7 @@ public class CmsAdRecordController extends BaseController {
return fail("删除失败");
}
- @ApiOperation("批量添加广告图片")
+ @Operation(summary = "批量添加广告图片")
@PostMapping("/batch")
public ApiResult> saveBatch(@RequestBody List list) {
if (cmsAdRecordService.saveBatch(list)) {
@@ -94,7 +94,7 @@ public class CmsAdRecordController extends BaseController {
return fail("添加失败");
}
- @ApiOperation("批量修改广告图片")
+ @Operation(summary = "批量修改广告图片")
@PutMapping("/batch")
public ApiResult> removeBatch(@RequestBody BatchParam batchParam) {
if (batchParam.update(cmsAdRecordService, "ad_record_id")) {
@@ -103,7 +103,7 @@ public class CmsAdRecordController extends BaseController {
return fail("修改失败");
}
- @ApiOperation("批量删除广告图片")
+ @Operation(summary = "批量删除广告图片")
@DeleteMapping("/batch")
public ApiResult> removeBatch(@RequestBody List ids) {
if (cmsAdRecordService.removeByIds(ids)) {
diff --git a/src/main/java/com/gxwebsoft/cms/controller/CmsArticleCategoryController.java b/src/main/java/com/gxwebsoft/cms/controller/CmsArticleCategoryController.java
index e36ef2f..c6a67ab 100644
--- a/src/main/java/com/gxwebsoft/cms/controller/CmsArticleCategoryController.java
+++ b/src/main/java/com/gxwebsoft/cms/controller/CmsArticleCategoryController.java
@@ -10,8 +10,8 @@ import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -24,35 +24,35 @@ import java.util.List;
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
-@Api(tags = "文章分类表管理")
+@Tag(name = "文章分类表管理")
@RestController
@RequestMapping("/api/cms/cms-article-category")
public class CmsArticleCategoryController extends BaseController {
@Resource
private CmsArticleCategoryService cmsArticleCategoryService;
- @ApiOperation("分页查询文章分类表")
+ @Operation(summary = "分页查询文章分类表")
@GetMapping("/page")
public ApiResult> page(CmsArticleCategoryParam param) {
// 使用关联查询
return success(cmsArticleCategoryService.pageRel(param));
}
- @ApiOperation("查询全部文章分类表")
+ @Operation(summary = "查询全部文章分类表")
@GetMapping()
public ApiResult> list(CmsArticleCategoryParam param) {
// 使用关联查询
return success(cmsArticleCategoryService.listRel(param));
}
- @ApiOperation("根据id查询文章分类表")
+ @Operation(summary = "根据id查询文章分类表")
@GetMapping("/{id}")
public ApiResult get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(cmsArticleCategoryService.getByIdRel(id));
}
- @ApiOperation("添加文章分类表")
+ @Operation(summary = "添加文章分类表")
@PostMapping()
public ApiResult> save(@RequestBody CmsArticleCategory cmsArticleCategory) {
// 记录当前登录用户id
@@ -66,7 +66,7 @@ public class CmsArticleCategoryController extends BaseController {
return fail("添加失败");
}
- @ApiOperation("修改文章分类表")
+ @Operation(summary = "修改文章分类表")
@PutMapping()
public ApiResult> update(@RequestBody CmsArticleCategory cmsArticleCategory) {
if (cmsArticleCategoryService.updateById(cmsArticleCategory)) {
@@ -75,7 +75,7 @@ public class CmsArticleCategoryController extends BaseController {
return fail("修改失败");
}
- @ApiOperation("删除文章分类表")
+ @Operation(summary = "删除文章分类表")
@DeleteMapping("/{id}")
public ApiResult> remove(@PathVariable("id") Integer id) {
if (cmsArticleCategoryService.removeById(id)) {
@@ -84,7 +84,7 @@ public class CmsArticleCategoryController extends BaseController {
return fail("删除失败");
}
- @ApiOperation("批量添加文章分类表")
+ @Operation(summary = "批量添加文章分类表")
@PostMapping("/batch")
public ApiResult> saveBatch(@RequestBody List list) {
if (cmsArticleCategoryService.saveBatch(list)) {
@@ -93,7 +93,7 @@ public class CmsArticleCategoryController extends BaseController {
return fail("添加失败");
}
- @ApiOperation("批量修改文章分类表")
+ @Operation(summary = "批量修改文章分类表")
@PutMapping("/batch")
public ApiResult> removeBatch(@RequestBody BatchParam batchParam) {
if (batchParam.update(cmsArticleCategoryService, "category_id")) {
@@ -102,7 +102,7 @@ public class CmsArticleCategoryController extends BaseController {
return fail("修改失败");
}
- @ApiOperation("批量删除文章分类表")
+ @Operation(summary = "批量删除文章分类表")
@DeleteMapping("/batch")
public ApiResult> removeBatch(@RequestBody List ids) {
if (cmsArticleCategoryService.removeByIds(ids)) {
diff --git a/src/main/java/com/gxwebsoft/cms/controller/CmsArticleCommentController.java b/src/main/java/com/gxwebsoft/cms/controller/CmsArticleCommentController.java
index f2b4338..51ed99e 100644
--- a/src/main/java/com/gxwebsoft/cms/controller/CmsArticleCommentController.java
+++ b/src/main/java/com/gxwebsoft/cms/controller/CmsArticleCommentController.java
@@ -10,8 +10,8 @@ import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -24,21 +24,21 @@ import java.util.List;
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
-@Api(tags = "文章评论表管理")
+@Tag(name = "文章评论表管理")
@RestController
@RequestMapping("/api/cms/cms-article-comment")
public class CmsArticleCommentController extends BaseController {
@Resource
private CmsArticleCommentService cmsArticleCommentService;
- @ApiOperation("分页查询文章评论表")
+ @Operation(summary = "分页查询文章评论表")
@GetMapping("/page")
public ApiResult> page(CmsArticleCommentParam param) {
// 使用关联查询
return success(cmsArticleCommentService.pageRel(param));
}
- @ApiOperation("查询全部文章评论表")
+ @Operation(summary = "查询全部文章评论表")
@GetMapping()
public ApiResult> list(CmsArticleCommentParam param) {
PageParam page = new PageParam<>(param);
@@ -50,7 +50,7 @@ public class CmsArticleCommentController extends BaseController {
@PreAuthorize("hasAuthority('cms:cmsArticleComment:list')")
@OperationLog
- @ApiOperation("根据id查询文章评论表")
+ @Operation(summary = "根据id查询文章评论表")
@GetMapping("/{id}")
public ApiResult get(@PathVariable("id") Integer id) {
return success(cmsArticleCommentService.getById(id));
@@ -58,7 +58,7 @@ public class CmsArticleCommentController extends BaseController {
//return success(cmsArticleCommentService.getByIdRel(id));
}
- @ApiOperation("添加文章评论表")
+ @Operation(summary = "添加文章评论表")
@PostMapping()
public ApiResult> save(@RequestBody CmsArticleComment cmsArticleComment) {
// 记录当前登录用户id
@@ -72,7 +72,7 @@ public class CmsArticleCommentController extends BaseController {
return fail("添加失败");
}
- @ApiOperation("修改文章评论表")
+ @Operation(summary = "修改文章评论表")
@PutMapping()
public ApiResult> update(@RequestBody CmsArticleComment cmsArticleComment) {
if (cmsArticleCommentService.updateById(cmsArticleComment)) {
@@ -81,7 +81,7 @@ public class CmsArticleCommentController extends BaseController {
return fail("修改失败");
}
- @ApiOperation("删除文章评论表")
+ @Operation(summary = "删除文章评论表")
@DeleteMapping("/{id}")
public ApiResult> remove(@PathVariable("id") Integer id) {
if (cmsArticleCommentService.removeById(id)) {
@@ -90,7 +90,7 @@ public class CmsArticleCommentController extends BaseController {
return fail("删除失败");
}
- @ApiOperation("批量添加文章评论表")
+ @Operation(summary = "批量添加文章评论表")
@PostMapping("/batch")
public ApiResult> saveBatch(@RequestBody List list) {
if (cmsArticleCommentService.saveBatch(list)) {
@@ -99,7 +99,7 @@ public class CmsArticleCommentController extends BaseController {
return fail("添加失败");
}
- @ApiOperation("批量修改文章评论表")
+ @Operation(summary = "批量修改文章评论表")
@PutMapping("/batch")
public ApiResult> removeBatch(@RequestBody BatchParam batchParam) {
if (batchParam.update(cmsArticleCommentService, "comment_id")) {
@@ -108,7 +108,7 @@ public class CmsArticleCommentController extends BaseController {
return fail("修改失败");
}
- @ApiOperation("批量删除文章评论表")
+ @Operation(summary = "批量删除文章评论表")
@DeleteMapping("/batch")
public ApiResult> removeBatch(@RequestBody List ids) {
if (cmsArticleCommentService.removeByIds(ids)) {
diff --git a/src/main/java/com/gxwebsoft/cms/controller/CmsArticleContentController.java b/src/main/java/com/gxwebsoft/cms/controller/CmsArticleContentController.java
index 3f587fc..abfc529 100644
--- a/src/main/java/com/gxwebsoft/cms/controller/CmsArticleContentController.java
+++ b/src/main/java/com/gxwebsoft/cms/controller/CmsArticleContentController.java
@@ -10,8 +10,8 @@ import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -24,21 +24,21 @@ import java.util.List;
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
-@Api(tags = "文章记录表管理")
+@Tag(name = "文章记录表管理")
@RestController
@RequestMapping("/api/cms/cms-article-content")
public class CmsArticleContentController extends BaseController {
@Resource
private CmsArticleContentService cmsArticleContentService;
- @ApiOperation("分页查询文章记录表")
+ @Operation(summary = "分页查询文章记录表")
@GetMapping("/page")
public ApiResult> page(CmsArticleContentParam param) {
// 使用关联查询
return success(cmsArticleContentService.pageRel(param));
}
- @ApiOperation("查询全部文章记录表")
+ @Operation(summary = "查询全部文章记录表")
@GetMapping()
public ApiResult> list(CmsArticleContentParam param) {
PageParam page = new PageParam<>(param);
@@ -50,7 +50,7 @@ public class CmsArticleContentController extends BaseController {
@PreAuthorize("hasAuthority('cms:cmsArticleContent:list')")
@OperationLog
- @ApiOperation("根据id查询文章记录表")
+ @Operation(summary = "根据id查询文章记录表")
@GetMapping("/{id}")
public ApiResult get(@PathVariable("id") Integer id) {
return success(cmsArticleContentService.getById(id));
@@ -58,7 +58,7 @@ public class CmsArticleContentController extends BaseController {
//return success(cmsArticleContentService.getByIdRel(id));
}
- @ApiOperation("添加文章记录表")
+ @Operation(summary = "添加文章记录表")
@PostMapping()
public ApiResult> save(@RequestBody CmsArticleContent cmsArticleContent) {
if (cmsArticleContentService.save(cmsArticleContent)) {
@@ -67,7 +67,7 @@ public class CmsArticleContentController extends BaseController {
return fail("添加失败");
}
- @ApiOperation("修改文章记录表")
+ @Operation(summary = "修改文章记录表")
@PutMapping()
public ApiResult> update(@RequestBody CmsArticleContent cmsArticleContent) {
if (cmsArticleContentService.updateById(cmsArticleContent)) {
@@ -76,7 +76,7 @@ public class CmsArticleContentController extends BaseController {
return fail("修改失败");
}
- @ApiOperation("删除文章记录表")
+ @Operation(summary = "删除文章记录表")
@DeleteMapping("/{id}")
public ApiResult> remove(@PathVariable("id") Integer id) {
if (cmsArticleContentService.removeById(id)) {
@@ -85,7 +85,7 @@ public class CmsArticleContentController extends BaseController {
return fail("删除失败");
}
- @ApiOperation("批量添加文章记录表")
+ @Operation(summary = "批量添加文章记录表")
@PostMapping("/batch")
public ApiResult> saveBatch(@RequestBody List list) {
if (cmsArticleContentService.saveBatch(list)) {
@@ -94,7 +94,7 @@ public class CmsArticleContentController extends BaseController {
return fail("添加失败");
}
- @ApiOperation("批量修改文章记录表")
+ @Operation(summary = "批量修改文章记录表")
@PutMapping("/batch")
public ApiResult> removeBatch(@RequestBody BatchParam batchParam) {
if (batchParam.update(cmsArticleContentService, "id")) {
@@ -103,7 +103,7 @@ public class CmsArticleContentController extends BaseController {
return fail("修改失败");
}
- @ApiOperation("批量删除文章记录表")
+ @Operation(summary = "批量删除文章记录表")
@DeleteMapping("/batch")
public ApiResult> removeBatch(@RequestBody List ids) {
if (cmsArticleContentService.removeByIds(ids)) {
diff --git a/src/main/java/com/gxwebsoft/cms/controller/CmsArticleController.java b/src/main/java/com/gxwebsoft/cms/controller/CmsArticleController.java
index abc26a8..58f0ae7 100644
--- a/src/main/java/com/gxwebsoft/cms/controller/CmsArticleController.java
+++ b/src/main/java/com/gxwebsoft/cms/controller/CmsArticleController.java
@@ -16,8 +16,8 @@ import com.gxwebsoft.common.core.web.BatchParam;
import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.common.system.entity.User;
import com.gxwebsoft.common.system.service.UserService;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.Operation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
@@ -32,7 +32,7 @@ import java.util.Map;
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
-@Api(tags = "文章管理")
+@Tag(name = "文章管理")
@RestController
@RequestMapping("/api/cms/cms-article")
public class CmsArticleController extends BaseController {
@@ -43,21 +43,21 @@ public class CmsArticleController extends BaseController {
@Resource
private UserService userService;
- @ApiOperation("分页查询文章")
+ @Operation(summary = "分页查询文章")
@GetMapping("/page")
public ApiResult> page(CmsArticleParam param) {
// 使用关联查询
return success(cmsArticleService.pageRel(param));
}
- @ApiOperation("查询全部文章")
+ @Operation(summary = "查询全部文章")
@GetMapping()
public ApiResult> list(CmsArticleParam param) {
// 使用关联查询
return success(cmsArticleService.listRel(param));
}
- @ApiOperation("根据id查询文章")
+ @Operation(summary = "根据id查询文章")
@GetMapping("/{id}")
public ApiResult get(@PathVariable("id") Integer id) {
// 使用关联查询
@@ -73,7 +73,7 @@ public class CmsArticleController extends BaseController {
return success(article);
}
@PreAuthorize("hasAuthority('cms:cmsArticle:save')")
- @ApiOperation("添加文章")
+ @Operation(summary = "添加文章")
@PostMapping()
public ApiResult> save(@RequestBody CmsArticle article) {
// 记录当前登录用户id
@@ -99,7 +99,7 @@ public class CmsArticleController extends BaseController {
}
@PreAuthorize("hasAuthority('cms:cmsArticle:update')")
- @ApiOperation("修改文章")
+ @Operation(summary = "修改文章")
@PutMapping()
public ApiResult> update(@RequestBody CmsArticle cmsArticle) {
// 是否密码可见
@@ -113,7 +113,7 @@ public class CmsArticleController extends BaseController {
}
@PreAuthorize("hasAuthority('cms:cmsArticle:remove')")
- @ApiOperation("删除文章")
+ @Operation(summary = "删除文章")
@DeleteMapping("/{id}")
public ApiResult> remove(@PathVariable("id") Integer id) {
if (cmsArticleService.removeById(id)) {
@@ -123,7 +123,7 @@ public class CmsArticleController extends BaseController {
}
@PreAuthorize("hasAuthority('cms:cmsArticle:save')")
- @ApiOperation("批量添加文章")
+ @Operation(summary = "批量添加文章")
@PostMapping("/batch")
public ApiResult> saveBatch(@RequestBody List list) {
if (cmsArticleService.saveBatch(list)) {
@@ -133,7 +133,7 @@ public class CmsArticleController extends BaseController {
}
@PreAuthorize("hasAuthority('cms:cmsArticle:update')")
- @ApiOperation("批量修改文章")
+ @Operation(summary = "批量修改文章")
@PutMapping("/batch")
public ApiResult> removeBatch(@RequestBody BatchParam batchParam) {
if (batchParam.update(cmsArticleService, "article_id")) {
@@ -143,7 +143,7 @@ public class CmsArticleController extends BaseController {
}
@PreAuthorize("hasAuthority('cms:cmsArticle:remove')")
- @ApiOperation("批量删除文章")
+ @Operation(summary = "批量删除文章")
@DeleteMapping("/batch")
public ApiResult> removeBatch(@RequestBody List ids) {
if (cmsArticleService.removeByIds(ids)) {
@@ -152,7 +152,7 @@ public class CmsArticleController extends BaseController {
return fail("删除失败");
}
- @ApiOperation("读取上一篇")
+ @Operation(summary = "读取上一篇")
@GetMapping("/getPrevious/{id}")
public ApiResult getPrevious(@PathVariable("id") Integer id) {
LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
@@ -165,7 +165,7 @@ public class CmsArticleController extends BaseController {
return success(article);
}
- @ApiOperation("读取下一篇")
+ @Operation(summary = "读取下一篇")
@GetMapping("/getNext/{id}")
public ApiResult getNext(@PathVariable("id") Integer id) {
LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>();
@@ -178,7 +178,7 @@ public class CmsArticleController extends BaseController {
return success(article);
}
- @ApiOperation("统计信息")
+ @Operation(summary = "统计信息")
@GetMapping("/data")
public ApiResult