From af6536c0fe807f57cfcd94739704d756a820efd2 Mon Sep 17 00:00:00 2001 From: "hhb@hotmail.com" Date: Tue, 10 Dec 2024 10:23:42 +0800 Subject: [PATCH] update --- .../controller/admin/service/impl/CommonServiceImpl.java | 7 +++---- .../controller/admin/service/impl/TeacherServiceImpl.java | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/cn/teammodel/controller/admin/service/impl/CommonServiceImpl.java b/src/main/java/cn/teammodel/controller/admin/service/impl/CommonServiceImpl.java index 7d1a810..0047455 100644 --- a/src/main/java/cn/teammodel/controller/admin/service/impl/CommonServiceImpl.java +++ b/src/main/java/cn/teammodel/controller/admin/service/impl/CommonServiceImpl.java @@ -12,7 +12,6 @@ import cn.teammodel.repository.CommentRepository; import cn.teammodel.repository.SchoolRepository; import cn.teammodel.utils.MonthToNumberConverter; import com.azure.cosmos.models.PartitionKey; -import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -41,9 +40,9 @@ public class CommonServiceImpl implements CommonService { //获取当前学校该学段下详细信息 List period = schoolRepository.findPeriodById(gcDto.getSchoolId(), gcDto.getPeriodId()); List classes = classRepository.findClassBySchoolIdAndPeriodId(gcDto.getPeriodId()); - int year = 0; - int mon = 0; - int day = 0; + int year; + int mon; + int day; if (gcDto.getTime() != null && gcDto.getTime() != 0L) { LocalDate date = Instant.ofEpochMilli(gcDto.getTime()).atZone(ZoneId.systemDefault()).toLocalDate(); year = date.getYear(); diff --git a/src/main/java/cn/teammodel/controller/admin/service/impl/TeacherServiceImpl.java b/src/main/java/cn/teammodel/controller/admin/service/impl/TeacherServiceImpl.java index 3443214..29eaf5b 100644 --- a/src/main/java/cn/teammodel/controller/admin/service/impl/TeacherServiceImpl.java +++ b/src/main/java/cn/teammodel/controller/admin/service/impl/TeacherServiceImpl.java @@ -734,7 +734,7 @@ public class TeacherServiceImpl implements TeacherService { try { gradeMap = GroupUtil.getTeacherInfo(gpTeacherDto,new GroupUtil(env), request); }catch (Exception e) { - throw new ServiceException(ErrorCode.SYSTEM_ERROR.getCode(), "数据转换错误"); + throw new ServiceException(ErrorCode.SYSTEM_ERROR.getCode(), "国培数据转换错误"); } return gradeMap;