🎉 4.0.0.RELEASE 升级 SpringBoot3 SpringCloud2023 JDK17

This commit is contained in:
smallchill 2024-04-22 00:19:47 +08:00
parent 15359e5cf1
commit 31b94c25d1
155 changed files with 1073 additions and 1203 deletions

View File

@ -1,9 +1,9 @@
<p align="center"> <p align="center">
<img src="https://img.shields.io/badge/Release-V3.7.1-green.svg" alt="Downloads"> <img src="https://img.shields.io/badge/Release-V4.0.0-green.svg" alt="Downloads">
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status"> <img src="https://img.shields.io/badge/JDK-17+-green.svg" alt="Build Status">
<img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="Build Status"> <img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="Build Status">
<img src="https://img.shields.io/badge/Spring%20Cloud-2021-blue.svg" alt="Coverage Status"> <img src="https://img.shields.io/badge/Spring%20Cloud-2023-blue.svg" alt="Coverage Status">
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.18-blue.svg" alt="Downloads"> <img src="https://img.shields.io/badge/Spring%20Boot-3.2-blue.svg" alt="Downloads">
<a target="_blank" href="https://bladex.cn"> <a target="_blank" href="https://bladex.cn">
<img src="https://img.shields.io/badge/Author-Small%20Chill-ff69b4.svg" alt="Downloads"> <img src="https://img.shields.io/badge/Author-Small%20Chill-ff69b4.svg" alt="Downloads">
</a> </a>

View File

@ -1,6 +1,6 @@
FROM anapsix/alpine-java:8_server-jre_unlimited FROM bladex/alpine-java:openjdk17_cn_slim
MAINTAINER smallchill@163.com MAINTAINER bladejava@qq.com
RUN mkdir -p /blade/auth RUN mkdir -p /blade/auth
@ -10,6 +10,6 @@ EXPOSE 8010
ADD ./target/blade-auth.jar ./app.jar ADD ./target/blade-auth.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] ENTRYPOINT ["java", "--add-opens java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"] CMD ["--spring.profiles.active=test"]

View File

