This commit is contained in:
future
2026-06-23 22:47:35 +08:00
parent 8da58a8f51
commit 3586a7d74b
65 changed files with 2694 additions and 82 deletions
@@ -10,14 +10,13 @@ import org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDeta
import org.springframework.context.annotation.Bean;
import org.springframework.data.elasticsearch.repository.config.EnableReactiveElasticsearchRepositories;
import org.springframework.data.r2dbc.repository.config.EnableR2dbcRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.server.WebFilter;
import java.util.List;
@SpringBootApplication(scanBasePackages = "cn.novalon.gym.manage", exclude = {
ReactiveUserDetailsServiceAutoConfiguration.class })
@EnableScheduling
//@EnableScheduling
@EnableR2dbcRepositories(basePackages = {
"cn.novalon.gym.manage.db.dao",
"cn.novalon.gym.manage.sys.audit.repository" ,
@@ -4,6 +4,7 @@ package cn.novalon.gym.manage.app.config;
import cn.novalon.gym.manage.checkIn.handler.CheckInHandler;
import cn.novalon.gym.manage.datacount.handler.DataStatisticsHandler;
import cn.novalon.gym.manage.file.handler.SysFileHandler;
import cn.novalon.gym.manage.auth.handler.PhoneAuthHandler;
import cn.novalon.gym.manage.groupcourse.handler.GroupCourseBookingHandler;
import cn.novalon.gym.manage.groupcourse.handler.GroupCourseHandler;
import cn.novalon.gym.manage.groupcourse.handler.GroupCourseRecommendHandler;
@@ -76,7 +77,8 @@ public class SystemRouter {
GroupCourseTypeHandler groupCourseTypeHandler,
CourseLabelHandler courseLabelHandler,
CheckInHandler checkInHandler,
DataStatisticsHandler dataStatisticsHandler) {
DataStatisticsHandler dataStatisticsHandler,
PhoneAuthHandler phoneAuthHandler) {
return route()
// ========== 诊断路由 ==========
@@ -192,10 +194,13 @@ public class SystemRouter {
// ========== 消息路由 ==========
.GET("/api/messages/user/{userId}", messageHandler::getMessagesByUser)
.GET("/api/messages/user/{userId}/page", messageHandler::getMessagesByUserPage)
.GET("/api/messages/user/{userId}/unread", messageHandler::getUnreadCount)
.GET("/api/messages/user/{userId}/unread/list", messageHandler::getUnreadList)
.GET("/api/messages/user/{userId}/unread/page", messageHandler::getUnreadMessagesPage)
.POST("/api/messages", messageHandler::createMessage)
.PUT("/api/messages/{id}/read", messageHandler::markAsRead)
.PUT("/api/messages/user/{userId}/read", messageHandler::markAllAsRead)
.DELETE("/api/messages/{id}", messageHandler::deleteMessage)
// ========== 文件路由 ==========
@@ -218,6 +223,11 @@ public class SystemRouter {
.PUT("/api/permissions/{id}", permissionHandler::updatePermission)
.DELETE("/api/permissions/{id}", permissionHandler::deletePermission)
// ========== 手机号认证路由 ==========
.POST("/api/auth/phone/one-click-login", phoneAuthHandler::oneClickLogin)
.POST("/api/auth/phone/send-code", phoneAuthHandler::sendSmsCode)
.POST("/api/auth/phone/code-login", phoneAuthHandler::codeLogin)
// ========== 会员模块路由 - 微信认证 ==========
.POST("/api/member/auth/miniapp/login", wechatAuthHandler::miniappLogin)
.GET("/api/member/auth/mp/callback", wechatAuthHandler::verifyMpSignature)
@@ -349,6 +359,7 @@ public class SystemRouter {
.GET("/api/datacount/signin", dataStatisticsHandler::getSignInStatistics)
.GET("/api/datacount/history", dataStatisticsHandler::queryHistoricalStatistics)
.GET("/api/datacount/export", dataStatisticsHandler::exportStatistics)
.build();
}
}
@@ -2,9 +2,9 @@ spring:
cache:
type: none
r2dbc:
url: r2dbc:postgresql://localhost:55432/manage_system
username: novalon
password: novalon123
url: r2dbc:postgresql://localhost:5432/manage_system
username: postgres
password: 123456
pool:
initial-size: 5
max-size: 20
@@ -12,10 +12,10 @@ spring:
max-life-time: 30m
acquire-timeout: 3s
flyway:
url: jdbc:postgresql://localhost:55432/manage_system
user: novalon
password: novalon123
enabled: true
url: jdbc:postgresql://localhost:5432/manage_system
user: postgres
password: 123456
enabled: false
locations: classpath:db/migration
baseline-on-migrate: true
validate-on-migrate: true
@@ -4,8 +4,8 @@ spring:
activate:
on-profile: local
r2dbc:
url: r2dbc:postgresql://localhost:55432/manage_system
username: novalon
url: r2dbc:postgresql://localhost:5432/manage_system
username: postgres
password: 123456
pool:
initial-size: 5
@@ -14,8 +14,8 @@ spring:
max-life-time: 30m
acquire-timeout: 3s
datasource:
url: jdbc:postgresql://localhost:55432/manage_system
username: novalon
url: jdbc:postgresql://localhost:5432/manage_system
username: postgres
password: 123456
driver-class-name: org.postgresql.Driver
flyway:
@@ -5,9 +5,9 @@ spring:
application:
name: manage-app
r2dbc:
url: r2dbc:postgresql://localhost:55432/manage_system
username: novalon
password: novalon123
url: r2dbc:postgresql://localhost:5432/manage_system
username: postgres
password: 123456
pool:
initial-size: 5
max-size: 20
@@ -15,9 +15,9 @@ spring:
exclude:
- org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration
r2dbc:
url: r2dbc:postgresql://${DB_HOST:localhost}:${DB_PORT:55432}/${DB_NAME:manage_system}
username: ${DB_USERNAME:novalon}
password: ${DB_PASSWORD:novalon123}
url: r2dbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:manage_system}
username: ${DB_USERNAME:postgres}
password: ${DB_PASSWORD:123456}
pool:
initial-size: 10
max-size: 50
@@ -25,12 +25,12 @@ spring:
max-life-time: 1h
acquire-timeout: 5s
datasource:
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:55432}/${DB_NAME:manage_system}
username: ${DB_USERNAME:novalon}
password: ${DB_PASSWORD:novalon123}
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:manage_system}
username: ${DB_USERNAME:postgres}
password: ${DB_PASSWORD:123456}
driver-class-name: org.postgresql.Driver
flyway:
enabled: true
enabled: false
locations: classpath:db/migration
baseline-on-migrate: true
baseline-version: 0
@@ -54,7 +54,7 @@ spring:
profiles:
active: dev
config:
import: classpath:member-config.yml
import: classpath:keys.properties,classpath:member-config.yml
@@ -94,3 +94,13 @@ springdoc:
show-actuator: false
default-consumes-media-type: application/json
default-produces-media-type: application/json
alibaba:
cloud:
sms:
access-key-id: ${ALIBABA_ACCESS_KEY_ID:}
access-key-secret: ${ALIBABA_ACCESS_KEY_SECRET:}
sign-name: ${ALIBABA_SMS_SIGN_NAME:}
template-code: ${ALIBABA_SMS_TEMPLATE_CODE:}
code-length: 6
code-expire-seconds: 300
@@ -0,0 +1,2 @@
huifu.private-key=MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCNUdQE59I4bV1dIgLs2IRN3Wl8KI2yS4KpTUQWrvvlUcBTztB8rIeN5lr6Yv4VsZ1TG0FAb0D80JjxEQ1+0HizYNOQ1h2935v2r8h7rx3VTLbMOkmsg8Lb8LQRTbPaJOZfsIZMzBytYiRzWunHaMlCr800EA3q5NMj9VjHQuamxKqyzyHqfkIjA/sZ8q9atVjn8ahUjPKdrGA8b79HexHhCgOSLdK+fWw0eMCsWWYP2qECLsvZ+tjfvqSBXx1kg7womwT1VBCf+0Dx+jJPKR3mxQfz2szoucJYuXRo55kA6yCwoeNsjanLDRkPBSy3NHdKrffP6YODhRHG6KHyayyNAgMBAAECggEATIR69TEETVNCEzRgOxe9A2AYRoa6ukhSdhMFA/c5IuCR747yqh7MwtNwfVRuWRazpZUDTr0uhfT4asad9QUx5YZO54RX1EAn9XkWZ4nY8G46J/iDfapWLrp09U2KTVpfdn5hKWH3QRX7wI4AON2O49HGnSL4NjAx9q1YpYOe2bqevxmB4uD9vR/FHMjZ2qWzPaL7pId98x4DCJCiZctBQqb7gxR8EseD1Ddn2HbH5DEUjoxz2umtL+zrcGKDFBy4kM3r+10FP5jFG4fJfZFQwrzMTEkXJriau9DMRTQ83rWHzNvhdTNUuyqah74ez5V1piVEOXCPudzFsMttD2DyzQKBgQDokQH3WtcQqwFTUo+uWVVup4NoQzNZpEGIHK17afRsf9YnkoJVqjhywq1dhQT+yuyW9geJJKWpHQIAS4gGudhNK+j6d//bbvvbkOmtsdWyZ6Z2EmY8JrPkHdHAcadNJX7vrIc1xPeyci4AHhErDHc3hhD5njuSLx3DUp4iODNxKwKBgQCbjyHvP90YGjh49DWklh2NJgR2+OR6Fd0afd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
elasticsearch:
uris: http://localhost:9200
uris: http://localhost:9200
payment:
huifu:
sys-id: "6666000207573586"
product-id: "XLSISV"
huifu-id: "6666000207573586"
acct-id: "F28226571"
private-key: ${huifu.private-key}
public-key: ${huifu.public-key}
create-url: "https://api.huifu.com/v4/trade/payment/create"
query-url: "https://api.huifu.com/v4/trade/payment/query"
refund-url: "https://api.huifu.com/v4/trade/refund"
notify-url: "http://localhost:8084/api/payment/notify"