教育资源修改

dev
zhaokai 2026-02-07 16:41:38 +08:00
parent 5645336e71
commit 3780e465ff
2 changed files with 28 additions and 1 deletions

View File

@ -49,6 +49,9 @@ public class ExamPaperRemoveExe {
if (!corpInfoRepository.isSupper() && b) { if (!corpInfoRepository.isSupper() && b) {
throw new BizException("股份端数据不能修改状态"); throw new BizException("股份端数据不能修改状态");
} }
if(!AuthContext.getUserId().equals(examPaperDO.getCreateId())){
throw new BizException(examPaperDO.getExamName()+"试卷不是本人创建的,不能删除");
}
// 是否被使用 // 是否被使用
Long count= classExamPaperRepository.getCountByExamPaperId(examPaperDO.getExamPaperId()); Long count= classExamPaperRepository.getCountByExamPaperId(examPaperDO.getExamPaperId());
@ -91,7 +94,7 @@ public class ExamPaperRemoveExe {
if(count>0){ if(count>0){
errorList.add(examPaperDO.getExamName()+"已绑定班级"); errorList.add(examPaperDO.getExamName()+"已绑定班级");
} }
if(AuthContext.getUserId().equals(examPaperDO.getCreateId())){ if(!AuthContext.getUserId().equals(examPaperDO.getCreateId())){
errorList.add(examPaperDO.getExamName()+"试卷不是本人创建的"); errorList.add(examPaperDO.getExamName()+"试卷不是本人创建的");
} }
} }

View File

@ -0,0 +1,24 @@
package com.zcloud.edu.domain.enums;
import lombok.Getter;
/**
* 1- 2-
*/
@Getter
public enum ExamPaperTypeEnum {
SELF_BUILD(1, "自建试卷"),
AUTO_GENERATE(2, "班级中自动生成试卷");
;
private final Integer code;
private final String name;
ExamPaperTypeEnum(Integer code, String name) {
this.code = code;
this.name = name;
}
}