From 724dae91b1c03a8cfebc20ab77a234309925b2eb Mon Sep 17 00:00:00 2001 From: wells <123456@qq.com> Date: Sun, 9 Aug 2026 14:59:14 +0800 Subject: [PATCH] =?UTF-8?q?yml=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../model/dto/GroupMemberOperateDTO.java | 23 ++++++ .../{application.yml => application-dev.yml} | 13 +--- src/main/resources/application-test.yml | 72 +++++++++++++++++++ 3 files changed, 98 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/tailbet/model/dto/GroupMemberOperateDTO.java rename src/main/resources/{application.yml => application-dev.yml} (84%) create mode 100644 src/main/resources/application-test.yml diff --git a/src/main/java/com/tailbet/model/dto/GroupMemberOperateDTO.java b/src/main/java/com/tailbet/model/dto/GroupMemberOperateDTO.java new file mode 100644 index 0000000..0f21cfd --- /dev/null +++ b/src/main/java/com/tailbet/model/dto/GroupMemberOperateDTO.java @@ -0,0 +1,23 @@ +package com.tailbet.model.dto; + +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +/** + * 群成员角色操作请求(设置/取消管理员) + */ +@Data +public class GroupMemberOperateDTO { + + /** + * 群ID + */ + @NotNull(message = "群ID不能为空") + private Long groupId; + + /** + * 目标用户ID + */ + @NotNull(message = "目标用户ID不能为空") + private Long userId; +} \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application-dev.yml similarity index 84% rename from src/main/resources/application.yml rename to src/main/resources/application-dev.yml index 732efe4..c9f7287 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application-dev.yml @@ -1,8 +1,6 @@ spring: application: name: guess-game - profiles: - active: dev datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/guess_game?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&characterEncoding=utf8 @@ -32,6 +30,8 @@ mybatis-plus: configuration: map-underscore-to-camel-case: true log-impl: org.apache.ibatis.logging.stdout.StdOutImpl +# log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl + global-config: db-config: id-type: auto @@ -39,13 +39,6 @@ mybatis-plus: logic-delete-value: 1 logic-not-delete-value: 0 -#openim: -## api-url: ${OPENIM_API_URL:http://172.31.5.16:10002} -# api-url: ${OPENIM_API_URL:https://openim.xiu6688.com} -# ws-url: ${OPENIM_WS_URL:wss://im.xiu6688.com} -# admin-user: ${OPENIM_ADMIN_USER:imAdmin} -# admin-token: ${OPENIM_ADMIN_TOKEN:d71c0861267DM23adg} - openim: # OpenIM REST API 外网地址(必填),下发给客户端 httpUrl apiUrl: https://openim.xiu6688.com @@ -71,7 +64,7 @@ openim: jwt: - secret: ${JWT_SECRET:your-256-bit-secret-key-for-jwt-token-generation} + secret: ${JWT_SECRET:4d19a5c2984044848df9bed721512f9f} expiration: 604800000 logging: diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml new file mode 100644 index 0000000..14ff1d9 --- /dev/null +++ b/src/main/resources/application-test.yml @@ -0,0 +1,72 @@ +spring: + application: + name: guess-game + datasource: + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://13.212.30.9:3306/guess_game?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&characterEncoding=utf8 + username: app_user + password: ${DB_PASSWORD:dhOmjPJ2321wq!.} + data: + redis: + host: ${REDIS_HOST:127.0.0.1} + port: ${REDIS_PORT:6379} + password: ${REDIS_PASSWORD:ejgheyg2@eHSY2!.} + database: ${REDIS_DB:0} + timeout: 5000ms + lettuce: + pool: + max-active: 8 + max-wait: -1ms + max-idle: 8 + min-idle: 0 + +server: + port: 9080 + +mybatis-plus: + mapper-locations: classpath:mapper/**/*.xml + type-aliases-package: com.tailbet.entity + configuration: + map-underscore-to-camel-case: true + log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl + + global-config: + db-config: + id-type: auto + logic-delete-field: deleted + logic-delete-value: 1 + logic-not-delete-value: 0 + + + +openim: + # OpenIM REST API 外网地址(必填),下发给客户端 httpUrl + apiUrl: https://openim.xiu6688.com + # OpenIM REST API 内网地址(可选),服务端调用,未配置则回落 apiUrl + internalApiUrl: http://172.31.5.16:10002 + # OpenIM WebSocket 外网地址(必填),下发给客户端用于 IM SDK 初始化 + wsUrl: wss://im.xiu6688.com + # OpenIM 管理员密钥(必填),用于获取 adminToken + secret: d71c0861267DM23adg + # OpenIM 管理员用户 ID(默认 imAdmin) + adminUserId: imAdmin + # 应用标识(默认 socialapp) + appId: socialapp + # adminToken 有效期秒数(默认 82800,即 23 小时) + tokenExpireSeconds: 82800 + # 调用 OpenIM 接口的连接超时时间毫秒(默认 5000) + connectTimeoutMs: 5000 + # 调用 OpenIM 接口的读取超时时间毫秒(默认 10000) + readTimeoutMs: 10000 + # Webhook 签名密钥(可选),用于校验 OpenIM 回调请求 + webhookSecret: your-webhook-secret + + + +jwt: + secret: ${JWT_SECRET:ecc6de473d6f4e0fbdaf5ea899fd2e26} + expiration: 604800000 + +logging: + level: + com.tailbet: info