refactor: 将包 dao 改为 repository

11111
winter 12 months ago
parent 5c01fca6c1
commit 65c8fd598f

@ -4,7 +4,7 @@ import cn.teammodel.common.ErrorCode;
import cn.teammodel.common.PK; import cn.teammodel.common.PK;
import cn.teammodel.config.exception.ServiceException; import cn.teammodel.config.exception.ServiceException;
import cn.teammodel.controller.admin.service.AdminAppraiseService; import cn.teammodel.controller.admin.service.AdminAppraiseService;
import cn.teammodel.dao.*; import cn.teammodel.repository.*;
import cn.teammodel.model.dto.admin.TimeRangeDto; import cn.teammodel.model.dto.admin.TimeRangeDto;
import cn.teammodel.model.dto.admin.UpdateAchievementRuleDto; import cn.teammodel.model.dto.admin.UpdateAchievementRuleDto;
import cn.teammodel.model.entity.User; import cn.teammodel.model.entity.User;

@ -1,7 +1,7 @@
package cn.teammodel.controller.frontend; package cn.teammodel.controller.frontend;
import cn.teammodel.common.R; import cn.teammodel.common.R;
import cn.teammodel.dao.AppraiseRepository; import cn.teammodel.repository.AppraiseRepository;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;

@ -0,0 +1,26 @@
package cn.teammodel.model.entity.weekDuty;
import cn.teammodel.model.entity.BaseItem;
import com.azure.spring.data.cosmos.core.mapping.Container;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* ,
* @author winter
* @create 2023-12-29 15:53
*/
@EqualsAndHashCode(callSuper = true)
@Container(containerName = "School")
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class WeekDuty extends BaseItem {
private String classId;
private String className;
/**
*
*/
private String note;
private Long createTime;
}

@ -1,4 +1,4 @@
package cn.teammodel.dao; package cn.teammodel.repository;
import cn.teammodel.model.entity.appraise.AppraiseRecord; import cn.teammodel.model.entity.appraise.AppraiseRecord;
import cn.teammodel.model.entity.appraise.AppraiseTreeNode; import cn.teammodel.model.entity.appraise.AppraiseTreeNode;

@ -1,4 +1,4 @@
package cn.teammodel.dao; package cn.teammodel.repository;
import cn.teammodel.model.entity.appraise.Appraise; import cn.teammodel.model.entity.appraise.Appraise;
import cn.teammodel.model.entity.appraise.AppraiseTreeNode; import cn.teammodel.model.entity.appraise.AppraiseTreeNode;

@ -1,4 +1,4 @@
package cn.teammodel.dao; package cn.teammodel.repository;
import cn.teammodel.model.entity.ai.ChatSession; import cn.teammodel.model.entity.ai.ChatSession;
import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.repository.CosmosRepository;

@ -1,4 +1,4 @@
package cn.teammodel.dao; package cn.teammodel.repository;
import cn.teammodel.model.entity.school.ClassInfo; import cn.teammodel.model.entity.school.ClassInfo;
import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.repository.CosmosRepository;

@ -1,4 +1,4 @@
package cn.teammodel.dao; package cn.teammodel.repository;
import cn.teammodel.model.entity.school.School; import cn.teammodel.model.entity.school.School;
import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.repository.CosmosRepository;

@ -1,4 +1,4 @@
package cn.teammodel.dao; package cn.teammodel.repository;
import cn.teammodel.model.entity.school.Student; import cn.teammodel.model.entity.school.Student;
import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.repository.CosmosRepository;

@ -1,4 +1,4 @@
package cn.teammodel.dao; package cn.teammodel.repository;
import cn.teammodel.model.entity.school.Teacher; import cn.teammodel.model.entity.school.Teacher;
import com.azure.spring.data.cosmos.repository.CosmosRepository; import com.azure.spring.data.cosmos.repository.CosmosRepository;

@ -8,7 +8,7 @@ import cn.teammodel.ai.listener.SparkGptStreamListener;
import cn.teammodel.common.ErrorCode; import cn.teammodel.common.ErrorCode;
import cn.teammodel.common.PK; import cn.teammodel.common.PK;
import cn.teammodel.config.exception.ServiceException; import cn.teammodel.config.exception.ServiceException;
import cn.teammodel.dao.ChatSessionRepository; import cn.teammodel.repository.ChatSessionRepository;
import cn.teammodel.model.dto.ai.ChatCompletionReqDto; import cn.teammodel.model.dto.ai.ChatCompletionReqDto;
import cn.teammodel.model.entity.User; import cn.teammodel.model.entity.User;
import cn.teammodel.model.entity.ai.ChatSession; import cn.teammodel.model.entity.ai.ChatSession;
@ -49,7 +49,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
ChatSession session = RepositoryUtil.findOne(chatSessionRepository.findBySessionId(sessionId), "该会话不存在"); ChatSession session = RepositoryUtil.findOne(chatSessionRepository.findBySessionId(sessionId), "该会话不存在");
if (!session.getUserId().equals(userId)) { if (!session.getUserId().equals(userId)) {
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "该会话不存在"); throw new ServiceException(ErrorCode.NO_AUTH_ERROR.getCode(), "该会话不存在");
} }
SseEmitter sseEmitter = new SseEmitter(-1L); SseEmitter sseEmitter = new SseEmitter(-1L);

@ -4,7 +4,7 @@ import cn.hutool.core.lang.UUID;
import cn.teammodel.common.ErrorCode; import cn.teammodel.common.ErrorCode;
import cn.teammodel.common.PK; import cn.teammodel.common.PK;
import cn.teammodel.config.exception.ServiceException; import cn.teammodel.config.exception.ServiceException;
import cn.teammodel.dao.ChatSessionRepository; import cn.teammodel.repository.ChatSessionRepository;
import cn.teammodel.model.dto.ai.UpdateSessionDto; import cn.teammodel.model.dto.ai.UpdateSessionDto;
import cn.teammodel.model.entity.User; import cn.teammodel.model.entity.User;
import cn.teammodel.model.entity.ai.ChatSession; import cn.teammodel.model.entity.ai.ChatSession;

@ -7,7 +7,7 @@ import cn.teammodel.common.FiveEducations;
import cn.teammodel.common.IdRequest; import cn.teammodel.common.IdRequest;
import cn.teammodel.common.PK; import cn.teammodel.common.PK;
import cn.teammodel.config.exception.ServiceException; import cn.teammodel.config.exception.ServiceException;
import cn.teammodel.dao.*; import cn.teammodel.repository.*;
import cn.teammodel.model.dto.Appraise.*; import cn.teammodel.model.dto.Appraise.*;
import cn.teammodel.model.entity.User; import cn.teammodel.model.entity.User;
import cn.teammodel.model.entity.appraise.*; import cn.teammodel.model.entity.appraise.*;

@ -2,7 +2,7 @@ package cn.teammodel;
import cn.teammodel.common.PK; import cn.teammodel.common.PK;
import cn.teammodel.controller.admin.service.AdminAppraiseService; import cn.teammodel.controller.admin.service.AdminAppraiseService;
import cn.teammodel.dao.*; import cn.teammodel.repository.*;
import cn.teammodel.manager.DingAlertNotifier; import cn.teammodel.manager.DingAlertNotifier;
import cn.teammodel.model.dto.admin.TimeRangeDto; import cn.teammodel.model.dto.admin.TimeRangeDto;
import cn.teammodel.model.dto.admin.UpdateAchievementRuleDto; import cn.teammodel.model.dto.admin.UpdateAchievementRuleDto;

Loading…
Cancel
Save