@ -8,7 +8,7 @@
<parent> <parent>
<artifactId>SpringBlade</artifactId> <artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<artifactId>blade-auth</artifactId> <artifactId>blade-auth</artifactId>
@ -61,9 +61,8 @@
</dependency> </dependency>
<!-- MySQL --> <!-- MySQL -->
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>com.mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-j</artifactId>
<version>${mysql.connector.version}</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@ -93,22 +92,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
file="${project.build.directory}/${artifactId}.jar" />
</tasks>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -16,9 +16,9 @@
package org.springblade.auth.controller; package org.springblade.auth.controller;
import com.wf.captcha.SpecCaptcha; import com.wf.captcha.SpecCaptcha;
import io.swagger.annotations.Api; import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.ApiParam; import io.swagger.v3.oas.annotations.Parameter;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.auth.granter.ITokenGranter; import org.springblade.auth.granter.ITokenGranter;
import org.springblade.auth.granter.TokenGranterBuilder; import org.springblade.auth.granter.TokenGranterBuilder;
@ -47,18 +47,18 @@ import java.util.concurrent.TimeUnit;
*/ */
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@Api(value = "用户授权认证", tags = "授权接口") @Tag(name = "用户授权认证", description = "授权接口")
public class AuthController { public class AuthController {
private RedisUtil redisUtil; private RedisUtil redisUtil;
@PostMapping("token") @PostMapping("token")
@ApiOperation(value = "获取认证token", notes = "传入租户ID:tenantId,账号:account,密码:password") @Operation(summary = "获取认证token", description = "传入租户ID:tenantId,账号:account,密码:password")
public R<AuthInfo> token(@ApiParam(value = "授权类型", required = true) @RequestParam(defaultValue = "password", required = false) String grantType, public R<AuthInfo> token(@Parameter(name = "授权类型", required = true) @RequestParam(defaultValue = "password", required = false) String grantType,
@ApiParam(value = "刷新令牌") @RequestParam(required = false) String refreshToken, @Parameter(name = "刷新令牌") @RequestParam(required = false) String refreshToken,
@ApiParam(value = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId, @Parameter(name = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId,
@ApiParam(value = "账号") @RequestParam(required = false) String account, @Parameter(name = "账号") @RequestParam(required = false) String account,
@ApiParam(value = "密码") @RequestParam(required = false) String password) { @Parameter(name = "密码") @RequestParam(required = false) String password) {
String userType = Func.toStr(WebUtil.getRequest().getHeader(TokenUtil.USER_TYPE_HEADER_KEY), TokenUtil.DEFAULT_USER_TYPE); String userType = Func.toStr(WebUtil.getRequest().getHeader(TokenUtil.USER_TYPE_HEADER_KEY), TokenUtil.DEFAULT_USER_TYPE);
@ -81,7 +81,7 @@ public class AuthController {
} }
@GetMapping("/captcha") @GetMapping("/captcha")
@ApiOperation(value = "获取验证码") @Operation(summary = "获取验证码")
public R<Kv> captcha() { public R<Kv> captcha() {
SpecCaptcha specCaptcha = new SpecCaptcha(130, 48, 5); SpecCaptcha specCaptcha = new SpecCaptcha(130, 48, 5);
String verCode = specCaptcha.text().toLowerCase(); String verCode = specCaptcha.text().toLowerCase();

View File

@ -15,8 +15,8 @@
*/ */
package org.springblade.auth.controller; package org.springblade.auth.controller;
import io.swagger.annotations.Api; import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import me.zhyd.oauth.model.AuthCallback; import me.zhyd.oauth.model.AuthCallback;
@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
/** /**
@ -42,7 +42,7 @@ import java.io.IOException;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@ConditionalOnProperty(value = "social.enabled", havingValue = "true") @ConditionalOnProperty(value = "social.enabled", havingValue = "true")
@Api(value = "第三方登陆", tags = "第三方登陆端点") @Tag(name = "第三方登陆", description = "第三方登陆端点")
public class SocialController { public class SocialController {
private final SocialProperties socialProperties; private final SocialProperties socialProperties;
@ -50,7 +50,7 @@ public class SocialController {
/** /**
* 授权完毕跳转 * 授权完毕跳转
*/ */
@ApiOperation(value = "授权完毕跳转") @Operation(summary = "授权完毕跳转")
@RequestMapping("/oauth/render/{source}") @RequestMapping("/oauth/render/{source}")
public void renderAuth(@PathVariable("source") String source, HttpServletResponse response) throws IOException { public void renderAuth(@PathVariable("source") String source, HttpServletResponse response) throws IOException {
AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties);
@ -61,7 +61,7 @@ public class SocialController {
/** /**
* 获取认证信息 * 获取认证信息
*/ */
@ApiOperation(value = "获取认证信息") @Operation(summary = "获取认证信息")
@RequestMapping("/oauth/callback/{source}") @RequestMapping("/oauth/callback/{source}")
public Object login(@PathVariable("source") String source, AuthCallback callback) { public Object login(@PathVariable("source") String source, AuthCallback callback) {
AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties);
@ -71,7 +71,7 @@ public class SocialController {
/** /**
* 撤销授权 * 撤销授权
*/ */
@ApiOperation(value = "撤销授权") @Operation(summary = "撤销授权")
@RequestMapping("/oauth/revoke/{source}/{token}") @RequestMapping("/oauth/revoke/{source}/{token}")
public Object revokeAuth(@PathVariable("source") String source, @PathVariable("token") String token) { public Object revokeAuth(@PathVariable("source") String source, @PathVariable("token") String token) {
AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties);
@ -81,7 +81,7 @@ public class SocialController {
/** /**
* 续期accessToken * 续期accessToken
*/ */
@ApiOperation(value = "续期令牌") @Operation(summary = "续期令牌")
@RequestMapping("/oauth/refresh/{source}") @RequestMapping("/oauth/refresh/{source}")
public Object refreshAuth(@PathVariable("source") String source, String token) { public Object refreshAuth(@PathVariable("source") String source, String token) {
AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties); AuthRequest authRequest = SocialUtil.getAuthRequest(source, socialProperties);

View File

@ -26,7 +26,7 @@ import org.springblade.system.user.entity.UserInfo;
import org.springblade.system.user.feign.IUserClient; import org.springblade.system.user.feign.IUserClient;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
/** /**
* 验证码TokenGranter * 验证码TokenGranter

View File

@ -33,7 +33,7 @@ import org.springblade.system.user.entity.UserOauth;
import org.springblade.system.user.feign.IUserClient; import org.springblade.system.user.feign.IUserClient;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequest;
import java.util.Objects; import java.util.Objects;
/** /**
@ -79,7 +79,7 @@ public class SocialTokenGranter implements ITokenGranter {
} }
// 组装数据 // 组装数据
UserOauth userOauth = Objects.requireNonNull(BeanUtil.copy(authUser, UserOauth.class)); UserOauth userOauth = Objects.requireNonNull(BeanUtil.copyProperties(authUser, UserOauth.class));
userOauth.setSource(authUser.getSource()); userOauth.setSource(authUser.getSource());
userOauth.setTenantId(tenantId); userOauth.setTenantId(tenantId);
userOauth.setUuid(authUser.getUuid()); userOauth.setUuid(authUser.getUuid());

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>SpringBlade</artifactId> <artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -9,6 +9,16 @@ import org.springblade.core.launch.constant.AppConstant;
*/ */
public interface LauncherConstant { public interface LauncherConstant {
/**
* nacos 用户名
*/
String NACOS_USERNAME = "nacos";
/**
* nacos 密码
*/
String NACOS_PASSWORD = "nacos";
/** /**
* nacos namespace id * nacos namespace id
*/ */

View File

@ -32,6 +32,8 @@ public class LauncherServiceImpl implements LauncherService {
@Override @Override
public void launcher(SpringApplicationBuilder builder, String appName, String profile) { public void launcher(SpringApplicationBuilder builder, String appName, String profile) {
Properties props = System.getProperties(); Properties props = System.getProperties();
PropsUtil.setProperty(props, "spring.cloud.nacos.username", LauncherConstant.NACOS_USERNAME);
PropsUtil.setProperty(props, "spring.cloud.nacos.password", LauncherConstant.NACOS_PASSWORD);
PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.server-addr", LauncherConstant.nacosAddr(profile)); PropsUtil.setProperty(props, "spring.cloud.nacos.discovery.server-addr", LauncherConstant.nacosAddr(profile));
PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile)); PropsUtil.setProperty(props, "spring.cloud.nacos.config.server-addr", LauncherConstant.nacosAddr(profile));
PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile)); PropsUtil.setProperty(props, "spring.cloud.sentinel.transport.dashboard", LauncherConstant.sentinelAddr(profile));

View File

@ -1,6 +1,6 @@
FROM anapsix/alpine-java:8_server-jre_unlimited FROM bladex/alpine-java:openjdk17_cn_slim
MAINTAINER smallchill@163.com MAINTAINER bladejava@qq.com
RUN mkdir -p /blade/gateway RUN mkdir -p /blade/gateway
@ -10,6 +10,6 @@ EXPOSE 80
ADD ./target/blade-gateway.jar ./app.jar ADD ./target/blade-gateway.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] ENTRYPOINT ["java", "--add-opens java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"] CMD ["--spring.profiles.active=test"]

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>SpringBlade</artifactId> <artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -69,6 +69,11 @@
<groupId>com.alibaba.cloud</groupId> <groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId> <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency> </dependency>
<!-- 开启knife4j -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-gateway-spring-boot-starter</artifactId>
</dependency>
<!-- JWT --> <!-- JWT -->
<dependency> <dependency>
<groupId>io.jsonwebtoken</groupId> <groupId>io.jsonwebtoken</groupId>
@ -107,22 +112,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
file="${project.build.directory}/${artifactId}.jar" />
</tasks>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -24,15 +24,15 @@ import org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.DataBufferFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.lang.NonNull;
import org.springframework.web.server.ResponseStatusException; import org.springframework.web.server.ResponseStatusException;
import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import java.util.Map;
/** /**
* 异常处理 * 异常处理
* *
@ -45,43 +45,42 @@ public class ErrorExceptionHandler implements ErrorWebExceptionHandler {
private final ObjectMapper objectMapper; private final ObjectMapper objectMapper;
@NonNull
@Override @Override
public Mono<Void> handle(ServerWebExchange exchange, @NonNull Throwable ex) { public Mono<Void> handle(ServerWebExchange exchange, Throwable ex) {
ServerHttpRequest request = exchange.getRequest(); ServerHttpRequest request = exchange.getRequest();
ServerHttpResponse response = exchange.getResponse(); ServerHttpResponse response = exchange.getResponse();
if (response.isCommitted()) { if (response.isCommitted()) {
return Mono.error(ex); return Mono.error(ex);
} }
response.getHeaders().setContentType(MediaType.APPLICATION_JSON); response.getHeaders().setContentType(MediaType.APPLICATION_JSON);
if (ex instanceof ResponseStatusException) { if (ex instanceof ResponseStatusException) {
response.setStatusCode(((ResponseStatusException) ex).getStatus()); response.setStatusCode(((ResponseStatusException) ex).getStatusCode());
} }
return response.writeWith(Mono.fromSupplier(() -> { return response.writeWith(Mono.fromSupplier(() -> {
DataBufferFactory bufferFactory = response.bufferFactory(); DataBufferFactory bufferFactory = response.bufferFactory();
try { try {
HttpStatus status = HttpStatus.BAD_GATEWAY; int status = 500;
if (ex instanceof ResponseStatusException) { if (response.getStatusCode() != null) {
status = ((ResponseStatusException) ex).getStatus(); status = response.getStatusCode().value();
} }
return bufferFactory.wrap(objectMapper.writeValueAsBytes(ResponseProvider.response(status.value(), buildMessage(request, ex)))); Map<String, Object> result = ResponseProvider.response(status, this.buildMessage(request, ex));
return bufferFactory.wrap(objectMapper.writeValueAsBytes(result));
} catch (JsonProcessingException e) { } catch (JsonProcessingException e) {
e.printStackTrace();
return bufferFactory.wrap(new byte[0]); return bufferFactory.wrap(new byte[0]);
} }
})); }));
} }
/** /**
* 构建异常信息 * 构建异常信息
*/ */
private String buildMessage(ServerHttpRequest request, Throwable ex) { private String buildMessage(ServerHttpRequest request, Throwable ex) {
String uri = request.getURI().toString();
if (uri.endsWith("doc.html")) {
return "[Swagger聚合网关] 已迁移至 [blade-swagger] 服务,请开启 [blade-swagger] 服务并访问 [http://127.0.0.1:18000/doc.html]";
}
StringBuilder message = new StringBuilder("Failed to handle request ["); StringBuilder message = new StringBuilder("Failed to handle request [");
message.append(request.getMethodValue()); message.append(request.getMethod().name());
message.append(" "); message.append(" ");
message.append(request.getURI()); message.append(request.getURI());
message.append("]"); message.append("]");
@ -92,4 +91,5 @@ public class ErrorExceptionHandler implements ErrorWebExceptionHandler {
return message.toString(); return message.toString();
} }
} }

View File

@ -35,7 +35,7 @@ public class AuthProvider {
DEFAULT_SKIP_URL.add("/token/**"); DEFAULT_SKIP_URL.add("/token/**");
DEFAULT_SKIP_URL.add("/captcha/**"); DEFAULT_SKIP_URL.add("/captcha/**");
DEFAULT_SKIP_URL.add("/actuator/health/**"); DEFAULT_SKIP_URL.add("/actuator/health/**");
DEFAULT_SKIP_URL.add("/v2/api-docs/**"); DEFAULT_SKIP_URL.add("/v3/api-docs/**");
DEFAULT_SKIP_URL.add("/auth/**"); DEFAULT_SKIP_URL.add("/auth/**");
DEFAULT_SKIP_URL.add("/oauth/**"); DEFAULT_SKIP_URL.add("/oauth/**");
DEFAULT_SKIP_URL.add("/log/**"); DEFAULT_SKIP_URL.add("/log/**");

View File

@ -18,7 +18,6 @@ package org.springblade.gateway.utils;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.Base64Utils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import reactor.util.annotation.Nullable; import reactor.util.annotation.Nullable;
@ -28,6 +27,7 @@ import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.Arrays; import java.util.Arrays;
import java.util.Base64;
import java.util.Objects; import java.util.Objects;
/** /**
@ -49,7 +49,7 @@ public class JwtCrypto {
* @return {String} * @return {String}
*/ */
public static String encryptToString(String content, String aesTextKey) { public static String encryptToString(String content, String aesTextKey) {
return Base64Utils.encodeToString(encrypt(content, aesTextKey)); return Base64.getEncoder().encodeToString(encrypt(content, aesTextKey));
} }
/** /**
@ -60,7 +60,7 @@ public class JwtCrypto {
* @return {String} * @return {String}
*/ */
public static String encryptToString(byte[] content, String aesTextKey) { public static String encryptToString(byte[] content, String aesTextKey) {
return Base64Utils.encodeToString(encrypt(content, aesTextKey)); return Base64.getEncoder().encodeToString(encrypt(content, aesTextKey));
} }
/** /**
@ -109,7 +109,7 @@ public class JwtCrypto {
if (!StringUtils.hasText(content) || !StringUtils.hasText(aesTextKey)) { if (!StringUtils.hasText(content) || !StringUtils.hasText(aesTextKey)) {
return null; return null;
} }
byte[] hexBytes = decrypt(Base64Utils.decode(content.getBytes(DEFAULT_CHARSET)), aesTextKey); byte[] hexBytes = decrypt(Base64.getDecoder().decode(content.getBytes(DEFAULT_CHARSET)), aesTextKey);
return new String(hexBytes, DEFAULT_CHARSET); return new String(hexBytes, DEFAULT_CHARSET);
} }

View File

@ -0,0 +1,16 @@
knife4j:
gateway:
enabled: true
tags-sorter: order
operations-sorter: order
# 指定服务发现的模式聚合微服务文档,并且是默认`default`分组
strategy: discover
discover:
enabled: true
# 指定版本号(Swagger2|OpenAPI3)
version : openapi3
# 需要排除的微服务(eg:网关服务)
excluded-services:
- blade-admin
- blade-gateway
- blade-log

View File

@ -1,6 +1,6 @@
FROM anapsix/alpine-java:8_server-jre_unlimited FROM bladex/alpine-java:openjdk17_cn_slim
MAINTAINER smallchill@163.com MAINTAINER bladejava@qq.com
RUN mkdir -p /blade/admin RUN mkdir -p /blade/admin
@ -10,6 +10,6 @@ EXPOSE 7002
ADD ./target/blade-admin.jar ./app.jar ADD ./target/blade-admin.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] ENTRYPOINT ["java", "--add-opens java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"] CMD ["--spring.profiles.active=test"]

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-ops</artifactId> <artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -75,22 +75,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
file="${project.build.directory}/${artifactId}.jar" />
</tasks>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -1,6 +1,6 @@
FROM anapsix/alpine-java:8_server-jre_unlimited FROM bladex/alpine-java:openjdk17_cn_slim
MAINTAINER smallchill@163.com MAINTAINER bladejava@qq.com
RUN mkdir -p /blade/develop RUN mkdir -p /blade/develop
@ -10,6 +10,6 @@ EXPOSE 7007
ADD ./target/blade-develop.jar ./app.jar ADD ./target/blade-develop.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] ENTRYPOINT ["java", "--add-opens java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"] CMD ["--spring.profiles.active=test"]

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<artifactId>blade-ops</artifactId> <artifactId>blade-ops</artifactId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -65,22 +65,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
file="${project.build.directory}/${artifactId}.jar" />
</tasks>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -17,7 +17,14 @@ package org.springblade.develop.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.*; import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
@ -32,9 +39,7 @@ import org.springblade.develop.service.ICodeService;
import org.springblade.develop.service.IDatasourceService; import org.springblade.develop.service.IDatasourceService;
import org.springblade.develop.support.BladeCodeGenerator; import org.springblade.develop.support.BladeCodeGenerator;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.Valid;
import java.util.Collection; import java.util.Collection;
import java.util.Map; import java.util.Map;
@ -43,11 +48,11 @@ import java.util.Map;
* *
* @author Chill * @author Chill
*/ */
@ApiIgnore @Hidden
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/code") @RequestMapping("/code")
@Api(value = "代码生成", tags = "代码生成") @Tag(name = "代码生成", description = "代码生成")
@PreAuth(RoleConstant.HAS_ROLE_ADMIN) @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
public class CodeController extends BladeController { public class CodeController extends BladeController {
@ -59,7 +64,7 @@ public class CodeController extends BladeController {
*/ */
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入code") @Operation(summary = "详情", description = "传入code")
public R<Code> detail(Code code) { public R<Code> detail(Code code) {
Code detail = codeService.getOne(Condition.getQueryWrapper(code)); Code detail = codeService.getOne(Condition.getQueryWrapper(code));
return R.data(detail); return R.data(detail);
@ -69,14 +74,14 @@ public class CodeController extends BladeController {
* 分页 * 分页
*/ */
@GetMapping("/list") @GetMapping("/list")
@ApiImplicitParams({ @Parameters({
@ApiImplicitParam(name = "codeName", value = "模块名", paramType = "query", dataType = "string"), @Parameter(name = "codeName", description = "模块名", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
@ApiImplicitParam(name = "tableName", value = "表名", paramType = "query", dataType = "string"), @Parameter(name = "tableName", description = "表名", in = ParameterIn.QUERY, schema = @Schema(type = "string")),
@ApiImplicitParam(name = "modelName", value = "实体名", paramType = "query", dataType = "string") @Parameter(name = "modelName", description = "实体名", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
}) })
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入code") @Operation(summary = "分页", description = "传入code")
public R<IPage<Code>> list(@ApiIgnore @RequestParam Map<String, Object> code, Query query) { public R<IPage<Code>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> code, Query query) {
IPage<Code> pages = codeService.page(Condition.getPage(query), Condition.getQueryWrapper(code, Code.class)); IPage<Code> pages = codeService.page(Condition.getPage(query), Condition.getQueryWrapper(code, Code.class));
return R.data(pages); return R.data(pages);
} }
@ -86,7 +91,7 @@ public class CodeController extends BladeController {
*/ */
@PostMapping("/submit") @PostMapping("/submit")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "新增或修改", notes = "传入code") @Operation(summary = "新增或修改", description = "传入code")
public R submit(@Valid @RequestBody Code code) { public R submit(@Valid @RequestBody Code code) {
return R.status(codeService.submit(code)); return R.status(codeService.submit(code));
} }
@ -97,8 +102,8 @@ public class CodeController extends BladeController {
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "删除", notes = "传入ids") @Operation(summary = "删除", description = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
return R.status(codeService.removeByIds(Func.toLongList(ids))); return R.status(codeService.removeByIds(Func.toLongList(ids)));
} }
@ -107,8 +112,8 @@ public class CodeController extends BladeController {
*/ */
@PostMapping("/copy") @PostMapping("/copy")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "复制", notes = "传入id") @Operation(summary = "复制", description = "传入id")
public R copy(@ApiParam(value = "主键", required = true) @RequestParam Long id) { public R copy(@Parameter(name = "主键", required = true) @RequestParam Long id) {
Code code = codeService.getById(id); Code code = codeService.getById(id);
code.setId(null); code.setId(null);
code.setCodeName(code.getCodeName() + "-copy"); code.setCodeName(code.getCodeName() + "-copy");
@ -120,8 +125,8 @@ public class CodeController extends BladeController {
*/ */
@PostMapping("/gen-code") @PostMapping("/gen-code")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@ApiOperation(value = "代码生成", notes = "传入ids") @Operation(summary = "代码生成", description = "传入ids")
public R genCode(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, @RequestParam(defaultValue = "sword") String system) { public R genCode(@Parameter(name = "主键集合", required = true) @RequestParam String ids, @RequestParam(defaultValue = "sword") String system) {
Collection<Code> codes = codeService.listByIds(Func.toLongList(ids)); Collection<Code> codes = codeService.listByIds(Func.toLongList(ids));
codes.forEach(code -> { codes.forEach(code -> {
BladeCodeGenerator generator = new BladeCodeGenerator(); BladeCodeGenerator generator = new BladeCodeGenerator();

View File

@ -17,9 +17,9 @@ package org.springblade.develop.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api; import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.ApiParam; import io.swagger.v3.oas.annotations.Parameter;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
@ -30,7 +30,7 @@ import org.springblade.develop.entity.Datasource;
import org.springblade.develop.service.IDatasourceService; import org.springblade.develop.service.IDatasourceService;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import jakarta.validation.Valid;
import java.util.List; import java.util.List;
/** /**
@ -41,7 +41,7 @@ import java.util.List;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/datasource") @RequestMapping("/datasource")
@Api(value = "数据源配置表", tags = "数据源配置表接口") @Tag(name = "数据源配置表", description = "数据源配置表接口")
public class DatasourceController extends BladeController { public class DatasourceController extends BladeController {
private IDatasourceService datasourceService; private IDatasourceService datasourceService;
@ -51,7 +51,7 @@ public class DatasourceController extends BladeController {
*/ */
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入datasource") @Operation(summary = "详情", description = "传入datasource")
public R<Datasource> detail(Datasource datasource) { public R<Datasource> detail(Datasource datasource) {
Datasource detail = datasourceService.getOne(Condition.getQueryWrapper(datasource)); Datasource detail = datasourceService.getOne(Condition.getQueryWrapper(datasource));
return R.data(detail); return R.data(detail);
@ -62,7 +62,7 @@ public class DatasourceController extends BladeController {
*/ */
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入datasource") @Operation(summary = "分页", description = "传入datasource")
public R<IPage<Datasource>> list(Datasource datasource, Query query) { public R<IPage<Datasource>> list(Datasource datasource, Query query) {
IPage<Datasource> pages = datasourceService.page(Condition.getPage(query), Condition.getQueryWrapper(datasource)); IPage<Datasource> pages = datasourceService.page(Condition.getPage(query), Condition.getQueryWrapper(datasource));
return R.data(pages); return R.data(pages);
@ -73,7 +73,7 @@ public class DatasourceController extends BladeController {
*/ */
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入datasource") @Operation(summary = "新增", description = "传入datasource")
public R save(@Valid @RequestBody Datasource datasource) { public R save(@Valid @RequestBody Datasource datasource) {
return R.status(datasourceService.save(datasource)); return R.status(datasourceService.save(datasource));
} }
@ -83,7 +83,7 @@ public class DatasourceController extends BladeController {
*/ */
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入datasource") @Operation(summary = "修改", description = "传入datasource")
public R update(@Valid @RequestBody Datasource datasource) { public R update(@Valid @RequestBody Datasource datasource) {
return R.status(datasourceService.updateById(datasource)); return R.status(datasourceService.updateById(datasource));
} }
@ -93,7 +93,7 @@ public class DatasourceController extends BladeController {
*/ */
@PostMapping("/submit") @PostMapping("/submit")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入datasource") @Operation(summary = "新增或修改", description = "传入datasource")
public R submit(@Valid @RequestBody Datasource datasource) { public R submit(@Valid @RequestBody Datasource datasource) {
datasource.setUrl(datasource.getUrl().replace("&amp;", "&")); datasource.setUrl(datasource.getUrl().replace("&amp;", "&"));
return R.status(datasourceService.saveOrUpdate(datasource)); return R.status(datasourceService.saveOrUpdate(datasource));
@ -105,8 +105,8 @@ public class DatasourceController extends BladeController {
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @Operation(summary = "逻辑删除", description = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
return R.status(datasourceService.deleteLogic(Func.toLongList(ids))); return R.status(datasourceService.deleteLogic(Func.toLongList(ids)));
} }
@ -115,7 +115,7 @@ public class DatasourceController extends BladeController {
*/ */
@GetMapping("/select") @GetMapping("/select")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
@ApiOperation(value = "下拉数据源", notes = "查询列表") @Operation(summary = "下拉数据源", description = "查询列表")
public R<List<Datasource>> select() { public R<List<Datasource>> select() {
List<Datasource> list = datasourceService.list(); List<Datasource> list = datasourceService.list();
return R.data(list); return R.data(list);

View File

@ -21,10 +21,10 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -34,15 +34,16 @@ import java.io.Serializable;
*/ */
@Data @Data
@TableName("blade_code") @TableName("blade_code")
@ApiModel(value = "Code对象", description = "Code对象") @Schema(description = "Code对象")
public class Code implements Serializable { public class Code implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键 * 主键
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -50,75 +51,75 @@ public class Code implements Serializable {
/** /**
* 数据源主键 * 数据源主键
*/ */
@ApiModelProperty(value = "数据源主键") @Schema(description = "数据源主键")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long datasourceId; private Long datasourceId;
/** /**
* 模块名称 * 模块名称
*/ */
@ApiModelProperty(value = "服务名称") @Schema(description = "服务名称")
private String serviceName; private String serviceName;
/** /**
* 模块名称 * 模块名称
*/ */
@ApiModelProperty(value = "模块名称") @Schema(description = "模块名称")
private String codeName; private String codeName;
/** /**
* 表名 * 表名
*/ */
@ApiModelProperty(value = "表名") @Schema(description = "表名")
private String tableName; private String tableName;
/** /**
* 实体名 * 实体名
*/ */
@ApiModelProperty(value = "表前缀") @Schema(description = "表前缀")
private String tablePrefix; private String tablePrefix;
/** /**
* 主键名 * 主键名
*/ */
@ApiModelProperty(value = "主键名") @Schema(description = "主键名")
private String pkName; private String pkName;
/** /**
* 基础业务模式 * 基础业务模式
*/ */
@ApiModelProperty(value = "基础业务模式") @Schema(description = "基础业务模式")
private Integer baseMode; private Integer baseMode;
/** /**
* 包装器模式 * 包装器模式
*/ */
@ApiModelProperty(value = "包装器模式") @Schema(description = "包装器模式")
private Integer wrapMode; private Integer wrapMode;
/** /**
* 后端包名 * 后端包名
*/ */
@ApiModelProperty(value = "后端包名") @Schema(description = "后端包名")
private String packageName; private String packageName;
/** /**
* 后端路径 * 后端路径
*/ */
@ApiModelProperty(value = "后端路径") @Schema(description = "后端路径")
private String apiPath; private String apiPath;
/** /**
* 前端路径 * 前端路径
*/ */
@ApiModelProperty(value = "前端路径") @Schema(description = "前端路径")
private String webPath; private String webPath;
/** /**
* 是否已删除 * 是否已删除
*/ */
@TableLogic @TableLogic
@ApiModelProperty(value = "是否已删除") @Schema(description = "是否已删除")
private Integer isDeleted; private Integer isDeleted;

View File

@ -20,12 +20,13 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
/** /**
* 数据源配置表实体类 * 数据源配置表实体类
* *
@ -34,15 +35,16 @@ import org.springblade.core.mp.base.BaseEntity;
@Data @Data
@TableName("blade_datasource") @TableName("blade_datasource")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Datasource对象", description = "数据源配置表") @Schema(description = "Datasource对象")
public class Datasource extends BaseEntity { public class Datasource extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键 * 主键
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -50,32 +52,32 @@ public class Datasource extends BaseEntity {
/** /**
* 名称 * 名称
*/ */
@ApiModelProperty(value = "名称") @Schema(description = "名称")
private String name; private String name;
/** /**
* 驱动类 * 驱动类
*/ */
@ApiModelProperty(value = "驱动类") @Schema(description = "驱动类")
private String driverClass; private String driverClass;
/** /**
* 连接地址 * 连接地址
*/ */
@ApiModelProperty(value = "连接地址") @Schema(description = "连接地址")
private String url; private String url;
/** /**
* 用户名 * 用户名
*/ */
@ApiModelProperty(value = "用户名") @Schema(description = "用户名")
private String username; private String username;
/** /**
* 密码 * 密码
*/ */
@ApiModelProperty(value = "密码") @Schema(description = "密码")
private String password; private String password;
/** /**
* 备注 * 备注
*/ */
@ApiModelProperty(value = "备注") @Schema(description = "备注")
private String remark; private String remark;

View File

@ -15,12 +15,12 @@
*/ */
package $!{package.Controller}; package $!{package.Controller};
import io.swagger.annotations.Api; import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.ApiParam; import io.swagger.v3.oas.annotations.Parameter;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import javax.validation.Valid; import jakarta.validation.Valid;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
@ -54,7 +54,7 @@ import $!{superControllerClassPackage};
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("#if($!{package.ModuleName})$!{package.ModuleName}#end/$!{entityKey}") @RequestMapping("#if($!{package.ModuleName})$!{package.ModuleName}#end/$!{entityKey}")
@Api(value = "$!{table.comment}", tags = "$!{table.comment}接口") @Tag(name = "$!{table.comment}", description = "$!{table.comment}接口")
#if($!{superControllerClass}) #if($!{superControllerClass})
public class $!{table.controllerName} extends $!{superControllerClass} { public class $!{table.controllerName} extends $!{superControllerClass} {
#else #else
@ -69,7 +69,7 @@ public class $!{table.controllerName} {
*/ */
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入$!{table.entityPath}") @Operation(summary = "详情", description = "传入$!{table.entityPath}")
public R<$!{entity}VO> detail($!{entity} $!{table.entityPath}) { public R<$!{entity}VO> detail($!{entity} $!{table.entityPath}) {
$!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath}));
return R.data($!{entity}Wrapper.build().entityVO(detail)); return R.data($!{entity}Wrapper.build().entityVO(detail));
@ -80,7 +80,7 @@ public class $!{table.controllerName} {
*/ */
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") @Operation(summary = "分页", description = "传入$!{table.entityPath}")
public R<IPage<$!{entity}VO>> list($!{entity} $!{table.entityPath}, Query query) { public R<IPage<$!{entity}VO>> list($!{entity} $!{table.entityPath}, Query query) {
IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath}));
return R.data($!{entity}Wrapper.build().pageVO(pages)); return R.data($!{entity}Wrapper.build().pageVO(pages));
@ -92,7 +92,7 @@ public class $!{table.controllerName} {
*/ */
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入$!{table.entityPath}") @Operation(summary = "详情", description = "传入$!{table.entityPath}")
public R<$!{entity}> detail($!{entity} $!{table.entityPath}) { public R<$!{entity}> detail($!{entity} $!{table.entityPath}) {
$!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath}));
return R.data(detail); return R.data(detail);
@ -103,7 +103,7 @@ public class $!{table.controllerName} {
*/ */
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") @Operation(summary = "分页", description = "传入$!{table.entityPath}")
public R<IPage<$!{entity}>> list($!{entity} $!{table.entityPath}, Query query) { public R<IPage<$!{entity}>> list($!{entity} $!{table.entityPath}, Query query) {
IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath}));
return R.data(pages); return R.data(pages);
@ -115,7 +115,7 @@ public class $!{table.controllerName} {
*/ */
@GetMapping("/page") @GetMapping("/page")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") @Operation(summary = "分页", description = "传入$!{table.entityPath}")
public R<IPage<$!{entity}VO>> page($!{entity}VO $!{table.entityPath}, Query query) { public R<IPage<$!{entity}VO>> page($!{entity}VO $!{table.entityPath}, Query query) {
IPage<$!{entity}VO> pages = $!{table.entityPath}Service.select$!{entity}Page(Condition.getPage(query), $!{table.entityPath}); IPage<$!{entity}VO> pages = $!{table.entityPath}Service.select$!{entity}Page(Condition.getPage(query), $!{table.entityPath});
return R.data(pages); return R.data(pages);
@ -126,7 +126,7 @@ public class $!{table.controllerName} {
*/ */
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入$!{table.entityPath}") @Operation(summary = "新增", description = "传入$!{table.entityPath}")
public R save(@Valid @RequestBody $!{entity} $!{table.entityPath}) { public R save(@Valid @RequestBody $!{entity} $!{table.entityPath}) {
return R.status($!{table.entityPath}Service.save($!{table.entityPath})); return R.status($!{table.entityPath}Service.save($!{table.entityPath}));
} }
@ -136,7 +136,7 @@ public class $!{table.controllerName} {
*/ */
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入$!{table.entityPath}") @Operation(summary = "修改", description = "传入$!{table.entityPath}")
public R update(@Valid @RequestBody $!{entity} $!{table.entityPath}) { public R update(@Valid @RequestBody $!{entity} $!{table.entityPath}) {
return R.status($!{table.entityPath}Service.updateById($!{table.entityPath})); return R.status($!{table.entityPath}Service.updateById($!{table.entityPath}));
} }
@ -146,7 +146,7 @@ public class $!{table.controllerName} {
*/ */
@PostMapping("/submit") @PostMapping("/submit")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入$!{table.entityPath}") @Operation(summary = "新增或修改", description = "传入$!{table.entityPath}")
public R submit(@Valid @RequestBody $!{entity} $!{table.entityPath}) { public R submit(@Valid @RequestBody $!{entity} $!{table.entityPath}) {
return R.status($!{table.entityPath}Service.saveOrUpdate($!{table.entityPath})); return R.status($!{table.entityPath}Service.saveOrUpdate($!{table.entityPath}));
} }
@ -158,8 +158,8 @@ public class $!{table.controllerName} {
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @Operation(summary = "逻辑删除", description = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids))); return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids)));
} }
@ -170,8 +170,8 @@ public class $!{table.controllerName} {
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
@ApiOperation(value = "删除", notes = "传入ids") @Operation(summary = "删除", description = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids))); return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids)));
} }

View File

@ -37,7 +37,7 @@ public class $!{entity}Wrapper extends BaseEntityWrapper<$!{entity}, $!{entity}V
@Override @Override
public $!{entity}VO entityVO($!{entity} $!{table.entityPath}) { public $!{entity}VO entityVO($!{entity} $!{table.entityPath}) {
$!{entity}VO $!{table.entityPath}VO = BeanUtil.copy($!{table.entityPath}, $!{entity}VO.class); $!{entity}VO $!{table.entityPath}VO = BeanUtil.copyProperties($!{table.entityPath}, $!{entity}VO.class);
return $!{table.entityPath}VO; return $!{table.entityPath}VO;
} }

View File

@ -15,12 +15,12 @@
*/ */
package $!{package.Controller}; package $!{package.Controller};
import io.swagger.annotations.Api; import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.annotations.ApiParam; import io.swagger.v3.oas.annotations.Parameter;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import javax.validation.Valid; import jakarta.validation.Valid;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
@ -54,7 +54,7 @@ import $!{superControllerClassPackage};
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("#if($!{package.ModuleName})$!{package.ModuleName}#end/$!{entityKey}") @RequestMapping("#if($!{package.ModuleName})$!{package.ModuleName}#end/$!{entityKey}")
@Api(value = "$!{table.comment}", tags = "$!{table.comment}接口") @Tag(name = "$!{table.comment}", description = "$!{table.comment}接口")
#if($!{superControllerClass}) #if($!{superControllerClass})
public class $!{table.controllerName} extends $!{superControllerClass} { public class $!{table.controllerName} extends $!{superControllerClass} {
#else #else
@ -69,7 +69,7 @@ public class $!{table.controllerName} {
*/ */
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入$!{table.entityPath}") @Operation(summary = "详情", description = "传入$!{table.entityPath}")
public R<$!{entity}VO> detail($!{entity} $!{table.entityPath}) { public R<$!{entity}VO> detail($!{entity} $!{table.entityPath}) {
$!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath}));
return R.data($!{entity}Wrapper.build().entityVO(detail)); return R.data($!{entity}Wrapper.build().entityVO(detail));
@ -80,7 +80,7 @@ public class $!{table.controllerName} {
*/ */
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") @Operation(summary = "分页", description = "传入$!{table.entityPath}")
public R<IPage<$!{entity}VO>> list($!{entity} $!{table.entityPath}, Query query) { public R<IPage<$!{entity}VO>> list($!{entity} $!{table.entityPath}, Query query) {
IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath}));
return R.data($!{entity}Wrapper.build().pageVO(pages)); return R.data($!{entity}Wrapper.build().pageVO(pages));
@ -92,7 +92,7 @@ public class $!{table.controllerName} {
*/ */
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入$!{table.entityPath}") @Operation(summary = "详情", description = "传入$!{table.entityPath}")
public R<$!{entity}> detail($!{entity} $!{table.entityPath}) { public R<$!{entity}> detail($!{entity} $!{table.entityPath}) {
$!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath})); $!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath}));
return R.data(detail); return R.data(detail);
@ -103,7 +103,7 @@ public class $!{table.controllerName} {
*/ */
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") @Operation(summary = "分页", description = "传入$!{table.entityPath}")
public R<IPage<$!{entity}>> list($!{entity} $!{table.entityPath}, Query query) { public R<IPage<$!{entity}>> list($!{entity} $!{table.entityPath}, Query query) {
IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath})); IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath}));
return R.data(pages); return R.data(pages);
@ -115,7 +115,7 @@ public class $!{table.controllerName} {
*/ */
@GetMapping("/page") @GetMapping("/page")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}") @Operation(summary = "分页", description = "传入$!{table.entityPath}")
public R<IPage<$!{entity}VO>> page($!{entity}VO $!{table.entityPath}, Query query) { public R<IPage<$!{entity}VO>> page($!{entity}VO $!{table.entityPath}, Query query) {
IPage<$!{entity}VO> pages = $!{table.entityPath}Service.select$!{entity}Page(Condition.getPage(query), $!{table.entityPath}); IPage<$!{entity}VO> pages = $!{table.entityPath}Service.select$!{entity}Page(Condition.getPage(query), $!{table.entityPath});
return R.data(pages); return R.data(pages);
@ -126,7 +126,7 @@ public class $!{table.controllerName} {
*/ */
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入$!{table.entityPath}") @Operation(summary = "新增", description = "传入$!{table.entityPath}")
public R save(@Valid @RequestBody $!{entity} $!{table.entityPath}) { public R save(@Valid @RequestBody $!{entity} $!{table.entityPath}) {
return R.status($!{table.entityPath}Service.save($!{table.entityPath})); return R.status($!{table.entityPath}Service.save($!{table.entityPath}));
} }
@ -136,7 +136,7 @@ public class $!{table.controllerName} {
*/ */
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入$!{table.entityPath}") @Operation(summary = "修改", description = "传入$!{table.entityPath}")
public R update(@Valid @RequestBody $!{entity} $!{table.entityPath}) { public R update(@Valid @RequestBody $!{entity} $!{table.entityPath}) {
return R.status($!{table.entityPath}Service.updateById($!{table.entityPath})); return R.status($!{table.entityPath}Service.updateById($!{table.entityPath}));
} }
@ -146,7 +146,7 @@ public class $!{table.controllerName} {
*/ */
@PostMapping("/submit") @PostMapping("/submit")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入$!{table.entityPath}") @Operation(summary = "新增或修改", description = "传入$!{table.entityPath}")
public R submit(@Valid @RequestBody $!{entity} $!{table.entityPath}) { public R submit(@Valid @RequestBody $!{entity} $!{table.entityPath}) {
return R.status($!{table.entityPath}Service.saveOrUpdate($!{table.entityPath})); return R.status($!{table.entityPath}Service.saveOrUpdate($!{table.entityPath}));
} }
@ -158,8 +158,8 @@ public class $!{table.controllerName} {
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @Operation(summary = "逻辑删除", description = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids))); return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids)));
} }
@ -170,8 +170,8 @@ public class $!{table.controllerName} {
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
@ApiOperation(value = "删除", notes = "传入ids") @Operation(summary = "删除", description = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids))); return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids)));
} }

View File

@ -37,7 +37,7 @@ public class $!{entity}Wrapper extends BaseEntityWrapper<$!{entity}, $!{entity}V
@Override @Override
public $!{entity}VO entityVO($!{entity} $!{table.entityPath}) { public $!{entity}VO entityVO($!{entity} $!{table.entityPath}) {
$!{entity}VO $!{table.entityPath}VO = BeanUtil.copy($!{table.entityPath}, $!{entity}VO.class); $!{entity}VO $!{table.entityPath}VO = BeanUtil.copyProperties($!{table.entityPath}, $!{entity}VO.class);
return $!{table.entityPath}VO; return $!{table.entityPath}VO;
} }

View File

@ -1,6 +1,6 @@
FROM anapsix/alpine-java:8_server-jre_unlimited FROM bladex/alpine-java:openjdk17_cn_slim
MAINTAINER smallchill@163.com MAINTAINER bladejava@qq.com
RUN mkdir -p /blade/report RUN mkdir -p /blade/report
@ -10,6 +10,6 @@ EXPOSE 8108
ADD ./target/blade-report.jar ./app.jar ADD ./target/blade-report.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] ENTRYPOINT ["java", "--add-opens java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"] CMD ["--spring.profiles.active=test"]

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<artifactId>blade-ops</artifactId> <artifactId>blade-ops</artifactId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -59,22 +59,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
file="${project.build.directory}/${artifactId}.jar" />
</tasks>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -1,6 +1,6 @@
FROM anapsix/alpine-java:8_server-jre_unlimited FROM bladex/alpine-java:openjdk17_cn_slim
MAINTAINER smallchill@163.com MAINTAINER bladejava@qq.com
RUN mkdir -p /blade/resource RUN mkdir -p /blade/resource
@ -10,6 +10,6 @@ EXPOSE 8010
ADD ./target/blade-resource.jar ./app.jar ADD ./target/blade-resource.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] ENTRYPOINT ["java", "--add-opens java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"] CMD ["--spring.profiles.active=test"]

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-ops</artifactId> <artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -68,22 +68,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
file="${project.build.directory}/${artifactId}.jar" />
</tasks>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -15,7 +15,7 @@
*/ */
package org.springblade.resource.endpoint; package org.springblade.resource.endpoint;
import io.swagger.annotations.Api; import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import org.springblade.core.oss.QiniuTemplate; import org.springblade.core.oss.QiniuTemplate;
@ -34,7 +34,7 @@ import org.springframework.web.multipart.MultipartFile;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/oss/endpoint") @RequestMapping("/oss/endpoint")
@Api(value = "对象存储端点", tags = "对象存储端点") @Tag(name = "对象存储端点", description = "对象存储端点")
public class OssEndpoint { public class OssEndpoint {
private QiniuTemplate qiniuTemplate; private QiniuTemplate qiniuTemplate;

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-ops</artifactId> <artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -45,22 +45,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
file="${project.build.directory}/${artifactId}.jar" />
</tasks>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -19,6 +20,7 @@ import java.math.BigDecimal;
@TableName("tb_order") @TableName("tb_order")
public class Order implements Serializable { public class Order implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-ops</artifactId> <artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -45,22 +45,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
file="${project.build.directory}/${artifactId}.jar" />
</tasks>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -4,6 +4,7 @@ package org.springblade.seata.storage.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -15,6 +16,7 @@ import java.io.Serializable;
@TableName("tb_storage") @TableName("tb_storage")
public class Storage implements Serializable { public class Storage implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private Long id; private Long id;

View File

@ -1,15 +0,0 @@
FROM anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER smallchill@163.com
RUN mkdir -p /blade/swagger
WORKDIR /blade/swagger
EXPOSE 18000
ADD ./target/blade-swagger.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"]

View File

@ -1,82 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.7.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-swagger</artifactId>
<name>${project.artifactId}</name>
<version>${blade.project.version}</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-launch</artifactId>
<version>${blade.tool.version}</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-aggregation-spring-boot-starter</artifactId>
</dependency>
<!--Mac M1笔记本会报错参考https://github.com/netty/netty/issues/11020-->
<!--<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-resolver-dns-native-macos</artifactId>
<version>${netty.resolver.version}</version>
<classifier>osx-aarch_64</classifier>
</dependency>-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.plugin.version}</version>
<configuration>
<imageName>${docker.registry.url}/blade/${project.artifactId}:${project.version}</imageName>
<dockerDirectory>${project.basedir}</dockerDirectory>
<dockerHost>${docker.registry.host}</dockerHost>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<registryUrl>${docker.registry.url}</registryUrl>
<serverId>${docker.registry.url}</serverId>
<pushImage>true</pushImage>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
file="${project.build.directory}/${artifactId}.jar" />
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,33 +0,0 @@
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springblade.swagger;
import org.springblade.core.launch.BladeApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* swagger聚合启动器
*
* @author Chill
*/
@SpringBootApplication
public class SwaggerApplication {
public static void main(String[] args) {
BladeApplication.run("blade-swagger", SwaggerApplication.class, args);
}
}

View File

@ -1,16 +0,0 @@
server:
port: 18000
knife4j:
enableAggregation: true
cloud:
enable: true
routes:
- name: 授权模块
uri: 127.0.0.1
location: /blade-auth/v2/api-docs
- name: 工作台模块
uri: 127.0.0.1
location: /blade-desk/v2/api-docs
- name: 系统模块
uri: 127.0.0.1
location: /blade-system/v2/api-docs

View File

@ -1,10 +0,0 @@
${AnsiColor.BRIGHT_CYAN} _____ _ ${AnsiColor.BLUE} ______ _ _
${AnsiColor.BRIGHT_CYAN}/ ___| (_) ${AnsiColor.BLUE} | ___ \| | | |
${AnsiColor.BRIGHT_CYAN}\ `--. _ __ _ __ _ _ __ __ _ ${AnsiColor.BLUE} | |_/ /| | __ _ __| | ___
${AnsiColor.BRIGHT_CYAN} `--. \| '_ \ | '__|| || '_ \ / _` | ${AnsiColor.BLUE} | ___ \| | / _` | / _` | / _ \
${AnsiColor.BRIGHT_CYAN}/\__/ /| |_) || | | || | | || (_| | ${AnsiColor.BLUE} | |_/ /| || (_| || (_| || __/
${AnsiColor.BRIGHT_CYAN}\____/ | .__/ |_| |_||_| |_| \__, | ${AnsiColor.BLUE} \____/ |_| \__,_| \__,_| \___|
${AnsiColor.BRIGHT_CYAN} | | __/ |
${AnsiColor.BRIGHT_CYAN} |_| |___/
${AnsiColor.BLUE}:: SpringBlade :: ${spring.application.name}:${AnsiColor.RED}${blade.env}${AnsiColor.BLUE} :: Running SpringBoot ${spring-boot.version} :: ${AnsiColor.BRIGHT_BLACK}

View File

@ -5,13 +5,13 @@
<parent> <parent>
<artifactId>SpringBlade</artifactId> <artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>blade-ops</artifactId> <artifactId>blade-ops</artifactId>
<name>${project.artifactId}</name> <name>${project.artifactId}</name>
<version>3.7.1</version> <version>4.0.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<modules> <modules>
<module>blade-admin</module> <module>blade-admin</module>
@ -20,7 +20,6 @@
<module>blade-resource</module> <module>blade-resource</module>
<module>blade-seata-order</module> <module>blade-seata-order</module>
<module>blade-seata-storage</module> <module>blade-seata-storage</module>
<module>blade-swagger</module>
</modules> </modules>
</project> </project>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-service-api</artifactId> <artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -20,11 +20,12 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
import java.util.Date; import java.util.Date;
/** /**
@ -37,12 +38,13 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class Notice extends BaseEntity { public class Notice extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键id * 主键id
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -50,25 +52,25 @@ public class Notice extends BaseEntity {
/** /**
* 标题 * 标题
*/ */
@ApiModelProperty(value = "标题") @Schema(description = "标题")
private String title; private String title;
/** /**
* 通知类型 * 通知类型
*/ */
@ApiModelProperty(value = "通知类型") @Schema(description = "通知类型")
private Integer category; private Integer category;
/** /**
* 发布日期 * 发布日期
*/ */
@ApiModelProperty(value = "发布日期") @Schema(description = "发布日期")
private Date releaseTime; private Date releaseTime;
/** /**
* 内容 * 内容
*/ */
@ApiModelProperty(value = "内容") @Schema(description = "内容")
private String content; private String content;

View File

@ -1,6 +1,6 @@
package com.example.demo.vo; package com.example.demo.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import com.example.demo.entity.Notice; import com.example.demo.entity.Notice;
@ -14,7 +14,7 @@ import com.example.demo.entity.Notice;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class NoticeVO extends Notice { public class NoticeVO extends Notice {
@ApiModelProperty(value = "通知类型名") @Schema(description = "通知类型名")
private String categoryName; private String categoryName;
} }

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-service-api</artifactId> <artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -20,11 +20,12 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
import java.util.Date; import java.util.Date;
/** /**
@ -37,12 +38,13 @@ import java.util.Date;
@TableName("blade_notice") @TableName("blade_notice")
public class Notice extends BaseEntity { public class Notice extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键id * 主键id
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -50,25 +52,25 @@ public class Notice extends BaseEntity {
/** /**
* 标题 * 标题
*/ */
@ApiModelProperty(value = "标题") @Schema(description = "标题")
private String title; private String title;
/** /**
* 通知类型 * 通知类型
*/ */
@ApiModelProperty(value = "通知类型") @Schema(description = "通知类型")
private Integer category; private Integer category;
/** /**
* 发布日期 * 发布日期
*/ */
@ApiModelProperty(value = "发布日期") @Schema(description = "发布日期")
private Date releaseTime; private Date releaseTime;
/** /**
* 内容 * 内容
*/ */
@ApiModelProperty(value = "内容") @Schema(description = "内容")
private String content; private String content;

View File

@ -1,6 +1,6 @@
package org.springblade.desk.vo; package org.springblade.desk.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.desk.entity.Notice; import org.springblade.desk.entity.Notice;
@ -14,7 +14,7 @@ import org.springblade.desk.entity.Notice;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class NoticeVO extends Notice { public class NoticeVO extends Notice {
@ApiModelProperty(value = "通知类型名") @Schema(description = "通知类型名")
private String categoryName; private String categoryName;
} }

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-service-api</artifactId> <artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -19,6 +19,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.system.entity.Dict; import org.springblade.system.entity.Dict;
import java.io.Serial;
/** /**
* 数据传输对象实体类 * 数据传输对象实体类
* *
@ -28,6 +30,7 @@ import org.springblade.system.entity.Dict;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class DictDTO extends Dict { public class DictDTO extends Dict {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -21,10 +21,10 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -35,15 +35,16 @@ import java.io.Serializable;
*/ */
@Data @Data
@TableName("blade_dict") @TableName("blade_dict")
@ApiModel(value = "Dict对象", description = "Dict对象") @Schema(description = "Dict对象")
public class Dict implements Serializable { public class Dict implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键 * 主键
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -51,45 +52,45 @@ public class Dict implements Serializable {
/** /**
* 父主键 * 父主键
*/ */
@ApiModelProperty(value = "父主键") @Schema(description = "父主键")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long parentId; private Long parentId;
/** /**
* 字典码 * 字典码
*/ */
@ApiModelProperty(value = "字典码") @Schema(description = "字典码")
private String code; private String code;
/** /**
* 字典值 * 字典值
*/ */
@ApiModelProperty(value = "字典值") @Schema(description = "字典值")
private Integer dictKey; private Integer dictKey;
/** /**
* 字典名称 * 字典名称
*/ */
@ApiModelProperty(value = "字典名称") @Schema(description = "字典名称")
private String dictValue; private String dictValue;
/** /**
* 排序 * 排序
*/ */
@ApiModelProperty(value = "排序") @Schema(description = "排序")
private Integer sort; private Integer sort;
/** /**
* 字典备注 * 字典备注
*/ */
@ApiModelProperty(value = "字典备注") @Schema(description = "字典备注")
private String remark; private String remark;
/** /**
* 是否已删除 * 是否已删除
*/ */
@TableLogic @TableLogic
@ApiModelProperty(value = "是否已删除") @Schema(description = "是否已删除")
private Integer isDeleted; private Integer isDeleted;

View File

@ -18,12 +18,13 @@ package org.springblade.system.vo;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.tool.node.INode; import org.springblade.core.tool.node.INode;
import org.springblade.system.entity.Dict; import org.springblade.system.entity.Dict;
import java.io.Serial;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -35,8 +36,9 @@ import java.util.List;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DictVO对象", description = "DictVO对象") @Schema(description = "DictVO对象")
public class DictVO extends Dict implements INode<DictVO> { public class DictVO extends Dict implements INode<DictVO> {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键ID * 主键ID

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-service-api</artifactId> <artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-service-api</artifactId> <artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -19,6 +19,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.system.entity.Dept; import org.springblade.system.entity.Dept;
import java.io.Serial;
/** /**
* 数据传输对象实体类 * 数据传输对象实体类
* *
@ -27,6 +29,7 @@ import org.springblade.system.entity.Dept;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class DeptDTO extends Dept { public class DeptDTO extends Dept {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -17,6 +17,7 @@ package org.springblade.system.dto;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -26,6 +27,7 @@ import java.io.Serializable;
*/ */
@Data @Data
public class MenuDTO implements Serializable { public class MenuDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String alias; private String alias;
private String path; private String path;

View File

@ -19,6 +19,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.system.entity.Param; import org.springblade.system.entity.Param;
import java.io.Serial;
/** /**
* 数据传输对象实体类 * 数据传输对象实体类
* *
@ -27,6 +29,7 @@ import org.springblade.system.entity.Param;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class ParamDTO extends Param { public class ParamDTO extends Param {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -19,6 +19,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.system.entity.Role; import org.springblade.system.entity.Role;
import java.io.Serial;
/** /**
* 数据传输对象实体类 * 数据传输对象实体类
* *
@ -27,6 +29,7 @@ import org.springblade.system.entity.Role;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class RoleDTO extends Role { public class RoleDTO extends Role {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -19,6 +19,8 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.system.entity.RoleMenu; import org.springblade.system.entity.RoleMenu;
import java.io.Serial;
/** /**
* 数据传输对象实体类 * 数据传输对象实体类
* *
@ -27,6 +29,7 @@ import org.springblade.system.entity.RoleMenu;
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class RoleMenuDTO extends RoleMenu { public class RoleMenuDTO extends RoleMenu {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -20,12 +20,13 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
/** /**
* 实体类 * 实体类
* *
@ -35,15 +36,16 @@ import org.springblade.core.mp.base.BaseEntity;
@Data @Data
@TableName("blade_client") @TableName("blade_client")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Client对象", description = "Client对象") @Schema(description = "Client对象")
public class AuthClient extends BaseEntity { public class AuthClient extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键id * 主键id
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -51,57 +53,57 @@ public class AuthClient extends BaseEntity {
/** /**
* 客户端id * 客户端id
*/ */
@ApiModelProperty(value = "客户端id") @Schema(description = "客户端id")
private String clientId; private String clientId;
/** /**
* 客户端密钥 * 客户端密钥
*/ */
@ApiModelProperty(value = "客户端密钥") @Schema(description = "客户端密钥")
private String clientSecret; private String clientSecret;
/** /**
* 资源集合 * 资源集合
*/ */
@ApiModelProperty(value = "资源集合") @Schema(description = "资源集合")
private String resourceIds; private String resourceIds;
/** /**
* 授权范围 * 授权范围
*/ */
@ApiModelProperty(value = "授权范围") @Schema(description = "授权范围")
private String scope; private String scope;
/** /**
* 授权类型 * 授权类型
*/ */
@ApiModelProperty(value = "授权类型") @Schema(description = "授权类型")
private String authorizedGrantTypes; private String authorizedGrantTypes;
/** /**
* 回调地址 * 回调地址
*/ */
@ApiModelProperty(value = "回调地址") @Schema(description = "回调地址")
private String webServerRedirectUri; private String webServerRedirectUri;
/** /**
* 权限 * 权限
*/ */
@ApiModelProperty(value = "权限") @Schema(description = "权限")
private String authorities; private String authorities;
/** /**
* 令牌过期秒数 * 令牌过期秒数
*/ */
@ApiModelProperty(value = "令牌过期秒数") @Schema(description = "令牌过期秒数")
private Integer accessTokenValidity; private Integer accessTokenValidity;
/** /**
* 刷新令牌过期秒数 * 刷新令牌过期秒数
*/ */
@ApiModelProperty(value = "刷新令牌过期秒数") @Schema(description = "刷新令牌过期秒数")
private Integer refreshTokenValidity; private Integer refreshTokenValidity;
/** /**
* 附加说明 * 附加说明
*/ */
@ApiModelProperty(value = "附加说明") @Schema(description = "附加说明")
private String additionalInformation; private String additionalInformation;
/** /**
* 自动授权 * 自动授权
*/ */
@ApiModelProperty(value = "自动授权") @Schema(description = "自动授权")
private String autoapprove; private String autoapprove;

View File

@ -20,12 +20,13 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
/** /**
* 实体类 * 实体类
* *
@ -34,15 +35,16 @@ import org.springblade.core.mp.base.BaseEntity;
@Data @Data
@TableName("blade_scope_data") @TableName("blade_scope_data")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DataScope对象", description = "DataScope对象") @Schema(description = "DataScope对象")
public class DataScope extends BaseEntity { public class DataScope extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键 * 主键
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -50,47 +52,47 @@ public class DataScope extends BaseEntity {
/** /**
* 菜单主键 * 菜单主键
*/ */
@ApiModelProperty(value = "菜单主键") @Schema(description = "菜单主键")
private Long menuId; private Long menuId;
/** /**
* 资源编号 * 资源编号
*/ */
@ApiModelProperty(value = "资源编号") @Schema(description = "资源编号")
private String resourceCode; private String resourceCode;
/** /**
* 数据权限名称 * 数据权限名称
*/ */
@ApiModelProperty(value = "数据权限名称") @Schema(description = "数据权限名称")
private String scopeName; private String scopeName;
/** /**
* 数据权限可见字段 * 数据权限可见字段
*/ */
@ApiModelProperty(value = "数据权限可见字段") @Schema(description = "数据权限可见字段")
private String scopeField; private String scopeField;
/** /**
* 数据权限类名 * 数据权限类名
*/ */
@ApiModelProperty(value = "数据权限类名") @Schema(description = "数据权限类名")
private String scopeClass; private String scopeClass;
/** /**
* 数据权限字段 * 数据权限字段
*/ */
@ApiModelProperty(value = "数据权限字段") @Schema(description = "数据权限字段")
private String scopeColumn; private String scopeColumn;
/** /**
* 数据权限类型 * 数据权限类型
*/ */
@ApiModelProperty(value = "数据权限类型") @Schema(description = "数据权限类型")
private Integer scopeType; private Integer scopeType;
/** /**
* 数据权限值域 * 数据权限值域
*/ */
@ApiModelProperty(value = "数据权限值域") @Schema(description = "数据权限值域")
private String scopeValue; private String scopeValue;
/** /**
* 数据权限备注 * 数据权限备注
*/ */
@ApiModelProperty(value = "数据权限备注") @Schema(description = "数据权限备注")
private String remark; private String remark;

View File

@ -21,10 +21,10 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -34,15 +34,16 @@ import java.io.Serializable;
*/ */
@Data @Data
@TableName("blade_dept") @TableName("blade_dept")
@ApiModel(value = "Dept对象", description = "Dept对象") @Schema(description = "Dept对象")
public class Dept implements Serializable { public class Dept implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键 * 主键
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -50,51 +51,51 @@ public class Dept implements Serializable {
/** /**
* 租户ID * 租户ID
*/ */
@ApiModelProperty(value = "租户ID") @Schema(description = "租户ID")
private String tenantId; private String tenantId;
/** /**
* 父主键 * 父主键
*/ */
@ApiModelProperty(value = "父主键") @Schema(description = "父主键")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long parentId; private Long parentId;
/** /**
* 祖级机构主键 * 祖级机构主键
*/ */
@ApiModelProperty(value = "祖级机构主键") @Schema(description = "祖级机构主键")
private String ancestors; private String ancestors;
/** /**
* 部门名 * 部门名
*/ */
@ApiModelProperty(value = "部门名") @Schema(description = "部门名")
private String deptName; private String deptName;
/** /**
* 部门全称 * 部门全称
*/ */
@ApiModelProperty(value = "部门全称") @Schema(description = "部门全称")
private String fullName; private String fullName;
/** /**
* 排序 * 排序
*/ */
@ApiModelProperty(value = "排序") @Schema(description = "排序")
private Integer sort; private Integer sort;
/** /**
* 备注 * 备注
*/ */
@ApiModelProperty(value = "备注") @Schema(description = "备注")
private String remark; private String remark;
/** /**
* 是否已删除 * 是否已删除
*/ */
@TableLogic @TableLogic
@ApiModelProperty(value = "是否已删除") @Schema(description = "是否已删除")
private Integer isDeleted; private Integer isDeleted;

View File

@ -21,12 +21,13 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.util.Objects;
/** /**
* 实体类 * 实体类
@ -35,15 +36,16 @@ import java.io.Serializable;
*/ */
@Data @Data
@TableName("blade_menu") @TableName("blade_menu")
@ApiModel(value = "Menu对象", description = "Menu对象") @Schema(description = "Menu对象")
public class Menu implements Serializable { public class Menu implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键 * 主键
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -51,75 +53,75 @@ public class Menu implements Serializable {
/** /**
* 菜单父主键 * 菜单父主键
*/ */
@ApiModelProperty(value = "父主键") @Schema(description = "父主键")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long parentId; private Long parentId;
/** /**
* 菜单编号 * 菜单编号
*/ */
@ApiModelProperty(value = "菜单编号") @Schema(description = "菜单编号")
private String code; private String code;
/** /**
* 菜单名称 * 菜单名称
*/ */
@ApiModelProperty(value = "菜单名称") @Schema(description = "菜单名称")
private String name; private String name;
/** /**
* 菜单别名 * 菜单别名
*/ */
@ApiModelProperty(value = "菜单别名") @Schema(description = "菜单别名")
private String alias; private String alias;
/** /**
* 请求地址 * 请求地址
*/ */
@ApiModelProperty(value = "请求地址") @Schema(description = "请求地址")
private String path; private String path;
/** /**
* 菜单资源 * 菜单资源
*/ */
@ApiModelProperty(value = "菜单资源") @Schema(description = "菜单资源")
private String source; private String source;
/** /**
* 排序 * 排序
*/ */
@ApiModelProperty(value = "排序") @Schema(description = "排序")
private Integer sort; private Integer sort;
/** /**
* 菜单类型 * 菜单类型
*/ */
@ApiModelProperty(value = "菜单类型") @Schema(description = "菜单类型")
private Integer category; private Integer category;
/** /**
* 操作按钮类型 * 操作按钮类型
*/ */
@ApiModelProperty(value = "操作按钮类型") @Schema(description = "操作按钮类型")
private Integer action; private Integer action;
/** /**
* 是否打开新页面 * 是否打开新页面
*/ */
@ApiModelProperty(value = "是否打开新页面") @Schema(description = "是否打开新页面")
private Integer isOpen; private Integer isOpen;
/** /**
* 备注 * 备注
*/ */
@ApiModelProperty(value = "备注") @Schema(description = "备注")
private String remark; private String remark;
/** /**
* 是否已删除 * 是否已删除
*/ */
@TableLogic @TableLogic
@ApiModelProperty(value = "是否已删除") @Schema(description = "是否已删除")
private Integer isDeleted; private Integer isDeleted;
@ -132,10 +134,12 @@ public class Menu implements Serializable {
return false; return false;
} }
Menu other = (Menu) obj; Menu other = (Menu) obj;
if (Func.equals(this.getId(), other.getId())) { return Func.equals(this.getId(), other.getId());
return true; }
}
return false; @Override
public int hashCode() {
return Objects.hash(id, parentId, code);
} }
} }

View File

@ -20,12 +20,13 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
/** /**
* 实体类 * 实体类
* *
@ -34,15 +35,16 @@ import org.springblade.core.mp.base.BaseEntity;
@Data @Data
@TableName("blade_param") @TableName("blade_param")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Param对象", description = "Param对象") @Schema(description = "Param对象")
public class Param extends BaseEntity { public class Param extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键id * 主键id
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -50,25 +52,25 @@ public class Param extends BaseEntity {
/** /**
* 参数名 * 参数名
*/ */
@ApiModelProperty(value = "参数名") @Schema(description = "参数名")
private String paramName; private String paramName;
/** /**
* 参数键 * 参数键
*/ */
@ApiModelProperty(value = "参数键") @Schema(description = "参数键")
private String paramKey; private String paramKey;
/** /**
* 参数值 * 参数值
*/ */
@ApiModelProperty(value = "参数值") @Schema(description = "参数值")
private String paramValue; private String paramValue;
/** /**
* 备注 * 备注
*/ */
@ApiModelProperty(value = "备注") @Schema(description = "备注")
private String remark; private String remark;

View File

@ -20,12 +20,13 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.TenantEntity; import org.springblade.core.mp.base.TenantEntity;
import java.io.Serial;
/** /**
* 岗位表实体类 * 岗位表实体类
* *
@ -34,15 +35,16 @@ import org.springblade.core.mp.base.TenantEntity;
@Data @Data
@TableName("blade_post") @TableName("blade_post")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Post对象", description = "岗位表") @Schema(description = "Post对象")
public class Post extends TenantEntity { public class Post extends TenantEntity {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键id * 主键id
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -50,27 +52,27 @@ public class Post extends TenantEntity {
/** /**
* 类型 * 类型
*/ */
@ApiModelProperty(value = "类型") @Schema(description = "类型")
private Integer category; private Integer category;
/** /**
* 岗位编号 * 岗位编号
*/ */
@ApiModelProperty(value = "岗位编号") @Schema(description = "岗位编号")
private String postCode; private String postCode;
/** /**
* 岗位名称 * 岗位名称
*/ */
@ApiModelProperty(value = "岗位名称") @Schema(description = "岗位名称")
private String postName; private String postName;
/** /**
* 岗位排序 * 岗位排序
*/ */
@ApiModelProperty(value = "岗位排序") @Schema(description = "岗位排序")
private Integer sort; private Integer sort;
/** /**
* 岗位描述 * 岗位描述
*/ */
@ApiModelProperty(value = "岗位描述") @Schema(description = "岗位描述")
private String remark; private String remark;

View File

@ -18,10 +18,10 @@ package org.springblade.system.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -31,96 +31,97 @@ import java.io.Serializable;
*/ */
@Data @Data
@TableName("blade_region") @TableName("blade_region")
@ApiModel(value = "Region对象", description = "行政区划表") @Schema(description = "Region对象")
public class Region implements Serializable { public class Region implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 区划编号 * 区划编号
*/ */
@TableId(value = "code", type = IdType.INPUT) @TableId(value = "code", type = IdType.INPUT)
@ApiModelProperty(value = "区划编号") @Schema(description = "区划编号")
private String code; private String code;
/** /**
* 父区划编号 * 父区划编号
*/ */
@ApiModelProperty(value = "父区划编号") @Schema(description = "父区划编号")
private String parentCode; private String parentCode;
/** /**
* 祖区划编号 * 祖区划编号
*/ */
@ApiModelProperty(value = "祖区划编号") @Schema(description = "祖区划编号")
private String ancestors; private String ancestors;
/** /**
* 区划名称 * 区划名称
*/ */
@ApiModelProperty(value = "区划名称") @Schema(description = "区划名称")
private String name; private String name;
/** /**
* 省级区划编号 * 省级区划编号
*/ */
@ApiModelProperty(value = "省级区划编号") @Schema(description = "省级区划编号")
private String provinceCode; private String provinceCode;
/** /**
* 省级名称 * 省级名称
*/ */
@ApiModelProperty(value = "省级名称") @Schema(description = "省级名称")
private String provinceName; private String provinceName;
/** /**
* 市级区划编号 * 市级区划编号
*/ */
@ApiModelProperty(value = "市级区划编号") @Schema(description = "市级区划编号")
private String cityCode; private String cityCode;
/** /**
* 市级名称 * 市级名称
*/ */
@ApiModelProperty(value = "市级名称") @Schema(description = "市级名称")
private String cityName; private String cityName;
/** /**
* 区级区划编号 * 区级区划编号
*/ */
@ApiModelProperty(value = "区级区划编号") @Schema(description = "区级区划编号")
private String districtCode; private String districtCode;
/** /**
* 区级名称 * 区级名称
*/ */
@ApiModelProperty(value = "区级名称") @Schema(description = "区级名称")
private String districtName; private String districtName;
/** /**
* 镇级区划编号 * 镇级区划编号
*/ */
@ApiModelProperty(value = "镇级区划编号") @Schema(description = "镇级区划编号")
private String townCode; private String townCode;
/** /**
* 镇级名称 * 镇级名称
*/ */
@ApiModelProperty(value = "镇级名称") @Schema(description = "镇级名称")
private String townName; private String townName;
/** /**
* 村级区划编号 * 村级区划编号
*/ */
@ApiModelProperty(value = "村级区划编号") @Schema(description = "村级区划编号")
private String villageCode; private String villageCode;
/** /**
* 村级名称 * 村级名称
*/ */
@ApiModelProperty(value = "村级名称") @Schema(description = "村级名称")
private String villageName; private String villageName;
/** /**
* 层级 * 层级
*/ */
@ApiModelProperty(value = "层级") @Schema(description = "层级")
private Integer level; private Integer level;
/** /**
* 排序 * 排序
*/ */
@ApiModelProperty(value = "排序") @Schema(description = "排序")
private Integer sort; private Integer sort;
/** /**
* 备注 * 备注
*/ */
@ApiModelProperty(value = "备注") @Schema(description = "备注")
private String remark; private String remark;

View File

@ -21,10 +21,10 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -34,15 +34,16 @@ import java.io.Serializable;
*/ */
@Data @Data
@TableName("blade_role") @TableName("blade_role")
@ApiModel(value = "Role对象", description = "Role对象") @Schema(description = "Role对象")
public class Role implements Serializable { public class Role implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键 * 主键
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -50,39 +51,39 @@ public class Role implements Serializable {
/** /**
* 租户ID * 租户ID
*/ */
@ApiModelProperty(value = "租户ID") @Schema(description = "租户ID")
private String tenantId; private String tenantId;
/** /**
* 父主键 * 父主键
*/ */
@ApiModelProperty(value = "父主键") @Schema(description = "父主键")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long parentId; private Long parentId;
/** /**
* 角色名 * 角色名
*/ */
@ApiModelProperty(value = "角色名") @Schema(description = "角色名")
private String roleName; private String roleName;
/** /**
* 排序 * 排序
*/ */
@ApiModelProperty(value = "排序") @Schema(description = "排序")
private Integer sort; private Integer sort;
/** /**
* 角色别名 * 角色别名
*/ */
@ApiModelProperty(value = "角色别名") @Schema(description = "角色别名")
private String roleAlias; private String roleAlias;
/** /**
* 是否已删除 * 是否已删除
*/ */
@TableLogic @TableLogic
@ApiModelProperty(value = "是否已删除") @Schema(description = "是否已删除")
private Integer isDeleted; private Integer isDeleted;

View File

@ -20,10 +20,10 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -33,15 +33,16 @@ import java.io.Serializable;
*/ */
@Data @Data
@TableName("blade_role_menu") @TableName("blade_role_menu")
@ApiModel(value = "RoleMenu对象", description = "RoleMenu对象") @Schema(description = "RoleMenu对象")
public class RoleMenu implements Serializable { public class RoleMenu implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键 * 主键
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -49,14 +50,14 @@ public class RoleMenu implements Serializable {
/** /**
* 菜单id * 菜单id
*/ */
@ApiModelProperty(value = "菜单id") @Schema(description = "菜单id")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long menuId; private Long menuId;
/** /**
* 角色id * 角色id
*/ */
@ApiModelProperty(value = "角色id") @Schema(description = "角色id")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long roleId; private Long roleId;

View File

@ -20,10 +20,10 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -33,16 +33,17 @@ import java.io.Serializable;
*/ */
@Data @Data
@TableName("blade_role_scope") @TableName("blade_role_scope")
@ApiModel(value = "RoleScope对象", description = "RoleScope对象") @Schema(description = "RoleScope对象")
public class RoleScope implements Serializable { public class RoleScope implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键 * 主键
*/ */
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
private Long id; private Long id;
@ -50,14 +51,14 @@ public class RoleScope implements Serializable {
* 权限id * 权限id
*/ */
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "权限id") @Schema(description = "权限id")
private Long scopeId; private Long scopeId;
/** /**
* 角色id * 角色id
*/ */
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "角色id") @Schema(description = "角色id")
private Long roleId; private Long roleId;

View File

@ -20,12 +20,13 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseEntity;
import java.io.Serial;
/** /**
* 实体类 * 实体类
* *
@ -34,15 +35,16 @@ import org.springblade.core.mp.base.BaseEntity;
@Data @Data
@TableName("blade_tenant") @TableName("blade_tenant")
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Tenant对象", description = "Tenant对象") @Schema(description = "Tenant对象")
public class Tenant extends BaseEntity { public class Tenant extends BaseEntity {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键id * 主键id
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;
@ -50,32 +52,32 @@ public class Tenant extends BaseEntity {
/** /**
* 租户ID * 租户ID
*/ */
@ApiModelProperty(value = "租户ID") @Schema(description = "租户ID")
private String tenantId; private String tenantId;
/** /**
* 租户名称 * 租户名称
*/ */
@ApiModelProperty(value = "租户名称") @Schema(description = "租户名称")
private String tenantName; private String tenantName;
/** /**
* 域名地址 * 域名地址
*/ */
@ApiModelProperty(value = "域名地址") @Schema(description = "域名地址")
private String domain; private String domain;
/** /**
* 联系人 * 联系人
*/ */
@ApiModelProperty(value = "联系人") @Schema(description = "联系人")
private String linkman; private String linkman;
/** /**
* 联系电话 * 联系电话
*/ */
@ApiModelProperty(value = "联系电话") @Schema(description = "联系电话")
private String contactNumber; private String contactNumber;
/** /**
* 联系地址 * 联系地址
*/ */
@ApiModelProperty(value = "联系地址") @Schema(description = "联系地址")
private String address; private String address;

View File

@ -15,11 +15,13 @@
*/ */
package org.springblade.system.vo; package org.springblade.system.vo;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.system.entity.DataScope; import org.springblade.system.entity.DataScope;
import java.io.Serial;
/** /**
* 视图实体类 * 视图实体类
* *
@ -27,8 +29,9 @@ import org.springblade.system.entity.DataScope;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DataScopeVO对象", description = "DataScopeVO对象") @Schema(description = "DataScopeVO对象")
public class DataScopeVO extends DataScope { public class DataScopeVO extends DataScope {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**

View File

@ -18,12 +18,13 @@ package org.springblade.system.vo;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.tool.node.INode; import org.springblade.core.tool.node.INode;
import org.springblade.system.entity.Dept; import org.springblade.system.entity.Dept;
import java.io.Serial;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -34,8 +35,9 @@ import java.util.List;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "DeptVO对象", description = "DeptVO对象") @Schema(description = "DeptVO对象")
public class DeptVO extends Dept implements INode<DeptVO> { public class DeptVO extends Dept implements INode<DeptVO> {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**

View File

@ -17,6 +17,7 @@ package org.springblade.system.vo;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
@ -27,6 +28,7 @@ import java.util.List;
*/ */
@Data @Data
public class GrantTreeVO implements Serializable { public class GrantTreeVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private List<MenuVO> menu; private List<MenuVO> menu;

View File

@ -15,9 +15,10 @@
*/ */
package org.springblade.system.vo; package org.springblade.system.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
@ -28,15 +29,16 @@ import java.util.List;
*/ */
@Data @Data
public class GrantVO implements Serializable { public class GrantVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "roleIds集合") @Schema(description = "roleIds集合")
private List<Long> roleIds; private List<Long> roleIds;
@ApiModelProperty(value = "menuIds集合") @Schema(description = "menuIds集合")
private List<Long> menuIds; private List<Long> menuIds;
@ApiModelProperty(value = "dataScopeIds集合") @Schema(description = "dataScopeIds集合")
private List<Long> dataScopeIds; private List<Long> dataScopeIds;
} }

View File

@ -18,12 +18,13 @@ package org.springblade.system.vo;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.tool.node.INode; import org.springblade.core.tool.node.INode;
import org.springblade.system.entity.Menu; import org.springblade.system.entity.Menu;
import java.io.Serial;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -34,8 +35,9 @@ import java.util.List;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "MenuVO对象", description = "MenuVO对象") @Schema(description = "MenuVO对象")
public class MenuVO extends Menu implements INode<MenuVO> { public class MenuVO extends Menu implements INode<MenuVO> {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**

View File

@ -15,11 +15,13 @@
*/ */
package org.springblade.system.vo; package org.springblade.system.vo;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.system.entity.Param; import org.springblade.system.entity.Param;
import java.io.Serial;
/** /**
* 视图实体类 * 视图实体类
* *
@ -27,8 +29,9 @@ import org.springblade.system.entity.Param;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "ParamVO对象", description = "ParamVO对象") @Schema(description = "ParamVO对象")
public class ParamVO extends Param { public class ParamVO extends Param {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -15,11 +15,13 @@
*/ */
package org.springblade.system.vo; package org.springblade.system.vo;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.system.entity.Post; import org.springblade.system.entity.Post;
import java.io.Serial;
/** /**
* 岗位表视图实体类 * 岗位表视图实体类
* *
@ -27,8 +29,9 @@ import org.springblade.system.entity.Post;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "PostVO对象", description = "岗位表") @Schema(description = "PostVO对象")
public class PostVO extends Post { public class PostVO extends Post {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**

View File

@ -18,13 +18,14 @@ package org.springblade.system.vo;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.tool.node.INode; import org.springblade.core.tool.node.INode;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.system.entity.Region; import org.springblade.system.entity.Region;
import java.io.Serial;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -35,8 +36,9 @@ import java.util.List;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "RegionVO对象", description = "行政区划表") @Schema(description = "RegionVO对象")
public class RegionVO extends Region implements INode<RegionVO> { public class RegionVO extends Region implements INode<RegionVO> {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**

View File

@ -15,11 +15,13 @@
*/ */
package org.springblade.system.vo; package org.springblade.system.vo;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.system.entity.RoleMenu; import org.springblade.system.entity.RoleMenu;
import java.io.Serial;
/** /**
* 视图实体类 * 视图实体类
* *
@ -27,8 +29,9 @@ import org.springblade.system.entity.RoleMenu;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "RoleMenuVO对象", description = "RoleMenuVO对象") @Schema(description = "RoleMenuVO对象")
public class RoleMenuVO extends RoleMenu { public class RoleMenuVO extends RoleMenu {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
} }

View File

@ -18,12 +18,13 @@ package org.springblade.system.vo;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.tool.node.INode; import org.springblade.core.tool.node.INode;
import org.springblade.system.entity.Role; import org.springblade.system.entity.Role;
import java.io.Serial;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -34,8 +35,9 @@ import java.util.List;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "RoleVO对象", description = "RoleVO对象") @Schema(description = "RoleVO对象")
public class RoleVO extends Role implements INode<RoleVO> { public class RoleVO extends Role implements INode<RoleVO> {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-service-api</artifactId> <artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -20,11 +20,12 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.TenantEntity; import org.springblade.core.mp.base.TenantEntity;
import java.io.Serial;
import java.util.Date; import java.util.Date;
/** /**
@ -37,12 +38,13 @@ import java.util.Date;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
public class User extends TenantEntity { public class User extends TenantEntity {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 主键id * 主键id
*/ */
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long id; private Long id;

View File

@ -15,10 +15,10 @@
*/ */
package org.springblade.system.user.entity; package org.springblade.system.user.entity;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
@ -28,33 +28,34 @@ import java.util.List;
* @author Chill * @author Chill
*/ */
@Data @Data
@ApiModel(description = "用户信息") @Schema(description = "用户信息")
public class UserInfo implements Serializable { public class UserInfo implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 用户基础信息 * 用户基础信息
*/ */
@ApiModelProperty(value = "用户") @Schema(description = "用户")
private User user; private User user;
/** /**
* 权限标识集合 * 权限标识集合
*/ */
@ApiModelProperty(value = "权限集合") @Schema(description = "权限集合")
private List<String> permissions; private List<String> permissions;
/** /**
* 角色集合 * 角色集合
*/ */
@ApiModelProperty(value = "角色集合") @Schema(description = "角色集合")
private List<String> roles; private List<String> roles;
/** /**
* 第三方授权id * 第三方授权id
*/ */
@ApiModelProperty(value = "第三方授权id") @Schema(description = "第三方授权id")
private String oauthId; private String oauthId;
} }

View File

@ -20,9 +20,10 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.io.Serial;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -34,6 +35,7 @@ import java.io.Serializable;
@TableName("blade_user_oauth") @TableName("blade_user_oauth")
public class UserOauth implements Serializable { public class UserOauth implements Serializable {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -41,7 +43,7 @@ public class UserOauth implements Serializable {
* 主键 * 主键
*/ */
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "主键") @Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID) @TableId(value = "id", type = IdType.ASSIGN_ID)
private Long id; private Long id;
@ -59,7 +61,7 @@ public class UserOauth implements Serializable {
* 用户ID * 用户ID
*/ */
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty(value = "用户主键") @Schema(description = "用户主键")
private Long userId; private Long userId;
/** /**

View File

@ -17,11 +17,13 @@ package org.springblade.system.user.vo;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.system.user.entity.User; import org.springblade.system.user.entity.User;
import java.io.Serial;
/** /**
* 视图实体类 * 视图实体类
* *
@ -29,8 +31,9 @@ import org.springblade.system.user.entity.User;
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ApiModel(value = "UserVO对象", description = "UserVO对象") @Schema(description = "UserVO对象")
public class UserVO extends User { public class UserVO extends User {
@Serial
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**

View File

@ -5,13 +5,13 @@
<parent> <parent>
<artifactId>SpringBlade</artifactId> <artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>blade-service-api</artifactId> <artifactId>blade-service-api</artifactId>
<name>${project.artifactId}</name> <name>${project.artifactId}</name>
<version>3.7.1</version> <version>4.0.0</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<description>SpringBlade 微服务API集合</description> <description>SpringBlade 微服务API集合</description>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>blade-service</artifactId> <artifactId>blade-service</artifactId>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -16,7 +16,7 @@
package com.example.demo.controller; package com.example.demo.controller;
import com.example.demo.props.DemoProperties; import com.example.demo.props.DemoProperties;
import io.swagger.annotations.Api; import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope; import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -31,7 +31,7 @@ import org.springframework.web.bind.annotation.RestController;
@RefreshScope @RefreshScope
@RestController @RestController
@RequestMapping("demo") @RequestMapping("demo")
@Api(value = "配置接口", tags = "即时刷新配置") @Tag(name = "配置接口", description = "即时刷新配置")
public class DemoController { public class DemoController {
@Value("${demo.name:1}") @Value("${demo.name:1}")

View File

@ -18,8 +18,8 @@ package com.example.demo.controller;
import com.example.demo.entity.Notice; import com.example.demo.entity.Notice;
import com.example.demo.service.IDynamicService; import com.example.demo.service.IDynamicService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api; import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -36,7 +36,7 @@ import java.util.List;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("dynamic") @RequestMapping("dynamic")
@Api(value = "多数据源接口", tags = "多数据源") @Tag(name = "多数据源接口", description = "多数据源")
public class DynamicController { public class DynamicController {
private IDynamicService dynamicService; private IDynamicService dynamicService;
@ -46,7 +46,7 @@ public class DynamicController {
*/ */
@GetMapping("/master-list") @GetMapping("/master-list")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "master列表", notes = "master列表") @Operation(summary = "master列表", description = "master列表")
public R<List<Notice>> masterList() { public R<List<Notice>> masterList() {
List<Notice> list = dynamicService.masterList(); List<Notice> list = dynamicService.masterList();
return R.data(list); return R.data(list);
@ -57,7 +57,7 @@ public class DynamicController {
*/ */
@GetMapping("/slave-list") @GetMapping("/slave-list")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "slave列表", notes = "slave列表") @Operation(summary = "slave列表", description = "slave列表")
public R<List<Notice>> slaveList() { public R<List<Notice>> slaveList() {
List<Notice> list = dynamicService.slaveList(); List<Notice> list = dynamicService.slaveList();
return R.data(list); return R.data(list);

View File

@ -19,7 +19,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.demo.entity.Notice; import com.example.demo.entity.Notice;
import com.example.demo.service.INoticeService; import com.example.demo.service.INoticeService;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.*; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.common.cache.CacheNames; import org.springblade.common.cache.CacheNames;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
@ -28,7 +33,6 @@ import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map; import java.util.Map;
@ -40,7 +44,7 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("notice") @RequestMapping("notice")
@AllArgsConstructor @AllArgsConstructor
@Api(value = "用户博客", tags = "博客接口") @Tag(name = "用户博客", description = "博客接口")
public class NoticeController extends BladeController implements CacheNames { public class NoticeController extends BladeController implements CacheNames {
private INoticeService noticeService; private INoticeService noticeService;
@ -50,7 +54,7 @@ public class NoticeController extends BladeController implements CacheNames {
*/ */
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入notice") @Operation(summary = "详情", description = "传入notice")
public R<Notice> detail(Notice notice) { public R<Notice> detail(Notice notice) {
Notice detail = noticeService.getOne(Condition.getQueryWrapper(notice)); Notice detail = noticeService.getOne(Condition.getQueryWrapper(notice));
return R.data(detail); return R.data(detail);
@ -60,13 +64,13 @@ public class NoticeController extends BladeController implements CacheNames {
* 分页 * 分页
*/ */
@GetMapping("/list") @GetMapping("/list")
@ApiImplicitParams({ @Parameters({
@ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"), @Parameter(name = "category", description = "公告类型", in = ParameterIn.QUERY, schema = @Schema(type = "integer")),
@ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string") @Parameter(name = "title", description = "公告标题", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
}) })
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入notice") @Operation(summary = "分页", description = "传入notice")
public R<IPage<Notice>> list(@ApiIgnore @RequestParam Map<String, Object> notice, Query query) { public R<IPage<Notice>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> notice, Query query) {
IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class)); IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class));
return R.data(pages); return R.data(pages);
} }
@ -76,7 +80,7 @@ public class NoticeController extends BladeController implements CacheNames {
*/ */
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "新增", notes = "传入notice") @Operation(summary = "新增", description = "传入notice")
public R save(@RequestBody Notice notice) { public R save(@RequestBody Notice notice) {
return R.status(noticeService.save(notice)); return R.status(noticeService.save(notice));
} }
@ -86,7 +90,7 @@ public class NoticeController extends BladeController implements CacheNames {
*/ */
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "修改", notes = "传入notice") @Operation(summary = "修改", description = "传入notice")
public R update(@RequestBody Notice notice) { public R update(@RequestBody Notice notice) {
return R.status(noticeService.updateById(notice)); return R.status(noticeService.updateById(notice));
} }
@ -96,7 +100,7 @@ public class NoticeController extends BladeController implements CacheNames {
*/ */
@PostMapping("/submit") @PostMapping("/submit")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "新增或修改", notes = "传入notice") @Operation(summary = "新增或修改", description = "传入notice")
public R submit(@RequestBody Notice notice) { public R submit(@RequestBody Notice notice) {
return R.status(noticeService.saveOrUpdate(notice)); return R.status(noticeService.saveOrUpdate(notice));
} }
@ -106,8 +110,8 @@ public class NoticeController extends BladeController implements CacheNames {
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@ApiOperation(value = "逻辑删除", notes = "传入notice") @Operation(summary = "逻辑删除", description = "传入notice")
public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { public R remove(@Parameter(name = "主键集合") @RequestParam String ids) {
boolean temp = noticeService.deleteLogic(Func.toLongList(ids)); boolean temp = noticeService.deleteLogic(Func.toLongList(ids));
return R.status(temp); return R.status(temp);
} }

View File

@ -21,7 +21,7 @@ import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore; import io.swagger.v3.oas.annotations.Hidden;
import java.util.List; import java.util.List;
@ -30,7 +30,7 @@ import java.util.List;
* *
* @author Chill * @author Chill
*/ */
@ApiIgnore() @Hidden
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
public class NoticeClient implements INoticeClient { public class NoticeClient implements INoticeClient {

View File

@ -12,7 +12,7 @@ server:
spring: spring:
#排除DruidDataSourceAutoConfigure #排除DruidDataSourceAutoConfigure
autoconfigure: autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure exclude: com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
datasource: datasource:
dynamic: dynamic:
#设置默认的数据源或者数据源组,默认值即为master #设置默认的数据源或者数据源组,默认值即为master

View File

@ -12,7 +12,7 @@ server:
spring: spring:
#排除DruidDataSourceAutoConfigure #排除DruidDataSourceAutoConfigure
autoconfigure: autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure exclude: com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
datasource: datasource:
dynamic: dynamic:
#设置默认的数据源或者数据源组,默认值即为master #设置默认的数据源或者数据源组,默认值即为master

View File

@ -12,7 +12,7 @@ server:
spring: spring:
#排除DruidDataSourceAutoConfigure #排除DruidDataSourceAutoConfigure
autoconfigure: autoconfigure:
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure exclude: com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure
datasource: datasource:
dynamic: dynamic:
#设置默认的数据源或者数据源组,默认值即为master #设置默认的数据源或者数据源组,默认值即为master

View File

@ -1,6 +1,6 @@
FROM anapsix/alpine-java:8_server-jre_unlimited FROM bladex/alpine-java:openjdk17_cn_slim
MAINTAINER smallchill@163.com MAINTAINER bladejava@qq.com
RUN mkdir -p /blade/desk RUN mkdir -p /blade/desk
@ -10,6 +10,6 @@ EXPOSE 8105
ADD ./target/blade-desk.jar ./app.jar ADD ./target/blade-desk.jar ./app.jar
ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] ENTRYPOINT ["java", "--add-opens java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
CMD ["--spring.profiles.active=test"] CMD ["--spring.profiles.active=test"]

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId> <artifactId>blade-service</artifactId>
<version>3.7.1</version> <version>4.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -50,22 +50,6 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${artifactId}.jar"
file="${project.build.directory}/${artifactId}.jar" />
</tasks>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -1,7 +1,7 @@
package org.springblade.desk.controller; package org.springblade.desk.controller;
import io.swagger.annotations.Api; import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Operation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.support.Kv; import org.springblade.core.tool.support.Kv;
@ -22,7 +22,7 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("dashboard") @RequestMapping("dashboard")
@AllArgsConstructor @AllArgsConstructor
@Api(value = "首页", tags = "首页") @Tag(name = "首页", description = "首页")
public class DashBoardController { public class DashBoardController {
/** /**
@ -31,7 +31,7 @@ public class DashBoardController {
* @return * @return
*/ */
@GetMapping("/activities") @GetMapping("/activities")
@ApiOperation(value = "活跃用户", notes = "活跃用户") @Operation(summary = "活跃用户", description = "活跃用户")
public R activities() { public R activities() {
List<Map<String, Object>> list = new ArrayList<>(); List<Map<String, Object>> list = new ArrayList<>();
@ -62,7 +62,7 @@ public class DashBoardController {
* @return * @return
*/ */
@GetMapping("/notices") @GetMapping("/notices")
@ApiOperation(value = "消息", notes = "消息") @Operation(summary = "消息", description = "消息")
public R notices() { public R notices() {
List<Map<String, String>> list = new ArrayList<>(); List<Map<String, String>> list = new ArrayList<>();
Map<String, String> map1 = new HashMap<>(16); Map<String, String> map1 = new HashMap<>(16);
@ -122,7 +122,7 @@ public class DashBoardController {
* @return * @return
*/ */
@GetMapping("/my-notices") @GetMapping("/my-notices")
@ApiOperation(value = "消息", notes = "消息") @Operation(summary = "消息", description = "消息")
public R myNotices() { public R myNotices() {
List<Map<String, String>> list = new ArrayList<>(); List<Map<String, String>> list = new ArrayList<>();
Map<String, String> map1 = new HashMap<>(16); Map<String, String> map1 = new HashMap<>(16);

View File

@ -17,7 +17,12 @@ package org.springblade.desk.controller;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.*; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.common.cache.CacheNames; import org.springblade.common.cache.CacheNames;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
@ -30,7 +35,6 @@ import org.springblade.desk.service.INoticeService;
import org.springblade.desk.vo.NoticeVO; import org.springblade.desk.vo.NoticeVO;
import org.springblade.desk.wrapper.NoticeWrapper; import org.springblade.desk.wrapper.NoticeWrapper;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Map; import java.util.Map;
@ -43,7 +47,7 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("notice") @RequestMapping("notice")
@AllArgsConstructor @AllArgsConstructor
@Api(value = "用户博客", tags = "博客接口") @Tag(name = "用户博客", description = "博客接口")
public class NoticeController extends BladeController implements CacheNames { public class NoticeController extends BladeController implements CacheNames {
private INoticeService noticeService; private INoticeService noticeService;
@ -53,7 +57,7 @@ public class NoticeController extends BladeController implements CacheNames {
*/ */
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入notice") @Operation(summary = "详情", description = "传入notice")
public R<NoticeVO> detail(Notice notice) { public R<NoticeVO> detail(Notice notice) {
Notice detail = noticeService.getOne(Condition.getQueryWrapper(notice)); Notice detail = noticeService.getOne(Condition.getQueryWrapper(notice));
return R.data(NoticeWrapper.build().entityVO(detail)); return R.data(NoticeWrapper.build().entityVO(detail));
@ -63,13 +67,13 @@ public class NoticeController extends BladeController implements CacheNames {
* 分页 * 分页
*/ */
@GetMapping("/list") @GetMapping("/list")
@ApiImplicitParams({ @Parameters({
@ApiImplicitParam(name = "category", value = "公告类型", paramType = "query", dataType = "integer"), @Parameter(name = "category", description = "公告类型", in = ParameterIn.QUERY, schema = @Schema(type = "integer")),
@ApiImplicitParam(name = "title", value = "公告标题", paramType = "query", dataType = "string") @Parameter(name = "title", description = "公告标题", in = ParameterIn.QUERY, schema = @Schema(type = "string"))
}) })
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入notice") @Operation(summary = "分页", description = "传入notice")
public R<IPage<NoticeVO>> list(@ApiIgnore @RequestParam Map<String, Object> notice, Query query) { public R<IPage<NoticeVO>> list(@Parameter(hidden = true) @RequestParam Map<String, Object> notice, Query query) {
IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class)); IPage<Notice> pages = noticeService.page(Condition.getPage(query), Condition.getQueryWrapper(notice, Notice.class));
return R.data(NoticeWrapper.build().pageVO(pages)); return R.data(NoticeWrapper.build().pageVO(pages));
} }
@ -79,7 +83,7 @@ public class NoticeController extends BladeController implements CacheNames {
*/ */
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "新增", notes = "传入notice") @Operation(summary = "新增", description = "传入notice")
public R save(@RequestBody Notice notice) { public R save(@RequestBody Notice notice) {
return R.status(noticeService.save(notice)); return R.status(noticeService.save(notice));
} }
@ -89,7 +93,7 @@ public class NoticeController extends BladeController implements CacheNames {
*/ */
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "修改", notes = "传入notice") @Operation(summary = "修改", description = "传入notice")
public R update(@RequestBody Notice notice) { public R update(@RequestBody Notice notice) {
return R.status(noticeService.updateById(notice)); return R.status(noticeService.updateById(notice));
} }
@ -99,7 +103,7 @@ public class NoticeController extends BladeController implements CacheNames {
*/ */
@PostMapping("/submit") @PostMapping("/submit")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "新增或修改", notes = "传入notice") @Operation(summary = "新增或修改", description = "传入notice")
public R submit(@RequestBody Notice notice) { public R submit(@RequestBody Notice notice) {
return R.status(noticeService.saveOrUpdate(notice)); return R.status(noticeService.saveOrUpdate(notice));
} }
@ -109,8 +113,8 @@ public class NoticeController extends BladeController implements CacheNames {
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@ApiOperation(value = "逻辑删除", notes = "传入notice") @Operation(summary = "逻辑删除", description = "传入notice")
public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { public R remove(@Parameter(name = "主键集合") @RequestParam String ids) {
boolean temp = noticeService.deleteLogic(Func.toLongList(ids)); boolean temp = noticeService.deleteLogic(Func.toLongList(ids));
return R.status(temp); return R.status(temp);
} }

View File

@ -21,7 +21,7 @@ import org.springblade.desk.mapper.NoticeMapper;
import org.springblade.desk.entity.Notice; import org.springblade.desk.entity.Notice;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore; import io.swagger.v3.oas.annotations.Hidden;
import java.util.List; import java.util.List;
@ -30,7 +30,7 @@ import java.util.List;
* *
* @author Chill * @author Chill
*/ */
@ApiIgnore() @Hidden
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
public class NoticeClient implements INoticeClient { public class NoticeClient implements INoticeClient {

Some files were not shown because too many files have changed in this diff Show More