Compare commits
2
Commits
e81ec8cca7
...
ea141bb640
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea141bb640 | ||
|
|
5adb63f612 |
@@ -43,11 +43,45 @@
|
|||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-webflux</artifactId>
|
<artifactId>spring-boot-starter-webflux</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-security</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-validation</artifactId>
|
<artifactId>spring-boot-starter-validation</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.data</groupId>
|
||||||
|
<artifactId>spring-data-commons</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.projectreactor</groupId>
|
||||||
|
<artifactId>reactor-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.hutool</groupId>
|
||||||
|
<artifactId>hutool-all</artifactId>
|
||||||
|
<version>5.8.25</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- 阿里云号码认证服务(新版SDK) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun</groupId>
|
||||||
|
<artifactId>dypnsapi20170525</artifactId>
|
||||||
|
<version>1.0.6</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- 阿里云一键登录服务(旧版SDK,保留兼容) -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun</groupId>
|
||||||
|
<artifactId>aliyun-java-sdk-dypnsapi</artifactId>
|
||||||
|
<version>1.2.12</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.aliyun</groupId>
|
<groupId>com.aliyun</groupId>
|
||||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||||
|
|||||||
+25
@@ -2,11 +2,36 @@ package cn.novalon.gym.manage.auth.service;
|
|||||||
|
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短信服务接口
|
||||||
|
*
|
||||||
|
* @author auto-generated
|
||||||
|
* @date 2026-06-20
|
||||||
|
*/
|
||||||
public interface SmsService {
|
public interface SmsService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送短信验证码
|
||||||
|
*
|
||||||
|
* @param phone 手机号
|
||||||
|
* @return 发送结果
|
||||||
|
*/
|
||||||
Mono<Boolean> sendVerificationCode(String phone);
|
Mono<Boolean> sendVerificationCode(String phone);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验证短信验证码
|
||||||
|
*
|
||||||
|
* @param phone 手机号
|
||||||
|
* @param code 验证码
|
||||||
|
* @return 验证结果
|
||||||
|
*/
|
||||||
Mono<Boolean> verifyCode(String phone, String code);
|
Mono<Boolean> verifyCode(String phone, String code);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取验证码(用于测试或特殊场景)
|
||||||
|
*
|
||||||
|
* @param phone 手机号
|
||||||
|
* @return 验证码
|
||||||
|
*/
|
||||||
Mono<String> getVerificationCode(String phone);
|
Mono<String> getVerificationCode(String phone);
|
||||||
}
|
}
|
||||||
@@ -118,6 +118,11 @@
|
|||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
<version>5.8.25</version>
|
<version>5.8.25</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.zxing</groupId>
|
<groupId>com.google.zxing</groupId>
|
||||||
<artifactId>core</artifactId>
|
<artifactId>core</artifactId>
|
||||||
|
|||||||
+1
-16
@@ -18,7 +18,6 @@ import cn.novalon.gym.manage.member.handler.MemberHandler;
|
|||||||
import cn.novalon.gym.manage.member.handler.WechatAuthHandler;
|
import cn.novalon.gym.manage.member.handler.WechatAuthHandler;
|
||||||
import cn.novalon.gym.manage.notify.handler.SysNoticeHandler;
|
import cn.novalon.gym.manage.notify.handler.SysNoticeHandler;
|
||||||
import cn.novalon.gym.manage.notify.handler.SysUserMessageHandler;
|
import cn.novalon.gym.manage.notify.handler.SysUserMessageHandler;
|
||||||
import cn.novalon.gym.manage.payment.handler.PaymentHandler;
|
|
||||||
import cn.novalon.gym.manage.sys.handler.auth.PasswordDiagnosticHandler;
|
import cn.novalon.gym.manage.sys.handler.auth.PasswordDiagnosticHandler;
|
||||||
import cn.novalon.gym.manage.sys.handler.auth.SysAuthHandler;
|
import cn.novalon.gym.manage.sys.handler.auth.SysAuthHandler;
|
||||||
import cn.novalon.gym.manage.sys.handler.config.SysConfigHandler;
|
import cn.novalon.gym.manage.sys.handler.config.SysConfigHandler;
|
||||||
@@ -80,8 +79,7 @@ public class SystemRouter {
|
|||||||
CourseLabelHandler courseLabelHandler,
|
CourseLabelHandler courseLabelHandler,
|
||||||
CheckInHandler checkInHandler,
|
CheckInHandler checkInHandler,
|
||||||
DataStatisticsHandler dataStatisticsHandler,
|
DataStatisticsHandler dataStatisticsHandler,
|
||||||
PhoneAuthHandler phoneAuthHandler,
|
PhoneAuthHandler phoneAuthHandler) {
|
||||||
PaymentHandler paymentHandler) {
|
|
||||||
|
|
||||||
return route()
|
return route()
|
||||||
// ========== 诊断路由 ==========
|
// ========== 诊断路由 ==========
|
||||||
@@ -363,19 +361,6 @@ public class SystemRouter {
|
|||||||
.GET("/api/datacount/history", dataStatisticsHandler::queryHistoricalStatistics)
|
.GET("/api/datacount/history", dataStatisticsHandler::queryHistoricalStatistics)
|
||||||
.GET("/api/datacount/export", dataStatisticsHandler::exportStatistics)
|
.GET("/api/datacount/export", dataStatisticsHandler::exportStatistics)
|
||||||
|
|
||||||
// ========================================
|
|
||||||
// ========== 支付模块路由 =================
|
|
||||||
// ========================================
|
|
||||||
|
|
||||||
// ===== 支付宝App支付 =====
|
|
||||||
.POST("/api/payment/create", paymentHandler::createPayment)
|
|
||||||
.GET("/api/payment/{orderId}", paymentHandler::getPaymentStatus)
|
|
||||||
.POST("/api/payment/{orderId}/refund", paymentHandler::refundPayment)
|
|
||||||
.POST("/api/payment/notify", paymentHandler::alipayNotify)
|
|
||||||
|
|
||||||
// ===== 支付宝扫码支付 =====
|
|
||||||
.POST("/api/payment/qrcode/create", paymentHandler::createQrCodePayment)
|
|
||||||
|
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ spring:
|
|||||||
cache:
|
cache:
|
||||||
type: none
|
type: none
|
||||||
r2dbc:
|
r2dbc:
|
||||||
url: r2dbc:postgresql://localhost:55432/manage_system
|
url: r2dbc:postgresql://localhost:5432/manage_system
|
||||||
username: novalon
|
username: postgres
|
||||||
password: novalon123
|
password: 123456
|
||||||
pool:
|
pool:
|
||||||
initial-size: 5
|
initial-size: 5
|
||||||
max-size: 20
|
max-size: 20
|
||||||
@@ -12,10 +12,10 @@ spring:
|
|||||||
max-life-time: 30m
|
max-life-time: 30m
|
||||||
acquire-timeout: 3s
|
acquire-timeout: 3s
|
||||||
flyway:
|
flyway:
|
||||||
url: jdbc:postgresql://localhost:55432/manage_system
|
url: jdbc:postgresql://localhost:5432/manage_system
|
||||||
user: novalon
|
user: postgres
|
||||||
password: novalon123
|
password: 123456
|
||||||
enabled: true
|
enabled: false
|
||||||
locations: classpath:db/migration
|
locations: classpath:db/migration
|
||||||
baseline-on-migrate: true
|
baseline-on-migrate: true
|
||||||
validate-on-migrate: false
|
validate-on-migrate: false
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ spring:
|
|||||||
password: 123456
|
password: 123456
|
||||||
driver-class-name: org.postgresql.Driver
|
driver-class-name: org.postgresql.Driver
|
||||||
flyway:
|
flyway:
|
||||||
enabled: true
|
enabled: false
|
||||||
locations: classpath:db/migration
|
locations: classpath:db/migration
|
||||||
baseline-on-migrate: true
|
baseline-on-migrate: true
|
||||||
baseline-version: 0
|
baseline-version: 0
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ spring:
|
|||||||
username: ${DB_USERNAME}
|
username: ${DB_USERNAME}
|
||||||
password: ${DB_PASSWORD}
|
password: ${DB_PASSWORD}
|
||||||
flyway:
|
flyway:
|
||||||
enabled: true
|
enabled: false
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ spring:
|
|||||||
exclude:
|
exclude:
|
||||||
- org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
|
- org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
|
||||||
r2dbc:
|
r2dbc:
|
||||||
url: r2dbc:postgresql://${DB_HOST:localhost}:${DB_PORT:55432}/${DB_NAME:manage_system}
|
url: r2dbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:manage_system}
|
||||||
username: ${DB_USERNAME:novalon}
|
username: ${DB_USERNAME:postgres}
|
||||||
password: ${DB_PASSWORD:novalon123}
|
password: ${DB_PASSWORD:123456}
|
||||||
pool:
|
pool:
|
||||||
initial-size: 10
|
initial-size: 10
|
||||||
max-size: 50
|
max-size: 50
|
||||||
@@ -25,12 +25,12 @@ spring:
|
|||||||
max-life-time: 1h
|
max-life-time: 1h
|
||||||
acquire-timeout: 5s
|
acquire-timeout: 5s
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:55432}/${DB_NAME:manage_system}
|
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:manage_system}
|
||||||
username: ${DB_USERNAME:novalon}
|
username: ${DB_USERNAME:postgres}
|
||||||
password: ${DB_PASSWORD:novalon123}
|
password: ${DB_PASSWORD:123456}
|
||||||
driver-class-name: org.postgresql.Driver
|
driver-class-name: org.postgresql.Driver
|
||||||
flyway:
|
flyway:
|
||||||
enabled: true
|
enabled: false
|
||||||
locations: classpath:db/migration
|
locations: classpath:db/migration
|
||||||
baseline-on-migrate: true
|
baseline-on-migrate: true
|
||||||
baseline-version: 0
|
baseline-version: 0
|
||||||
@@ -98,9 +98,9 @@ springdoc:
|
|||||||
alibaba:
|
alibaba:
|
||||||
cloud:
|
cloud:
|
||||||
sms:
|
sms:
|
||||||
access-key-id: ${ALIBABA_ACCESS_KEY_ID:}
|
access-key-id: LTAI5t8GhorWLu5WkEx8MDZz
|
||||||
access-key-secret: ${ALIBABA_ACCESS_KEY_SECRET:}
|
access-key-secret: jNDwb9IHvTIESUezLYHZRT5c5NEaCz
|
||||||
sign-name: ${ALIBABA_SMS_SIGN_NAME:}
|
sign-name: 云渚科技验证平台
|
||||||
template-code: ${ALIBABA_SMS_TEMPLATE_CODE:}
|
template-code: 100001
|
||||||
code-length: 6
|
code-length: 6
|
||||||
code-expire-seconds: 300
|
code-expire-seconds: 300
|
||||||
|
|||||||
Reference in New Issue
Block a user