From ccbd59f18f3ffabf29027b7e405c4291a825073a Mon Sep 17 00:00:00 2001 From: winter <2436197699@qq.com> Date: Tue, 19 Dec 2023 17:55:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20chat=20session=20=E7=9A=84=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teammodel/dao/ChatSessionRepository.java | 19 +++++++++++++++++++ .../model/dto/ai/UpdateSessionDto.java | 5 +++++ .../model/entity/ai/ChatSession.java | 5 +++++ .../teammodel/service/ChatSessionService.java | 5 +++++ .../service/impl/ChatSessionServiceImpl.java | 5 +++++ 5 files changed, 39 insertions(+) create mode 100644 src/main/java/cn/teammodel/dao/ChatSessionRepository.java create mode 100644 src/main/java/cn/teammodel/model/dto/ai/UpdateSessionDto.java create mode 100644 src/main/java/cn/teammodel/model/entity/ai/ChatSession.java create mode 100644 src/main/java/cn/teammodel/service/ChatSessionService.java create mode 100644 src/main/java/cn/teammodel/service/impl/ChatSessionServiceImpl.java diff --git a/src/main/java/cn/teammodel/dao/ChatSessionRepository.java b/src/main/java/cn/teammodel/dao/ChatSessionRepository.java new file mode 100644 index 0000000..c47f18a --- /dev/null +++ b/src/main/java/cn/teammodel/dao/ChatSessionRepository.java @@ -0,0 +1,19 @@ +package cn.teammodel.dao; + +import cn.teammodel.model.entity.school.Teacher; +import com.azure.spring.data.cosmos.repository.CosmosRepository; +import com.azure.spring.data.cosmos.repository.Query; +import org.springframework.stereotype.Repository; + +import java.util.Collection; +import java.util.List; + +/** + * @author winter + * @create 2023-11-28 17:39 + */ +@Repository +public interface TeacherRepository extends CosmosRepository { + @Query("select c.id, c.name from Teacher as c where c.code = @code and c.id in (@ids)") + List findAllByCodeAndIdIn(String code, Collection ids); +} diff --git a/src/main/java/cn/teammodel/model/dto/ai/UpdateSessionDto.java b/src/main/java/cn/teammodel/model/dto/ai/UpdateSessionDto.java new file mode 100644 index 0000000..9d90116 --- /dev/null +++ b/src/main/java/cn/teammodel/model/dto/ai/UpdateSessionDto.java @@ -0,0 +1,5 @@ +package cn.teammodel.model.dto.ai;/** +@author winter +@create 2023-12-19 15:42 +*/public class UpdateSessionDto { +} diff --git a/src/main/java/cn/teammodel/model/entity/ai/ChatSession.java b/src/main/java/cn/teammodel/model/entity/ai/ChatSession.java new file mode 100644 index 0000000..5f7e240 --- /dev/null +++ b/src/main/java/cn/teammodel/model/entity/ai/ChatSession.java @@ -0,0 +1,5 @@ +package cn.teammodel.model.entity.ai;/** +@author winter +@create 2023-12-19 15:09 +*/public class ChatSession { +} diff --git a/src/main/java/cn/teammodel/service/ChatSessionService.java b/src/main/java/cn/teammodel/service/ChatSessionService.java new file mode 100644 index 0000000..adfbdb0 --- /dev/null +++ b/src/main/java/cn/teammodel/service/ChatSessionService.java @@ -0,0 +1,5 @@ +package cn.teammodel.service;/** +@author winter +@create 2023-12-19 15:30 +*/public interface ChatSessionService { +} diff --git a/src/main/java/cn/teammodel/service/impl/ChatSessionServiceImpl.java b/src/main/java/cn/teammodel/service/impl/ChatSessionServiceImpl.java new file mode 100644 index 0000000..b300827 --- /dev/null +++ b/src/main/java/cn/teammodel/service/impl/ChatSessionServiceImpl.java @@ -0,0 +1,5 @@ +package cn.teammodel.service.impl;/** +@author winter +@create 2023-12-19 15:31 +*/public class ChatSessionServiceImpl { +}