diff --git a/CursorDevelopPrompt.md b/CursorDevelopPrompt.md
new file mode 100644
index 0000000..57f8db8
--- /dev/null
+++ b/CursorDevelopPrompt.md
@@ -0,0 +1,83 @@
+你是一个专业的 iOS SwiftUI 开发助手,任务是基于 Figma 原型图自动生成 SwiftUI 页面代码,要求如下:
+
+[参数]
+- Figma 页面名称: 登录界面
+- Swift 页面名称: LoginView
+
+[开发规范]
+1. **目录结构**
+ - 在 `Views/LoginView/` 下创建:
+ - `LoginView.swift`(SwiftUI 页面)
+ - `LoginViewModel.swift`(如有业务逻辑)
+ - 所有通用组件(DesignSystem、Scale、FigmaRenderer、FigmaLoader)放在 `Shared/` 文件夹,仅创建一次,后续页面共用。
+
+2. **UI 渲染要求**
+ - 使用 MCP (Talk-To-Figma) 获取 Figma 节点 JSON 数据并渲染 UI。
+ - 遵循 Figma 布局顺序(背景 → 图片 → 文本 → 按钮)。
+ - 必须自适配所有 iPhone 屏幕,使用 `GeometryReader` + 缩放工具。
+ - 字体、颜色、圆角、阴影、间距等严格跟随 Figma。
+ - 所有图片用 `Image("ResourceName")`,并加 `.resizable().aspectRatio(contentMode: .fit)`。
+
+3. **命名规则**
+ - Swift 文件、类名、结构体名:`PascalCase`,如 `LoginView`。
+ - 所有图片/图标文件名:`PascalCase`(每个单词首字母大写,不允许 `_` 或 `-`)。
+ - 资源文件夹路径:
+ ```
+ Assets.xcassets/LoginView{{ImageName}}.imageset/{{ImageName}}.svg
+ ```
+ 例如:
+ ```
+ Assets.xcassets/LoginViewInitialHero.imageset/InitialHero.svg
+ ```
+
+4. **静态资源处理(SVG 专用)**
+ - 所有图片/图标资源来自 Figma,格式为 SVG。
+ - 每个 `.imageset` 文件夹包含:
+ - `ImageName.svg`
+ - `Contents.json` 内容如下:
+ ```json
+ {
+ "images": [
+ {
+ "filename": "ImageName.svg",
+ "idiom": "universal"
+ }
+ ],
+ "info": {
+ "version": 1,
+ "author": "xcode"
+ },
+ "properties": {
+ "preserves-vector-representation": true,
+ "template-rendering-intent": "original"
+ }
+ }
+ ```
+ - 不需要 `@1x/@2x/@3x`,只保留一份 SVG。
+ - 如果资源缺失,在代码中加 `// TODO: 补充 ImageName.svg 到 Assets.xcassets/LoginView{{ImageName}}.imageset/`。
+ - 输出末尾列出所有缺失图片清单,格式:
+ ```
+ [资源清单]
+ - ImageName.svg → Assets.xcassets/LoginView{{ImageName}}.imageset/ImageName.svg
+ ```
+
+5. **代码生成要求**
+ - 使用 SwiftUI,代码必须可运行。
+ - 如果页面已有旧代码,执行**重构**,保持代码整洁。
+ - 每个 Swift 文件顶部添加注释,说明页面来源(Figma 页面名称)和生成时间。
+
+6. **图片命名优化**
+ - 所有 Figma 元素名(如 `btn_login`, `icon-home`)自动转换为 PascalCase(`BtnLogin`,`IconHome`)。
+ - 代码中的 `Image("BtnLogin")` 必须与资源文件夹一致。
+
+7. **最终输出**
+ - 生成 `LoginView.swift`(完整 SwiftUI 页面实现)。
+ - 列出缺失的 SVG 资源清单。
+ - 自动创建 `.imageset` 路径和 `Contents.json` 模板。
+ - 确保比例缩放和 UI 细节与 Figma 一致。
+
+[任务]
+根据以上规范,将 Figma 页面 **登录界面** 转换为 SwiftUI 页面 **LoginView**,并输出:
+- 完整的 `LoginView.swift` 代码
+- 缺失的 SVG 资源清单
+- `.imageset` 文件夹和 `Contents.json` 模板示例
diff --git a/backend/admin/api/pom.xml b/backend/admin/api/pom.xml
new file mode 100644
index 0000000..9f5b02a
--- /dev/null
+++ b/backend/admin/api/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ admin
+ 1.0.0
+ ../pom.xml
+
+ admin-api
+ admin-api
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
diff --git a/backend/admin/pom.xml b/backend/admin/pom.xml
new file mode 100644
index 0000000..01c2418
--- /dev/null
+++ b/backend/admin/pom.xml
@@ -0,0 +1,18 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ backend
+ 1.0.0
+ ../pom.xml
+
+ admin
+ pom
+
+ api
+ server
+
+
diff --git a/backend/admin/server/pom.xml b/backend/admin/server/pom.xml
new file mode 100644
index 0000000..39eb748
--- /dev/null
+++ b/backend/admin/server/pom.xml
@@ -0,0 +1,38 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ admin
+ 1.0.0
+ ../pom.xml
+
+ admin-server
+ admin
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot.version}
+
+
+
+
diff --git a/backend/ai/api/pom.xml b/backend/ai/api/pom.xml
new file mode 100644
index 0000000..585bda1
--- /dev/null
+++ b/backend/ai/api/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ ai
+ 1.0.0
+ ../pom.xml
+
+ ai-api
+ ai-api
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
diff --git a/backend/ai/api/src/main/java/com/emotionmuseum/ai/api/client/AiClient.java b/backend/ai/api/src/main/java/com/emotionmuseum/ai/api/client/AiClient.java
new file mode 100644
index 0000000..d728c30
--- /dev/null
+++ b/backend/ai/api/src/main/java/com/emotionmuseum/ai/api/client/AiClient.java
@@ -0,0 +1,14 @@
+package com.emotionmuseum.ai.api.client;
+
+import com.emotionmuseum.common.result.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@FeignClient(name = "ai")
+public interface AiClient {
+
+ @GetMapping("/api/ai/chat/health")
+ Result health();
+}
+
+
diff --git a/backend/ai/pom.xml b/backend/ai/pom.xml
index 62bf504..d80c0a2 100644
--- a/backend/ai/pom.xml
+++ b/backend/ai/pom.xml
@@ -3,110 +3,16 @@
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">
4.0.0
-
com.emotionmuseum
backend
1.0.0
+ ../pom.xml
-
- emotion-ai
- emotion-ai
- AI对话服务
-
-
-
-
- com.emotionmuseum
- emotion-common
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-bootstrap
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
- org.springframework.boot
- spring-boot-devtools
- runtime
- true
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-openfeign
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-starter-webflux
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
- io.micrometer
- micrometer-registry-prometheus
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${spring-boot.version}
-
- com.emotionmuseum.ai.AiApplication
-
-
-
-
- repackage
-
-
-
-
-
-
+ ai
+ pom
+
+ api
+ server
+
\ No newline at end of file
diff --git a/backend/ai/server/pom.xml b/backend/ai/server/pom.xml
new file mode 100644
index 0000000..421f09c
--- /dev/null
+++ b/backend/ai/server/pom.xml
@@ -0,0 +1,65 @@
+
+
+ 4.0.0
+
+
+ com.emotionmuseum
+ ai
+ 1.0.0
+
+
+ ai-server
+ ai
+ AI对话服务
+
+
+
+ com.emotionmuseum
+ ai-api
+ ${project.version}
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ org.springframework.boot
+ spring-boot-starter-webflux
+
+
+ mysql
+ mysql-connector-java
+
+
+ com.alibaba
+ druid-spring-boot-starter
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ io.micrometer
+ micrometer-registry-prometheus
+
+
+
\ No newline at end of file
diff --git a/backend/ai/server/src/main/java/com/emotionmuseum/ai/controller/AiChatController.java b/backend/ai/server/src/main/java/com/emotionmuseum/ai/controller/AiChatController.java
index e739abe..5b8fc12 100644
--- a/backend/ai/server/src/main/java/com/emotionmuseum/ai/controller/AiChatController.java
+++ b/backend/ai/server/src/main/java/com/emotionmuseum/ai/controller/AiChatController.java
@@ -4,7 +4,12 @@ import com.emotionmuseum.ai.request.*;
import com.emotionmuseum.ai.response.*;
import com.emotionmuseum.ai.service.AiChatService;
import com.emotionmuseum.ai.service.ConversationDbService;
+import com.emotionmuseum.ai.entity.Conversation;
+import com.emotionmuseum.ai.entity.Message;
+import com.emotionmuseum.ai.dto.ChatRequest;
+import com.emotionmuseum.ai.dto.ChatResponse;
import com.emotionmuseum.common.response.BasePageResponse;
+import com.emotionmuseum.common.dto.PageQuery;
import com.emotionmuseum.common.result.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
@@ -15,6 +20,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import jakarta.validation.Valid;
+import java.util.List;
/**
* AI聊天控制器
@@ -35,32 +41,34 @@ public class AiChatController {
@Operation(summary = "创建会话")
@PostMapping("/conversation/create")
- public Result createConversation(
- @Valid @RequestBody CreateConversationRequest request) {
+ public Result createConversation(
+ @Valid @RequestBody com.emotionmuseum.ai.dto.CreateConversationRequest request) {
log.info("收到创建会话请求: userId={}, title={}", request.getUserId(), request.getTitle());
- CreateConversationResponse response = aiChatService.createConversation(request);
+ com.emotionmuseum.ai.dto.CreateConversationResponse response = aiChatService.createConversation(request);
return Result.success(response);
}
@Operation(summary = "发送聊天消息")
@PostMapping("/send")
- public Result sendMessage(@Valid @RequestBody AiChatRequest request) {
+ public Result sendMessage(
+ @Valid @RequestBody com.emotionmuseum.ai.dto.ChatRequest request) {
log.info("收到聊天请求: userId={}, message={}", request.getUserId(), request.getMessage());
- AiChatResponse response = aiChatService.chat(request);
+ com.emotionmuseum.ai.dto.ChatResponse response = aiChatService.chat(request);
return Result.success(response);
}
@Operation(summary = "情绪分析")
@PostMapping("/emotion/analyze")
- public Result analyzeEmotion(@Valid @RequestBody EmotionAnalysisRequest request) {
+ public Result analyzeEmotion(
+ @Valid @RequestBody com.emotionmuseum.ai.dto.EmotionAnalysisRequest request) {
log.info("收到情绪分析请求: userId={}, text={}", request.getUserId(), request.getText());
- EmotionAnalysisResponse response = aiChatService.analyzeEmotion(request);
+ com.emotionmuseum.ai.dto.EmotionAnalysisResponse response = aiChatService.analyzeEmotion(request);
return Result.success(response);
}
@Operation(summary = "流式聊天")
@PostMapping("/stream")
- public Result streamChat(@Valid @RequestBody AiChatRequest request) {
+ public Result streamChat(@Valid @RequestBody com.emotionmuseum.ai.dto.ChatRequest request) {
log.info("收到流式聊天请求: userId={}", request.getUserId());
String response = aiChatService.streamChat(request);
return Result.success(response);
@@ -181,10 +189,11 @@ public class AiChatController {
"这是第三段回复,介绍了情感分析功能。我可以分析你的情绪状态并提供建议。";
// 创建或获取会话
- CreateConversationRequest convRequest = new CreateConversationRequest();
+ com.emotionmuseum.ai.dto.CreateConversationRequest convRequest = new com.emotionmuseum.ai.dto.CreateConversationRequest();
convRequest.setUserId(request.getUserId());
convRequest.setTitle("测试拆分消息");
- CreateConversationResponse conversation = aiChatService.createConversation(convRequest);
+ com.emotionmuseum.ai.dto.CreateConversationResponse conversation = aiChatService
+ .createConversation(convRequest);
// 保存用户消息
Message userMessage = new Message();
diff --git a/backend/ai/server/src/main/java/com/emotionmuseum/ai/controller/GuestChatController.java b/backend/ai/server/src/main/java/com/emotionmuseum/ai/controller/GuestChatController.java
index 04986d7..05435f3 100644
--- a/backend/ai/server/src/main/java/com/emotionmuseum/ai/controller/GuestChatController.java
+++ b/backend/ai/server/src/main/java/com/emotionmuseum/ai/controller/GuestChatController.java
@@ -2,6 +2,8 @@ package com.emotionmuseum.ai.controller;
import com.emotionmuseum.ai.request.*;
import com.emotionmuseum.ai.response.*;
+import com.emotionmuseum.ai.dto.MessageListResponse;
+import com.emotionmuseum.ai.dto.GuestUserInfo;
import com.emotionmuseum.ai.service.GuestChatService;
import com.emotionmuseum.common.result.Result;
import io.swagger.v3.oas.annotations.Operation;
@@ -33,7 +35,8 @@ public class GuestChatController {
@PostMapping("/chat")
@Operation(summary = "访客聊天", description = "访客模式下发送消息并获取AI回复")
- public Result guestChat(@RequestBody GuestChatRequest request) {
+ public Result guestChat(
+ @RequestBody com.emotionmuseum.ai.dto.GuestChatRequest request) {
// 自动获取客户端IP和User-Agent
String clientIp = getClientIp();
@@ -56,7 +59,7 @@ public class GuestChatController {
String clientIp = getClientIp();
log.info("获取访客会话列表: IP={}", clientIp);
- return guestChatService.getGuestConversations(clientIp, pageNum, pageSize);
+ return (Result) guestChatService.getGuestConversations(clientIp, pageNum, pageSize);
}
@GetMapping("/conversation/{conversationId}/messages")
@@ -96,8 +99,8 @@ public class GuestChatController {
@PostMapping("/emotion/analyze")
@Operation(summary = "访客情绪分析", description = "分析访客输入文本的情绪")
- public Result analyzeGuestEmotion(
- @RequestBody EmotionAnalysisRequest request) {
+ public Result analyzeGuestEmotion(
+ @RequestBody com.emotionmuseum.ai.dto.EmotionAnalysisRequest request) {
String clientIp = getClientIp();
log.info("访客情绪分析: IP={}, Text={}", clientIp, request.getText());
@@ -113,7 +116,8 @@ public class GuestChatController {
@PostMapping("/test/split")
@Operation(summary = "测试消息拆分功能", description = "测试AI回复消息的拆分功能")
- public Result testMessageSplit(@RequestBody GuestChatRequest request) {
+ public Result testMessageSplit(
+ @RequestBody com.emotionmuseum.ai.dto.GuestChatRequest request) {
log.info("测试消息拆分功能: message={}", request.getMessage());
// 模拟包含不同换行符的AI回复进行测试
@@ -132,7 +136,7 @@ public class GuestChatController {
}
// 创建模拟的访客聊天响应
- GuestChatResponse response = new GuestChatResponse();
+ com.emotionmuseum.ai.dto.GuestChatResponse response = new com.emotionmuseum.ai.dto.GuestChatResponse();
response.setGuestUserId("test_guest_user");
response.setGuestNickname("测试用户");
response.setConversationId("test_conversation_" + System.currentTimeMillis());
diff --git a/backend/auth/api/pom.xml b/backend/auth/api/pom.xml
new file mode 100644
index 0000000..77cd614
--- /dev/null
+++ b/backend/auth/api/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ auth
+ 1.0.0
+ ../pom.xml
+
+ auth-api
+ auth-api
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
diff --git a/backend/auth/api/src/main/java/com/emotionmuseum/auth/api/client/AuthClient.java b/backend/auth/api/src/main/java/com/emotionmuseum/auth/api/client/AuthClient.java
new file mode 100644
index 0000000..403047d
--- /dev/null
+++ b/backend/auth/api/src/main/java/com/emotionmuseum/auth/api/client/AuthClient.java
@@ -0,0 +1,14 @@
+package com.emotionmuseum.auth.api.client;
+
+import com.emotionmuseum.common.result.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@FeignClient(name = "auth")
+public interface AuthClient {
+
+ @GetMapping("/auth/health")
+ Result health();
+}
+
+
diff --git a/backend/auth/pom.xml b/backend/auth/pom.xml
index da0dd72..ff0e290 100644
--- a/backend/auth/pom.xml
+++ b/backend/auth/pom.xml
@@ -3,142 +3,16 @@
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">
4.0.0
-
com.emotionmuseum
backend
1.0.0
../pom.xml
-
- emotion-auth
- emotion-auth
- 情感博物馆认证授权服务
-
-
-
-
- com.emotionmuseum
- emotion-common
- 1.0.0
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-jpa
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- mysql
- mysql-connector-java
- runtime
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
-
-
-
-
- io.jsonwebtoken
- jjwt-api
-
-
-
- io.jsonwebtoken
- jjwt-impl
-
-
-
- io.jsonwebtoken
- jjwt-jackson
-
-
-
-
- me.zhyd.oauth
- JustAuth
- 1.16.5
-
-
-
-
- com.github.whvcse
- easy-captcha
- 1.6.2
-
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
-
- org.springframework.security
- spring-security-test
- test
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${spring-boot.version}
-
- com.emotionmuseum.auth.AuthApplication
-
-
-
-
- repackage
-
-
-
-
-
-
+ auth
+ pom
+
+ api
+ server
+
diff --git a/backend/auth/server/pom.xml b/backend/auth/server/pom.xml
new file mode 100644
index 0000000..f207db6
--- /dev/null
+++ b/backend/auth/server/pom.xml
@@ -0,0 +1,145 @@
+
+
+ 4.0.0
+
+
+ com.emotionmuseum
+ auth
+ 1.0.0
+ ../pom.xml
+
+
+ auth-server
+ auth
+ 情感博物馆认证授权服务
+
+
+
+ com.emotionmuseum
+ auth-api
+ ${project.version}
+
+
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+
+
+ mysql
+ mysql-connector-java
+ runtime
+
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+
+
+ io.jsonwebtoken
+ jjwt-api
+
+
+ io.jsonwebtoken
+ jjwt-impl
+
+
+ io.jsonwebtoken
+ jjwt-jackson
+
+
+
+
+ me.zhyd.oauth
+ JustAuth
+ 1.16.5
+
+
+
+
+ com.github.whvcse
+ easy-captcha
+ 1.6.2
+
+
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.springframework.security
+ spring-security-test
+ test
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot.version}
+
+ com.emotionmuseum.auth.AuthApplication
+
+
+
+
+ repackage
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/backend/auth/server/src/main/java/com/emotionmuseum/auth/response/LoginResponse.java b/backend/auth/server/src/main/java/com/emotionmuseum/auth/response/LoginResponse.java
index 4502861..776418d 100644
--- a/backend/auth/server/src/main/java/com/emotionmuseum/auth/response/LoginResponse.java
+++ b/backend/auth/server/src/main/java/com/emotionmuseum/auth/response/LoginResponse.java
@@ -39,39 +39,4 @@ public class LoginResponse extends BaseResponse {
@Schema(description = "登录时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime loginTime;
-
- /**
- * 用户信息响应
- */
- @Data
- @Schema(description = "用户信息响应")
- public static class UserInfoResponse {
- @Schema(description = "用户ID")
- private String userId;
-
- @Schema(description = "账号")
- private String account;
-
- @Schema(description = "用户名")
- private String username;
-
- @Schema(description = "昵称")
- private String nickname;
-
- @Schema(description = "邮箱")
- private String email;
-
- @Schema(description = "手机号")
- private String phone;
-
- @Schema(description = "头像URL")
- private String avatar;
-
- @Schema(description = "用户状态")
- private String status;
-
- @Schema(description = "最后登录时间")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private LocalDateTime lastLoginTime;
- }
}
diff --git a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/AuthService.java b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/AuthService.java
index b74e8fc..00dc32a 100644
--- a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/AuthService.java
+++ b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/AuthService.java
@@ -1,9 +1,9 @@
package com.emotionmuseum.auth.service;
-import com.emotionmuseum.auth.dto.LoginRequest;
-import com.emotionmuseum.auth.dto.RegisterRequest;
-import com.emotionmuseum.auth.vo.LoginResponse;
-import com.emotionmuseum.auth.vo.UserInfoResponse;
+import com.emotionmuseum.auth.request.LoginRequest;
+import com.emotionmuseum.auth.request.RegisterRequest;
+import com.emotionmuseum.auth.response.LoginResponse;
+import com.emotionmuseum.auth.response.UserInfoResponse;
/**
* 认证服务接口
diff --git a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/CaptchaService.java b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/CaptchaService.java
index f982dde..2a12407 100644
--- a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/CaptchaService.java
+++ b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/CaptchaService.java
@@ -1,6 +1,6 @@
package com.emotionmuseum.auth.service;
-import com.emotionmuseum.auth.dto.CaptchaResponse;
+import com.emotionmuseum.auth.response.CaptchaResponse;
/**
* 验证码服务接口
diff --git a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/SliderCaptchaService.java b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/SliderCaptchaService.java
index f278538..ccf9498 100644
--- a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/SliderCaptchaService.java
+++ b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/SliderCaptchaService.java
@@ -1,7 +1,7 @@
package com.emotionmuseum.auth.service;
-import com.emotionmuseum.auth.dto.SliderCaptchaResponse;
-import com.emotionmuseum.auth.dto.SliderCaptchaVerifyRequest;
+import com.emotionmuseum.auth.response.SliderCaptchaResponse;
+import com.emotionmuseum.auth.request.SliderCaptchaVerifyRequest;
/**
* 滑块验证码服务接口
diff --git a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/AuthServiceImpl.java b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/AuthServiceImpl.java
index 31ad716..633f4c7 100644
--- a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/AuthServiceImpl.java
+++ b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/AuthServiceImpl.java
@@ -4,14 +4,14 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.emotionmuseum.common.result.ResultCode;
import com.emotionmuseum.common.util.JwtUtil;
-import com.emotionmuseum.auth.dto.LoginRequest;
-import com.emotionmuseum.auth.dto.RegisterRequest;
+import com.emotionmuseum.auth.request.LoginRequest;
+import com.emotionmuseum.auth.request.RegisterRequest;
import com.emotionmuseum.auth.entity.User;
import com.emotionmuseum.auth.mapper.UserMapper;
import com.emotionmuseum.auth.service.AuthService;
import com.emotionmuseum.auth.service.CaptchaService;
-import com.emotionmuseum.auth.vo.LoginResponse;
-import com.emotionmuseum.auth.vo.UserInfoResponse;
+import com.emotionmuseum.auth.response.LoginResponse;
+import com.emotionmuseum.auth.response.UserInfoResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
diff --git a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/CaptchaServiceImpl.java b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/CaptchaServiceImpl.java
index ad473cd..3fe9ddd 100644
--- a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/CaptchaServiceImpl.java
+++ b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/CaptchaServiceImpl.java
@@ -2,9 +2,9 @@ package com.emotionmuseum.auth.service.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
-import com.emotionmuseum.auth.dto.CaptchaResponse;
-import com.emotionmuseum.auth.dto.SliderCaptchaResponse;
-import com.emotionmuseum.auth.dto.SliderCaptchaVerifyRequest;
+import com.emotionmuseum.auth.response.CaptchaResponse;
+import com.emotionmuseum.auth.response.SliderCaptchaResponse;
+import com.emotionmuseum.auth.request.SliderCaptchaVerifyRequest;
import com.emotionmuseum.auth.service.CaptchaService;
import com.emotionmuseum.auth.service.SliderCaptchaService;
import com.wf.captcha.base.Captcha;
diff --git a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/SliderCaptchaServiceImpl.java b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/SliderCaptchaServiceImpl.java
index 270f85a..428cd50 100644
--- a/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/SliderCaptchaServiceImpl.java
+++ b/backend/auth/server/src/main/java/com/emotionmuseum/auth/service/impl/SliderCaptchaServiceImpl.java
@@ -2,8 +2,8 @@ package com.emotionmuseum.auth.service.impl;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
-import com.emotionmuseum.auth.dto.SliderCaptchaResponse;
-import com.emotionmuseum.auth.dto.SliderCaptchaVerifyRequest;
+import com.emotionmuseum.auth.response.SliderCaptchaResponse;
+import com.emotionmuseum.auth.request.SliderCaptchaVerifyRequest;
import com.emotionmuseum.auth.service.SliderCaptchaService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
diff --git a/backend/common/pom.xml b/backend/common/pom.xml
index 9f672f7..c5c9cde 100644
--- a/backend/common/pom.xml
+++ b/backend/common/pom.xml
@@ -11,8 +11,8 @@
1.0.0
- emotion-common
- emotion-common
+ common
+ common
公共模块
@@ -21,32 +21,32 @@
org.springframework.boot
spring-boot-starter-web
-
+
org.springframework.boot
spring-boot-starter-validation
-
+
com.baomidou
mybatis-plus-boot-starter
-
+
org.springframework.boot
spring-boot-starter-data-redis
-
+
org.projectlombok
lombok
true
-
+
cn.hutool
@@ -57,7 +57,7 @@
com.alibaba.fastjson2
fastjson2
-
+
io.jsonwebtoken
@@ -73,7 +73,7 @@
io.jsonwebtoken
jjwt-jackson
-
+
com.github.xiaoymin
diff --git a/backend/common/src/main/java/com/emotionmuseum/common/response/BasePageResponse.java b/backend/common/src/main/java/com/emotionmuseum/common/response/BasePageResponse.java
index c91cf56..3ec6d04 100644
--- a/backend/common/src/main/java/com/emotionmuseum/common/response/BasePageResponse.java
+++ b/backend/common/src/main/java/com/emotionmuseum/common/response/BasePageResponse.java
@@ -73,8 +73,8 @@ public class BasePageResponse extends BaseResponse {
this.total = page.getTotal();
this.pages = page.getPages();
this.records = page.getRecords();
- this.hasNext = page.hasNext();
- this.hasPrevious = page.hasPrevious();
+ this.hasNext = this.current != null && this.pages != null && this.current < this.pages;
+ this.hasPrevious = this.current != null && this.current > 1;
}
/**
diff --git a/backend/explore/api/pom.xml b/backend/explore/api/pom.xml
new file mode 100644
index 0000000..18b6592
--- /dev/null
+++ b/backend/explore/api/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ explore
+ 1.0.0
+ ../pom.xml
+
+ explore-api
+ explore-api
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
diff --git a/backend/explore/api/src/main/java/com/emotionmuseum/explore/api/client/ExploreClient.java b/backend/explore/api/src/main/java/com/emotionmuseum/explore/api/client/ExploreClient.java
new file mode 100644
index 0000000..78a3333
--- /dev/null
+++ b/backend/explore/api/src/main/java/com/emotionmuseum/explore/api/client/ExploreClient.java
@@ -0,0 +1,14 @@
+package com.emotionmuseum.explore.api.client;
+
+import com.emotionmuseum.common.result.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@FeignClient(name = "explore")
+public interface ExploreClient {
+
+ @GetMapping("/explore/health")
+ Result health();
+}
+
+
diff --git a/backend/explore/pom.xml b/backend/explore/pom.xml
index 915e276..5f3592e 100644
--- a/backend/explore/pom.xml
+++ b/backend/explore/pom.xml
@@ -1,119 +1,18 @@
+ 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">
4.0.0
-
com.emotionmuseum
backend
1.0.0
+ ../pom.xml
-
- emotion-explore
- emotion-explore
- 地图探索服务
-
-
-
-
- com.emotionmuseum
- emotion-common
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-bootstrap
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
- org.springframework.boot
- spring-boot-devtools
- runtime
- true
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-validation
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- org.projectlombok
- lombok
- true
-
-
-
-
- cn.hutool
- hutool-all
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
- com.github.xiaoymin
- knife4j-openapi3-spring-boot-starter
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
+ explore
+ pom
+
+ api
+ server
+
diff --git a/backend/explore/server/pom.xml b/backend/explore/server/pom.xml
new file mode 100644
index 0000000..7eeeb93
--- /dev/null
+++ b/backend/explore/server/pom.xml
@@ -0,0 +1,65 @@
+
+
+ 4.0.0
+
+
+ com.emotionmuseum
+ explore
+ 1.0.0
+
+
+ explore-server
+ explore
+ 地图探索服务
+
+
+
+ com.emotionmuseum
+ explore-api
+ ${project.version}
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+ mysql
+ mysql-connector-java
+
+
+ com.alibaba
+ druid-spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
\ No newline at end of file
diff --git a/backend/gateway/pom.xml b/backend/gateway/pom.xml
index 1781eb2..b668c7f 100644
--- a/backend/gateway/pom.xml
+++ b/backend/gateway/pom.xml
@@ -11,15 +11,15 @@
1.0.0
- emotion-gateway
- emotion-gateway
+ gateway
+ gateway
API网关服务
com.emotionmuseum
- emotion-common
+ common
org.springframework.boot
diff --git a/backend/growth/api/pom.xml b/backend/growth/api/pom.xml
new file mode 100644
index 0000000..d25fd96
--- /dev/null
+++ b/backend/growth/api/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ growth
+ 1.0.0
+ ../pom.xml
+
+ growth-api
+ growth-api
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
diff --git a/backend/growth/api/src/main/java/com/emotionmuseum/growth/api/client/GrowthClient.java b/backend/growth/api/src/main/java/com/emotionmuseum/growth/api/client/GrowthClient.java
new file mode 100644
index 0000000..4cd8752
--- /dev/null
+++ b/backend/growth/api/src/main/java/com/emotionmuseum/growth/api/client/GrowthClient.java
@@ -0,0 +1,14 @@
+package com.emotionmuseum.growth.api.client;
+
+import com.emotionmuseum.common.result.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@FeignClient(name = "growth")
+public interface GrowthClient {
+
+ @GetMapping("/growth/health")
+ Result health();
+}
+
+
diff --git a/backend/growth/pom.xml b/backend/growth/pom.xml
index abfcbdf..f358116 100644
--- a/backend/growth/pom.xml
+++ b/backend/growth/pom.xml
@@ -1,119 +1,18 @@
+ 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">
4.0.0
-
com.emotionmuseum
backend
1.0.0
+ ../pom.xml
-
- emotion-growth
- emotion-growth
- 成长课题服务
-
-
-
-
- com.emotionmuseum
- emotion-common
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-bootstrap
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
- org.springframework.boot
- spring-boot-devtools
- runtime
- true
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-validation
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- org.projectlombok
- lombok
- true
-
-
-
-
- cn.hutool
- hutool-all
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
- com.github.xiaoymin
- knife4j-openapi3-spring-boot-starter
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
+ growth
+ pom
+
+ api
+ server
+
diff --git a/backend/growth/server/pom.xml b/backend/growth/server/pom.xml
new file mode 100644
index 0000000..9d54648
--- /dev/null
+++ b/backend/growth/server/pom.xml
@@ -0,0 +1,65 @@
+
+
+ 4.0.0
+
+
+ com.emotionmuseum
+ growth
+ 1.0.0
+
+
+ growth-server
+ growth
+ 成长课题服务
+
+
+
+ com.emotionmuseum
+ growth-api
+ ${project.version}
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+ mysql
+ mysql-connector-java
+
+
+ com.alibaba
+ druid-spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
\ No newline at end of file
diff --git a/backend/pom.xml b/backend/pom.xml
index e90d076..013816b 100644
--- a/backend/pom.xml
+++ b/backend/pom.xml
@@ -13,17 +13,18 @@
- emotion-common
- emotion-auth
- emotion-gateway
- emotion-user
- emotion-ai
- emotion-websocket
- emotion-record
- emotion-growth
- emotion-explore
- emotion-reward
- emotion-stats
+ common
+ gateway
+ auth
+ user
+ ai
+ websocket
+ record
+ growth
+ explore
+ reward
+ stats
+ admin
@@ -197,7 +198,7 @@
com.emotionmuseum
- emotion-common
+ common
${project.version}
diff --git a/backend/record/api/pom.xml b/backend/record/api/pom.xml
new file mode 100644
index 0000000..bc44045
--- /dev/null
+++ b/backend/record/api/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ record
+ 1.0.0
+ ../pom.xml
+
+ record-api
+ record-api
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
diff --git a/backend/record/api/src/main/java/com/emotionmuseum/record/api/client/RecordClient.java b/backend/record/api/src/main/java/com/emotionmuseum/record/api/client/RecordClient.java
new file mode 100644
index 0000000..b986e31
--- /dev/null
+++ b/backend/record/api/src/main/java/com/emotionmuseum/record/api/client/RecordClient.java
@@ -0,0 +1,14 @@
+package com.emotionmuseum.record.api.client;
+
+import com.emotionmuseum.common.result.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@FeignClient(name = "record")
+public interface RecordClient {
+
+ @GetMapping("/record/health")
+ Result health();
+}
+
+
diff --git a/backend/record/pom.xml b/backend/record/pom.xml
index 605e8cd..91e1cdf 100644
--- a/backend/record/pom.xml
+++ b/backend/record/pom.xml
@@ -1,119 +1,18 @@
+ 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">
4.0.0
-
com.emotionmuseum
backend
1.0.0
+ ../pom.xml
-
- emotion-record
- emotion-record
- 情绪记录服务
-
-
-
-
- com.emotionmuseum
- emotion-common
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-bootstrap
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
- org.springframework.boot
- spring-boot-devtools
- runtime
- true
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-validation
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- org.projectlombok
- lombok
- true
-
-
-
-
- cn.hutool
- hutool-all
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
- com.github.xiaoymin
- knife4j-openapi3-spring-boot-starter
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
+ record
+ pom
+
+ api
+ server
+
diff --git a/backend/record/server/pom.xml b/backend/record/server/pom.xml
new file mode 100644
index 0000000..b9f9ec3
--- /dev/null
+++ b/backend/record/server/pom.xml
@@ -0,0 +1,65 @@
+
+
+ 4.0.0
+
+
+ com.emotionmuseum
+ record
+ 1.0.0
+
+
+ record-server
+ record
+ 情绪记录服务
+
+
+
+ com.emotionmuseum
+ record-api
+ ${project.version}
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+ mysql
+ mysql-connector-java
+
+
+ com.alibaba
+ druid-spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
\ No newline at end of file
diff --git a/backend/reward/api/pom.xml b/backend/reward/api/pom.xml
new file mode 100644
index 0000000..f547ecd
--- /dev/null
+++ b/backend/reward/api/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ reward
+ 1.0.0
+ ../pom.xml
+
+ reward-api
+ reward-api
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
diff --git a/backend/reward/api/src/main/java/com/emotionmuseum/reward/api/client/RewardClient.java b/backend/reward/api/src/main/java/com/emotionmuseum/reward/api/client/RewardClient.java
new file mode 100644
index 0000000..3fe97c9
--- /dev/null
+++ b/backend/reward/api/src/main/java/com/emotionmuseum/reward/api/client/RewardClient.java
@@ -0,0 +1,14 @@
+package com.emotionmuseum.reward.api.client;
+
+import com.emotionmuseum.common.result.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@FeignClient(name = "reward")
+public interface RewardClient {
+
+ @GetMapping("/reward/health")
+ Result health();
+}
+
+
diff --git a/backend/reward/pom.xml b/backend/reward/pom.xml
index 7050619..296980b 100644
--- a/backend/reward/pom.xml
+++ b/backend/reward/pom.xml
@@ -1,119 +1,18 @@
+ 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">
4.0.0
-
com.emotionmuseum
backend
1.0.0
+ ../pom.xml
-
- emotion-reward
- emotion-reward
- 奖励系统服务
-
-
-
-
- com.emotionmuseum
- emotion-common
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-bootstrap
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
- org.springframework.boot
- spring-boot-devtools
- runtime
- true
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-validation
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- org.projectlombok
- lombok
- true
-
-
-
-
- cn.hutool
- hutool-all
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
- com.github.xiaoymin
- knife4j-openapi3-spring-boot-starter
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
+ reward
+ pom
+
+ api
+ server
+
diff --git a/backend/reward/server/pom.xml b/backend/reward/server/pom.xml
new file mode 100644
index 0000000..f50b934
--- /dev/null
+++ b/backend/reward/server/pom.xml
@@ -0,0 +1,65 @@
+
+
+ 4.0.0
+
+
+ com.emotionmuseum
+ reward
+ 1.0.0
+
+
+ reward-server
+ reward
+ 奖励系统服务
+
+
+
+ com.emotionmuseum
+ reward-api
+ ${project.version}
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+ mysql
+ mysql-connector-java
+
+
+ com.alibaba
+ druid-spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
\ No newline at end of file
diff --git a/backend/stats/api/pom.xml b/backend/stats/api/pom.xml
new file mode 100644
index 0000000..fb74580
--- /dev/null
+++ b/backend/stats/api/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ stats
+ 1.0.0
+ ../pom.xml
+
+ stats-api
+ stats-api
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
diff --git a/backend/stats/api/src/main/java/com/emotionmuseum/stats/api/client/StatsClient.java b/backend/stats/api/src/main/java/com/emotionmuseum/stats/api/client/StatsClient.java
new file mode 100644
index 0000000..70aaff4
--- /dev/null
+++ b/backend/stats/api/src/main/java/com/emotionmuseum/stats/api/client/StatsClient.java
@@ -0,0 +1,14 @@
+package com.emotionmuseum.stats.api.client;
+
+import com.emotionmuseum.common.result.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@FeignClient(name = "stats")
+public interface StatsClient {
+
+ @GetMapping("/stats/health")
+ Result health();
+}
+
+
diff --git a/backend/stats/pom.xml b/backend/stats/pom.xml
index ea06bfe..09f73e4 100644
--- a/backend/stats/pom.xml
+++ b/backend/stats/pom.xml
@@ -1,119 +1,18 @@
+ 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">
4.0.0
-
com.emotionmuseum
backend
1.0.0
+ ../pom.xml
-
- emotion-stats
- emotion-stats
- 统计分析服务
-
-
-
-
- com.emotionmuseum
- emotion-common
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-bootstrap
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
- org.springframework.boot
- spring-boot-devtools
- runtime
- true
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-validation
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- org.projectlombok
- lombok
- true
-
-
-
-
- cn.hutool
- hutool-all
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
- com.github.xiaoymin
- knife4j-openapi3-spring-boot-starter
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
+ stats
+ pom
+
+ api
+ server
+
diff --git a/backend/stats/server/pom.xml b/backend/stats/server/pom.xml
new file mode 100644
index 0000000..e22d8fc
--- /dev/null
+++ b/backend/stats/server/pom.xml
@@ -0,0 +1,65 @@
+
+
+ 4.0.0
+
+
+ com.emotionmuseum
+ stats
+ 1.0.0
+
+
+ stats-server
+ stats
+ 统计分析服务
+
+
+
+ com.emotionmuseum
+ stats-api
+ ${project.version}
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+ mysql
+ mysql-connector-java
+
+
+ com.alibaba
+ druid-spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
\ No newline at end of file
diff --git a/backend/user/api/pom.xml b/backend/user/api/pom.xml
new file mode 100644
index 0000000..373222f
--- /dev/null
+++ b/backend/user/api/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ user
+ 1.0.0
+ ../pom.xml
+
+ user-api
+ user-api
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
diff --git a/backend/user/api/src/main/java/com/emotionmuseum/user/api/client/UserClient.java b/backend/user/api/src/main/java/com/emotionmuseum/user/api/client/UserClient.java
new file mode 100644
index 0000000..601b5c0
--- /dev/null
+++ b/backend/user/api/src/main/java/com/emotionmuseum/user/api/client/UserClient.java
@@ -0,0 +1,18 @@
+package com.emotionmuseum.user.api.client;
+
+import com.emotionmuseum.common.result.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+
+@FeignClient(name = "user")
+public interface UserClient {
+
+ @GetMapping("/user/health")
+ Result health();
+
+ @GetMapping("/user/info/{userId}")
+ Result> getUserInfo(@PathVariable("userId") String userId);
+}
+
+
diff --git a/backend/user/pom.xml b/backend/user/pom.xml
index 398a17a..48d682c 100644
--- a/backend/user/pom.xml
+++ b/backend/user/pom.xml
@@ -3,163 +3,16 @@
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">
4.0.0
-
com.emotionmuseum
backend
1.0.0
+ ../pom.xml
-
- emotion-user
- emotion-user
- 用户服务
-
-
-
-
- com.emotionmuseum
- emotion-common
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-bootstrap
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
- org.springframework.boot
- spring-boot-devtools
- runtime
- true
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-validation
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
-
-
- io.jsonwebtoken
- jjwt-api
-
-
-
- io.jsonwebtoken
- jjwt-impl
-
-
-
- io.jsonwebtoken
- jjwt-jackson
-
-
-
-
- me.zhyd.oauth
- JustAuth
- 1.16.5
-
-
-
-
- com.github.whvcse
- easy-captcha
- 1.6.2
-
-
-
-
- org.projectlombok
- lombok
- true
-
-
-
-
- cn.hutool
- hutool-all
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
- com.github.xiaoymin
- knife4j-openapi3-spring-boot-starter
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${spring-boot.version}
-
- com.emotionmuseum.user.UserApplication
-
-
-
-
- repackage
-
-
-
-
-
-
+ user
+ pom
+
+ api
+ server
+
\ No newline at end of file
diff --git a/backend/user/server/pom.xml b/backend/user/server/pom.xml
new file mode 100644
index 0000000..360994a
--- /dev/null
+++ b/backend/user/server/pom.xml
@@ -0,0 +1,131 @@
+
+
+ 4.0.0
+
+
+ com.emotionmuseum
+ user
+ 1.0.0
+
+
+ user-server
+ user
+ 用户服务
+
+
+
+ com.emotionmuseum
+ user-api
+ ${project.version}
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+
+
+ mysql
+ mysql-connector-java
+
+
+ com.alibaba
+ druid-spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+
+ io.jsonwebtoken
+ jjwt-api
+
+
+ io.jsonwebtoken
+ jjwt-impl
+
+
+ io.jsonwebtoken
+ jjwt-jackson
+
+
+
+
+ me.zhyd.oauth
+ JustAuth
+ 1.16.5
+
+
+
+
+ com.github.whvcse
+ easy-captcha
+ 1.6.2
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.springframework.security
+ spring-security-test
+ test
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot.version}
+
+ com.emotionmuseum.user.UserApplication
+
+
+
+
+ repackage
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/backend/user/server/src/main/java/com/emotionmuseum/user/service/UserService.java b/backend/user/server/src/main/java/com/emotionmuseum/user/service/UserService.java
index dd8a1fb..15500f3 100644
--- a/backend/user/server/src/main/java/com/emotionmuseum/user/service/UserService.java
+++ b/backend/user/server/src/main/java/com/emotionmuseum/user/service/UserService.java
@@ -1,9 +1,9 @@
package com.emotionmuseum.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
-import com.emotionmuseum.user.dto.UserUpdateRequest;
+import com.emotionmuseum.user.request.UserUpdateRequest;
import com.emotionmuseum.user.entity.User;
-import com.emotionmuseum.user.vo.UserInfoResponse;
+import com.emotionmuseum.user.response.UserInfoResponse;
/**
* 用户服务接口
diff --git a/backend/user/server/src/main/java/com/emotionmuseum/user/service/impl/UserServiceImpl.java b/backend/user/server/src/main/java/com/emotionmuseum/user/service/impl/UserServiceImpl.java
index 7ef4faa..7823130 100644
--- a/backend/user/server/src/main/java/com/emotionmuseum/user/service/impl/UserServiceImpl.java
+++ b/backend/user/server/src/main/java/com/emotionmuseum/user/service/impl/UserServiceImpl.java
@@ -1,11 +1,11 @@
package com.emotionmuseum.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.emotionmuseum.user.dto.UserUpdateRequest;
+import com.emotionmuseum.user.request.UserUpdateRequest;
import com.emotionmuseum.user.entity.User;
import com.emotionmuseum.user.mapper.UserMapper;
import com.emotionmuseum.user.service.UserService;
-import com.emotionmuseum.user.vo.UserInfoResponse;
+import com.emotionmuseum.user.response.UserInfoResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
diff --git a/backend/websocket/api/pom.xml b/backend/websocket/api/pom.xml
new file mode 100644
index 0000000..dc24f15
--- /dev/null
+++ b/backend/websocket/api/pom.xml
@@ -0,0 +1,25 @@
+
+
+ 4.0.0
+
+ com.emotionmuseum
+ websocket
+ 1.0.0
+ ../pom.xml
+
+ websocket-api
+ websocket-api
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+
diff --git a/backend/websocket/api/src/main/java/com/emotionmuseum/websocket/api/client/WebsocketClient.java b/backend/websocket/api/src/main/java/com/emotionmuseum/websocket/api/client/WebsocketClient.java
new file mode 100644
index 0000000..3872fc3
--- /dev/null
+++ b/backend/websocket/api/src/main/java/com/emotionmuseum/websocket/api/client/WebsocketClient.java
@@ -0,0 +1,14 @@
+package com.emotionmuseum.websocket.api.client;
+
+import com.emotionmuseum.common.result.Result;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@FeignClient(name = "websocket")
+public interface WebsocketClient {
+
+ @GetMapping("/websocket/health")
+ Result health();
+}
+
+
diff --git a/backend/websocket/pom.xml b/backend/websocket/pom.xml
index 7a19718..c1079b4 100644
--- a/backend/websocket/pom.xml
+++ b/backend/websocket/pom.xml
@@ -3,139 +3,16 @@
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">
4.0.0
-
com.emotionmuseum
backend
1.0.0
+ ../pom.xml
-
- emotion-websocket
- emotion-websocket
- WebSocket聊天服务
-
-
-
-
- com.emotionmuseum
- emotion-common
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-bootstrap
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-discovery
-
-
-
- com.alibaba.cloud
- spring-cloud-starter-alibaba-nacos-config
-
-
-
-
- org.springframework.boot
- spring-boot-devtools
- runtime
- true
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-websocket
-
-
-
-
- org.springframework.boot
- spring-boot-starter-validation
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-openfeign
-
-
-
-
- org.springframework.cloud
- spring-cloud-starter-loadbalancer
-
-
-
-
- mysql
- mysql-connector-java
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
-
-
-
- io.micrometer
- micrometer-registry-prometheus
-
-
-
-
- com.h2database
- h2
- test
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${spring-boot.version}
-
- com.emotionmuseum.websocket.WebsocketApplication
-
-
-
-
- repackage
-
-
-
-
-
-
+ websocket
+ pom
+
+ api
+ server
+
\ No newline at end of file
diff --git a/backend/websocket/server/pom.xml b/backend/websocket/server/pom.xml
new file mode 100644
index 0000000..260be41
--- /dev/null
+++ b/backend/websocket/server/pom.xml
@@ -0,0 +1,77 @@
+
+
+ 4.0.0
+
+
+ com.emotionmuseum
+ websocket
+ 1.0.0
+
+
+ websocket-server
+ websocket
+ WebSocket聊天服务
+
+
+
+ com.emotionmuseum
+ websocket-api
+ ${project.version}
+
+
+ com.emotionmuseum
+ common
+ ${project.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-websocket
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ org.springframework.cloud
+ spring-cloud-starter-loadbalancer
+
+
+ mysql
+ mysql-connector-java
+
+
+ com.alibaba
+ druid-spring-boot-starter
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ io.micrometer
+ micrometer-registry-prometheus
+
+
+
\ No newline at end of file