From 14821e28286d773ad5ff2c13510e39c5eb117daf Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: Fri, 05 Jul 2024 13:46:32 +0800
Subject: [PATCH] update
---
exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExCourseChapterPeriodServiceImpl.java | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExCourseChapterPeriodServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExCourseChapterPeriodServiceImpl.java
index 080b18b..07bd4f0 100644
--- a/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExCourseChapterPeriodServiceImpl.java
+++ b/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExCourseChapterPeriodServiceImpl.java
@@ -39,6 +39,9 @@
if(!checkNameUnique(period)){
throw new ApiException("学时名称已存在");
}
+ SysUser user= SecurityUtils.getLoginUser().getUser();
+ Long companyId=!user.getUserType().equals(UserTypeEnum.SYSTEM_USER)?user.getCompanyId():null;
+ period.setCompanyId(companyId);
int row=baseMapper.insert(period);
if(row<1){
throw new ApiException("学时保存失败");
@@ -52,6 +55,7 @@
if(!checkNameUnique(period)){
throw new ApiException("学时名称已存在");
}
+ period.setUpdateBy(SecurityUtils.getUsername());
int row=baseMapper.updateById(period);
if(row<1){
throw new ApiException("更新学时失败");
--
Gitblit v1.9.2