开课删除操作,需要删除所有有关开课的数据。

beetlsql3-dev
Mlxa0324 2 years ago
parent e97ecd5547
commit c8317916c0

@ -62,4 +62,14 @@ public interface TeacherOpenCourseMergeCourseInfoDao extends BaseMapper<TeacherO
* @return
*/
boolean isNotExistsByTeacherOpenCourseId(@NotNull(message = "开课ID不能为空") Long teacherOpenCourseId);
/**
* ID
*
*
* @param teacherOpenCourseIds
* @return
*/
@Update
void deleteMergeCourseInfoByTeacherOpenCourseIds(String teacherOpenCourseIds);
}

@ -19,13 +19,20 @@ import javax.validation.constraints.NotNull;
public interface DeleteResourcesBy {
/**
*
* <p>
* 使SpringBean
* </p>
*
*
* {@link TeacherOpenCourseMergeCourseInfoService#deleteByTeacherOpenCourseId}
* {@link TeacherOpenCourseMergeCourseInfoService#resetOperationByTeacherOpenCourseId}
* @param teacherOpenCourseId
*/
void deleteByTeacherOpenCourseId(@NotNull(message = "开课ID不能为空") final Long teacherOpenCourseId);
void resetOperationByTeacherOpenCourseId(@NotNull(message = "开课ID不能为空") final Long teacherOpenCourseId);
/**
* 西
*
*/
void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(@NotNull(message = "开课ID不能为空") final Long teacherOpenCourseId);
}

@ -12,6 +12,7 @@ import com.ibeetl.jlw.dao.TeacherMergeApplicationDao;
import com.ibeetl.jlw.entity.TeacherMergeApplication;
import com.ibeetl.jlw.enums.MoveEnum;
import com.ibeetl.jlw.web.query.TeacherMergeApplicationQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -34,7 +35,8 @@ import java.util.List;
@Service
@Transactional
@Validated
public class TeacherMergeApplicationService extends CoreBaseService<TeacherMergeApplication>{
@Slf4j
public class TeacherMergeApplicationService extends CoreBaseService<TeacherMergeApplication> implements DeleteResourcesBy{
@Autowired private TeacherMergeApplicationDao teacherMergeApplicationDao;
@ -241,4 +243,14 @@ public class TeacherMergeApplicationService extends CoreBaseService<TeacherMerge
break;
}
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -10,6 +10,7 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseChatLogDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseChatLog;
import com.ibeetl.jlw.web.query.TeacherOpenCourseChatLogQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -28,7 +29,8 @@ import java.util.List;
@Service
@Transactional
public class TeacherOpenCourseChatLogService extends CoreBaseService<TeacherOpenCourseChatLog>{
@Slf4j
public class TeacherOpenCourseChatLogService extends CoreBaseService<TeacherOpenCourseChatLog> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseChatLogDao teacherOpenCourseChatLogDao;
@ -147,4 +149,14 @@ public class TeacherOpenCourseChatLogService extends CoreBaseService<TeacherOpen
}
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -11,6 +11,7 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseHandsOnDao;
import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.web.query.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
@ -25,7 +26,6 @@ import java.util.List;
import java.util.Map;
import java.util.StringJoiner;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* - Service
@ -35,7 +35,8 @@ import java.util.stream.Stream;
@Service
@Transactional
@Validated
public class TeacherOpenCourseHandsOnService extends CoreBaseService<TeacherOpenCourseHandsOn>{
@Slf4j
public class TeacherOpenCourseHandsOnService extends CoreBaseService<TeacherOpenCourseHandsOn> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseHandsOnDao teacherOpenCourseHandsOnDao;
@Autowired private HandsOnService handsOnService;
@ -270,4 +271,14 @@ public class TeacherOpenCourseHandsOnService extends CoreBaseService<TeacherOpen
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -10,6 +10,7 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseHandsOnSimulationTasksFileDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseHandsOnSimulationTasksFile;
import com.ibeetl.jlw.web.query.TeacherOpenCourseHandsOnSimulationTasksFileQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -29,7 +30,8 @@ import java.util.List;
@Service
@Transactional
@Validated
public class TeacherOpenCourseHandsOnSimulationTasksFileService extends CoreBaseService<TeacherOpenCourseHandsOnSimulationTasksFile>{
@Slf4j
public class TeacherOpenCourseHandsOnSimulationTasksFileService extends CoreBaseService<TeacherOpenCourseHandsOnSimulationTasksFile> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseHandsOnSimulationTasksFileDao teacherOpenCourseHandsOnSimulationTasksFileDao;
@ -150,4 +152,13 @@ public class TeacherOpenCourseHandsOnSimulationTasksFileService extends CoreBase
}
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -12,6 +12,7 @@ import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.entity.vo.HandsOnTaskProblemVO;
import com.ibeetl.jlw.enums.HandsOnTaskEnum;
import com.ibeetl.jlw.web.query.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
@ -33,7 +34,8 @@ import java.util.stream.Collectors;
@Service
@Transactional
@Validated
public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseService<TeacherOpenCourseHandsOnSimulationTasks>{
@Slf4j
public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseService<TeacherOpenCourseHandsOnSimulationTasks> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseHandsOnSimulationTasksDao teacherOpenCourseHandsOnSimulationTasksDao;
@ -266,4 +268,14 @@ public class TeacherOpenCourseHandsOnSimulationTasksService extends CoreBaseServ
studentPageQuery.setList(list);
return studentPageQuery;
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -10,6 +10,7 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseKnowledgePointRelationDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseKnowledgePointRelation;
import com.ibeetl.jlw.web.query.TeacherOpenCourseKnowledgePointRelationQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -29,7 +30,8 @@ import java.util.List;
@Service
@Transactional
@Validated
public class TeacherOpenCourseKnowledgePointRelationService extends CoreBaseService<TeacherOpenCourseKnowledgePointRelation>{
@Slf4j
public class TeacherOpenCourseKnowledgePointRelationService extends CoreBaseService<TeacherOpenCourseKnowledgePointRelation> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseKnowledgePointRelationDao teacherOpenCourseKnowledgePointRelationDao;
@ -150,4 +152,14 @@ public class TeacherOpenCourseKnowledgePointRelationService extends CoreBaseServ
}
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -10,6 +10,7 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseKnowledgePointDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseKnowledgePoint;
import com.ibeetl.jlw.web.query.TeacherOpenCourseKnowledgePointQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -29,7 +30,8 @@ import java.util.List;
@Service
@Transactional
@Validated
public class TeacherOpenCourseKnowledgePointService extends CoreBaseService<TeacherOpenCourseKnowledgePoint>{
@Slf4j
public class TeacherOpenCourseKnowledgePointService extends CoreBaseService<TeacherOpenCourseKnowledgePoint> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseKnowledgePointDao teacherOpenCourseKnowledgePointDao;
@ -146,4 +148,14 @@ public class TeacherOpenCourseKnowledgePointService extends CoreBaseService<Teac
}
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -610,15 +610,16 @@ public class TeacherOpenCourseMergeCourseInfoService extends CoreBaseService<Tea
* @param teacherOpenCourseId ID
* @return
*/
public void deleteAllResourcesByTeacherOpenCourseId(@NotNull(message = "开课ID不能为空") final Long teacherOpenCourseId) {
public void courseInfoResetOperation(@NotNull(message = "开课ID不能为空") final Long teacherOpenCourseId) {
// 获取接口的具体实现类
Map<String, DeleteResourcesBy> beansOfType = SpringUtil.getBeansOfType(DeleteResourcesBy.class);
// 调用子类实现
beansOfType.forEach((beanName, bean) -> bean.deleteByTeacherOpenCourseId(teacherOpenCourseId));
beansOfType.forEach((beanName, bean) -> bean.resetOperationByTeacherOpenCourseId(teacherOpenCourseId));
// 清理缓存
invalidateAllCleanUpCourseInfoTreeLocalCache();
}
/**
* -
* ID线
@ -626,7 +627,7 @@ public class TeacherOpenCourseMergeCourseInfoService extends CoreBaseService<Tea
* @param teacherOpenCourseId
*/
@Override
public void deleteByTeacherOpenCourseId(@NotNull(message = "开课ID不能为空") final Long teacherOpenCourseId) {
public void resetOperationByTeacherOpenCourseId(@NotNull(message = "开课ID不能为空") final Long teacherOpenCourseId) {
TeacherOpenCourseMergeCourseInfoQuery courseInfoQuery = new TeacherOpenCourseMergeCourseInfoQuery();
courseInfoQuery.setTeacherOpenCourseId(teacherOpenCourseId);
// 考虑后期可能会有4的情况暂时多加一个数字4。不查询课程节点的数据
@ -638,6 +639,17 @@ public class TeacherOpenCourseMergeCourseInfoService extends CoreBaseService<Tea
deleteTeacherOpenCourseMergeCourseInfo(join(delIdList.toArray(), ","));
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
TeacherOpenCourseMergeCourseInfoQuery courseInfoQuery = new TeacherOpenCourseMergeCourseInfoQuery();
courseInfoQuery.setTeacherOpenCourseId(teacherOpenCourseId);
List<TeacherOpenCourseMergeCourseInfo> values = getValuesByQuery(courseInfoQuery);
// 根据ID删除数据
Set<Long> delIdList = values.stream().map(TeacherOpenCourseMergeCourseInfo::getTeacherOpenCourseMergeCourseInfoId).collect(toSet());
deleteTeacherOpenCourseMergeCourseInfo(join(delIdList.toArray(), ","));
}
/**
* ID

@ -351,9 +351,14 @@ public class TeacherOpenCourseMergeResourcesInfoService extends CoreBaseService<
* @param teacherOpenCourseId
*/
@Override
public void deleteByTeacherOpenCourseId(Long teacherOpenCourseId) {
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
TeacherOpenCourseMergeResourcesInfo teacherOpenCourseMergeResourcesInfo = new TeacherOpenCourseMergeResourcesInfo();
teacherOpenCourseMergeResourcesInfo.setTeacherOpenCourseId(teacherOpenCourseId);
deleteByCondition(teacherOpenCourseMergeResourcesInfo);
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
}
}

@ -411,12 +411,17 @@ public class TeacherOpenCourseMergeResourcesQuestionService extends CoreBaseServ
*/
@Override
public void deleteByTeacherOpenCourseId(Long teacherOpenCourseId) {
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
TeacherOpenCourseMergeResourcesQuestion teacherOpenCourseIdCondition = new TeacherOpenCourseMergeResourcesQuestion();
teacherOpenCourseIdCondition.setTeacherOpenCourseId(teacherOpenCourseId);
deleteByCondition(teacherOpenCourseIdCondition);
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
resetOperationByTeacherOpenCourseId(teacherOpenCourseId);
}
/**
* ID
* @param teacherOpenCourseId

@ -12,6 +12,7 @@ import com.ibeetl.jlw.dao.TeacherOpenCourseMergeScheduleSessionDao;
import com.ibeetl.jlw.entity.FileEntity;
import com.ibeetl.jlw.entity.TeacherOpenCourseMergeScheduleSession;
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeScheduleSessionQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Row;
@ -38,7 +39,8 @@ import static com.ibeetl.admin.core.util.ExcelUtil.getCellFormatValue;
@Service
@Transactional
@Validated
public class TeacherOpenCourseMergeScheduleSessionService extends CoreBaseService<TeacherOpenCourseMergeScheduleSession>{
@Slf4j
public class TeacherOpenCourseMergeScheduleSessionService extends CoreBaseService<TeacherOpenCourseMergeScheduleSession> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseMergeScheduleSessionDao teacherOpenCourseMergeScheduleSessionDao;
@ -288,4 +290,13 @@ public class TeacherOpenCourseMergeScheduleSessionService extends CoreBaseServic
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -10,6 +10,7 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseMergeSchoolClassDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseMergeSchoolClass;
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeSchoolClassQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -28,7 +29,8 @@ import java.util.List;
@Service
@Transactional
public class TeacherOpenCourseMergeSchoolClassService extends CoreBaseService<TeacherOpenCourseMergeSchoolClass>{
@Slf4j
public class TeacherOpenCourseMergeSchoolClassService extends CoreBaseService<TeacherOpenCourseMergeSchoolClass> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseMergeSchoolClassDao teacherOpenCourseMergeSchoolClassDao;
@ -158,4 +160,14 @@ public class TeacherOpenCourseMergeSchoolClassService extends CoreBaseService<Te
}
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -17,6 +17,7 @@ import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.entity.dto.RandomStudentListDTO;
import com.ibeetl.jlw.enums.OpenCourseMergeJoinTypeEnum;
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeStudentQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -42,7 +43,8 @@ import static com.ibeetl.jlw.enums.OpenCourseMergeJoinTypeEnum.student_join;
@Service
@Transactional
@Validated
public class TeacherOpenCourseMergeStudentService extends CoreBaseService<TeacherOpenCourseMergeStudent>{
@Slf4j
public class TeacherOpenCourseMergeStudentService extends CoreBaseService<TeacherOpenCourseMergeStudent> implements DeleteResourcesBy{
@Autowired private UserConsoleService userConsoleService;
@ -256,4 +258,14 @@ public class TeacherOpenCourseMergeStudentService extends CoreBaseService<Teache
// 随机
userConsoleService.resetPassword(student.getUserId(), "123qwe");
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -13,6 +13,7 @@ import com.ibeetl.jlw.dao.TeacherOpenCourseMergeTeacherDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseMergeTeacher;
import com.ibeetl.jlw.enums.MoveEnum;
import com.ibeetl.jlw.web.query.TeacherOpenCourseMergeTeacherQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -35,7 +36,8 @@ import java.util.List;
@Service
@Transactional
public class TeacherOpenCourseMergeTeacherService extends CoreBaseService<TeacherOpenCourseMergeTeacher>{
@Slf4j
public class TeacherOpenCourseMergeTeacherService extends CoreBaseService<TeacherOpenCourseMergeTeacher> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseMergeTeacherDao teacherOpenCourseMergeTeacherDao;
@ -290,4 +292,14 @@ public class TeacherOpenCourseMergeTeacherService extends CoreBaseService<Teache
return tempCode;
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -11,6 +11,7 @@ import com.ibeetl.jlw.dao.TeacherOpenCourseNoticeDao;
import com.ibeetl.jlw.entity.SchoolClass;
import com.ibeetl.jlw.entity.TeacherOpenCourseNotice;
import com.ibeetl.jlw.web.query.TeacherOpenCourseNoticeQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -30,7 +31,8 @@ import java.util.List;
@Service
@Transactional
@Validated
public class TeacherOpenCourseNoticeService extends CoreBaseService<TeacherOpenCourseNotice>{
@Slf4j
public class TeacherOpenCourseNoticeService extends CoreBaseService<TeacherOpenCourseNotice> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseNoticeDao teacherOpenCourseNoticeDao;
@ -153,4 +155,14 @@ public class TeacherOpenCourseNoticeService extends CoreBaseService<TeacherOpenC
TeacherOpenCourseNotice pojo = param.pojo();
return teacherOpenCourseNoticeDao.getClassByOpenCourseId(pojo);
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -25,6 +25,7 @@ import com.ibeetl.jlw.enums.ResourcesQuestionSnapshotFromTypeEnum;
import com.ibeetl.jlw.web.query.ResourcesQuestionSnapshotQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseQuestionLogQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseQuestionSettingQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -54,7 +55,8 @@ import static java.util.stream.Collectors.groupingBy;
@Service
@Transactional
@Validated
public class TeacherOpenCourseQuestionLogService extends CoreBaseService<TeacherOpenCourseQuestionLog>{
@Slf4j
public class TeacherOpenCourseQuestionLogService extends CoreBaseService<TeacherOpenCourseQuestionLog> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseQuestionLogDao teacherOpenCourseQuestionLogDao;
@Autowired private StudentDao studentDao;
@ -443,4 +445,13 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
return ret;
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -16,6 +16,7 @@ import com.ibeetl.jlw.entity.FileEntity;
import com.ibeetl.jlw.entity.TeacherOpenCourseQuestionLog;
import com.ibeetl.jlw.entity.TeacherOpenCourseQuestionLogWrong;
import com.ibeetl.jlw.web.query.TeacherOpenCourseQuestionLogWrongQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Row;
@ -44,7 +45,8 @@ import static com.ibeetl.admin.core.util.ExcelUtil.getCellFormatValue;
@Service
@Transactional
@Validated
public class TeacherOpenCourseQuestionLogWrongService extends CoreBaseService<TeacherOpenCourseQuestionLogWrong>{
@Slf4j
public class TeacherOpenCourseQuestionLogWrongService extends CoreBaseService<TeacherOpenCourseQuestionLogWrong> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseQuestionLogWrongDao teacherOpenCourseQuestionLogWrongDao;
@ -405,4 +407,14 @@ public class TeacherOpenCourseQuestionLogWrongService extends CoreBaseService<Te
insertBatch(BeanUtil.copyToList(questionWrongList, TeacherOpenCourseQuestionLogWrong.class));
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -12,6 +12,7 @@ import com.ibeetl.jlw.dao.TeacherOpenCourseQuestionSettingDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseQuestionSetting;
import com.ibeetl.jlw.entity.dto.TeacherOpenCourseQuestionSettingDTO;
import com.ibeetl.jlw.web.query.TeacherOpenCourseQuestionSettingQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -30,7 +31,8 @@ import java.util.List;
@Service
@Transactional
public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<TeacherOpenCourseQuestionSetting>{
@Slf4j
public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<TeacherOpenCourseQuestionSetting> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseQuestionSettingDao teacherOpenCourseQuestionSettingDao;
@Autowired private ResourcesQuestionSnapshotService resourcesQuestionSnapshotService;
@ -165,4 +167,14 @@ public class TeacherOpenCourseQuestionSettingService extends CoreBaseService<Tea
resourcesQuestionSnapshotService.insertBatchByQuestionIds(teacherOpenCourseQuestionSettingId, questionSettingOptions);
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -11,6 +11,7 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseScheduleSessionClassDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseScheduleSessionClass;
import com.ibeetl.jlw.web.query.TeacherOpenCourseScheduleSessionClassQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -31,7 +32,8 @@ import java.util.stream.Collectors;
@Service
@Transactional
public class TeacherOpenCourseScheduleSessionClassService extends CoreBaseService<TeacherOpenCourseScheduleSessionClass>{
@Slf4j
public class TeacherOpenCourseScheduleSessionClassService extends CoreBaseService<TeacherOpenCourseScheduleSessionClass> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseScheduleSessionClassDao teacherOpenCourseScheduleSessionClassDao;
@ -182,4 +184,14 @@ public class TeacherOpenCourseScheduleSessionClassService extends CoreBaseServic
}
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -27,6 +27,7 @@ import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.web.query.TeacherOpenCourseScheduleSessionClassQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseScheduleSessionQuery;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.assertj.core.util.Lists;
import org.beetl.sql.core.SqlId;
@ -57,7 +58,8 @@ import static java.util.stream.Collectors.toMap;
@Service
@Transactional
public class TeacherOpenCourseScheduleSessionService extends CoreBaseService<TeacherOpenCourseScheduleSession>{
@Slf4j
public class TeacherOpenCourseScheduleSessionService extends CoreBaseService<TeacherOpenCourseScheduleSession> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseScheduleSessionDao teacherOpenCourseScheduleSessionDao;
@ -424,4 +426,14 @@ public class TeacherOpenCourseScheduleSessionService extends CoreBaseService<Tea
return getSessionClassFullName(parentId, dataMap, "/").concat(sessionClass.getTeacherOpenCourseScheduleSessionClassName());
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -10,6 +10,7 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseScheduleSessionSnapDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseScheduleSessionSnap;
import com.ibeetl.jlw.web.query.TeacherOpenCourseScheduleSessionSnapQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -27,7 +28,8 @@ import java.util.List;
@Service
@Transactional
public class TeacherOpenCourseScheduleSessionSnapService extends CoreBaseService<TeacherOpenCourseScheduleSessionSnap>{
@Slf4j
public class TeacherOpenCourseScheduleSessionSnapService extends CoreBaseService<TeacherOpenCourseScheduleSessionSnap> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseScheduleSessionSnapDao teacherOpenCourseScheduleSessionSnapDao;
@ -145,4 +147,14 @@ public class TeacherOpenCourseScheduleSessionSnapService extends CoreBaseService
}
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -10,6 +10,7 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseScheduleSessionTagDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseScheduleSessionTag;
import com.ibeetl.jlw.web.query.TeacherOpenCourseScheduleSessionTagQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -29,7 +30,8 @@ import java.util.List;
@Service
@Transactional
public class TeacherOpenCourseScheduleSessionTagService extends CoreBaseService<TeacherOpenCourseScheduleSessionTag>{
@Slf4j
public class TeacherOpenCourseScheduleSessionTagService extends CoreBaseService<TeacherOpenCourseScheduleSessionTag> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseScheduleSessionTagDao teacherOpenCourseScheduleSessionTagDao;
@ -147,4 +149,13 @@ public class TeacherOpenCourseScheduleSessionTagService extends CoreBaseService<
}
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -16,6 +16,7 @@ import com.ibeetl.jlw.entity.FileEntity;
import com.ibeetl.jlw.entity.TeacherOpenCourseScoreDashboard;
import com.ibeetl.jlw.entity.TeacherOpenCourseScoreWeight;
import com.ibeetl.jlw.web.query.TeacherOpenCourseScoreDashboardQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Cell;
@ -43,7 +44,8 @@ import java.util.*;
@Service
@Transactional
public class TeacherOpenCourseScoreDashboardService extends CoreBaseService<TeacherOpenCourseScoreDashboard>{
@Slf4j
public class TeacherOpenCourseScoreDashboardService extends CoreBaseService<TeacherOpenCourseScoreDashboard> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseScoreDashboardDao teacherOpenCourseScoreDashboardDao;
@ -489,4 +491,13 @@ public class TeacherOpenCourseScoreDashboardService extends CoreBaseService<Teac
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -10,6 +10,7 @@ import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseScoreWeightDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseScoreWeight;
import com.ibeetl.jlw.web.query.TeacherOpenCourseScoreWeightQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -27,7 +28,8 @@ import java.util.List;
@Service
@Transactional
public class TeacherOpenCourseScoreWeightService extends CoreBaseService<TeacherOpenCourseScoreWeight>{
@Slf4j
public class TeacherOpenCourseScoreWeightService extends CoreBaseService<TeacherOpenCourseScoreWeight> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseScoreWeightDao teacherOpenCourseScoreWeightDao;
@ -144,4 +146,13 @@ public class TeacherOpenCourseScoreWeightService extends CoreBaseService<Teacher
}
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -1,6 +1,7 @@
package com.ibeetl.jlw.service;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.extra.spring.SpringUtil;
import cn.jlw.util.ToolUtils;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
@ -10,6 +11,7 @@ import com.ibeetl.admin.core.util.PlatformException;
import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.admin.core.web.JsonReturnCode;
import com.ibeetl.jlw.dao.TeacherOpenCourseDao;
import com.ibeetl.jlw.dao.TeacherOpenCourseMergeCourseInfoDao;
import com.ibeetl.jlw.entity.Student;
import com.ibeetl.jlw.entity.TeacherOpenCourse;
import com.ibeetl.jlw.web.query.TeacherOpenCourseQuery;
@ -24,6 +26,8 @@ import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;
import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
@ -42,6 +46,8 @@ public class TeacherOpenCourseService extends CoreBaseService<TeacherOpenCourse>
private TeacherOpenCourseMergeTeacherService teacherOpenCourseMergeTeacherService;
@Autowired
private TeacherOpenCourseMergeCourseInfoService teacherOpenCourseMergeCourseInfoService;
@Autowired private TeacherOpenCourseMergeCourseInfoDao teacherOpenCourseMergeCourseInfoDao;
@Autowired
private TeacherService teacherService;
@ -73,9 +79,25 @@ public class TeacherOpenCourseService extends CoreBaseService<TeacherOpenCourse>
}
}
/**
* 西
* @param ids
*/
public void deleteTeacherOpenCourse(String ids){
try {
teacherOpenCourseDao.deleteTeacherOpenCourseByIds(ids);
// 获取接口的具体实现类
Map<String, DeleteResourcesBy> beansOfType = SpringUtil.getBeansOfType(DeleteResourcesBy.class);
// 根据开课ID循环重置开课课程。包含题目资源等信息。
for (String teacherOpenCourseId : ids.split(",")) {
// 调用子类实现
BiConsumer<String, DeleteResourcesBy> stringDeleteResourcesByBiConsumer =
(beanName, bean) -> bean.deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long.valueOf(teacherOpenCourseId));
beansOfType.forEach(stringDeleteResourcesByBiConsumer);
}
// 清理缓存
teacherOpenCourseMergeCourseInfoService.invalidateAllCleanUpCourseInfoTreeLocalCache();
} catch (Exception e) {
throw new PlatformException("批量删除TeacherOpenCourse失败", e);
}

@ -31,6 +31,7 @@ import com.ibeetl.jlw.entity.vo.TeacherOpenCourseStudentSigninLogSummaryVO;
import com.ibeetl.jlw.enums.StartStatusEnum;
import com.ibeetl.jlw.validator.TeacherOpenCourseStudentSigninLogSigninDTOValidator;
import com.ibeetl.jlw.web.query.TeacherOpenCourseStudentSigninLogQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Row;
@ -69,7 +70,8 @@ import static com.ibeetl.jlw.web.query.TeacherOpenCourseStudentSigninLogQuery.Si
@Service
@Transactional
@Validated
public class TeacherOpenCourseStudentSigninLogService extends CoreBaseService<TeacherOpenCourseStudentSigninLog>{
@Slf4j
public class TeacherOpenCourseStudentSigninLogService extends CoreBaseService<TeacherOpenCourseStudentSigninLog> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseStudentSigninLogDao teacherOpenCourseStudentSigninLogDao;
@Autowired private TeacherOpenCourseStudentSigninSettingDao teacherOpenCourseStudentSigninSettingDao;
@ -621,4 +623,14 @@ public class TeacherOpenCourseStudentSigninLogService extends CoreBaseService<Te
return teacherOpenCourseStudentSigninLogDao.summary(teacherOpenCourseId);
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -13,6 +13,7 @@ import com.ibeetl.jlw.entity.TeacherOpenCourseStudentSigninSetting;
import com.ibeetl.jlw.enums.StartStatusEnum;
import com.ibeetl.jlw.validator.TeacherOpenCourseStudentSigninSettingQueryValidator;
import com.ibeetl.jlw.web.query.TeacherOpenCourseStudentSigninSettingQuery;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.beetl.sql.core.SqlId;
import org.beetl.sql.core.engine.PageQuery;
@ -34,7 +35,8 @@ import java.util.List;
@Service
@Transactional
@Validated
public class TeacherOpenCourseStudentSigninSettingService extends CoreBaseService<TeacherOpenCourseStudentSigninSetting>{
@Slf4j
public class TeacherOpenCourseStudentSigninSettingService extends CoreBaseService<TeacherOpenCourseStudentSigninSetting> implements DeleteResourcesBy{
@Autowired private TeacherOpenCourseStudentSigninSettingDao teacherOpenCourseStudentSigninSettingDao;
@Autowired private TeacherOpenCourseStudentSigninSettingQueryValidator settingQueryValidator;
@ -200,4 +202,14 @@ public class TeacherOpenCourseStudentSigninSettingService extends CoreBaseServic
}
@Override
public void resetOperationByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("不需要实现重置操作!");
}
@Override
public void deleteTeacherOpenCourseAllRelatedByTeacherOpenCourseId(Long teacherOpenCourseId) {
log.info("需要实现删除操作!");
}
}

@ -472,9 +472,9 @@ public class TeacherOpenCourseMergeCourseInfoController{
* @return
*/
@PostMapping(API + "/deleteAllResourcesByTeacherOpenCourseId.do")
public JsonResult deleteAllResourcesByTeacherOpenCourseId(Long teacherOpenCourseId) {
public JsonResult courseInfoResetOperation(Long teacherOpenCourseId) {
Assert.notNull(getUser(), "请登录后再操作");
teacherOpenCourseMergeCourseInfoService.deleteAllResourcesByTeacherOpenCourseId(teacherOpenCourseId);
teacherOpenCourseMergeCourseInfoService.courseInfoResetOperation(teacherOpenCourseId);
return JsonResult.success();
}

@ -202,6 +202,14 @@ deleteTeacherOpenCourseMergeCourseInfoByIds
delete from teacher_open_course_merge_course_info where find_in_set(teacher_open_course_merge_course_info_id,#ids#)
deleteMergeCourseInfoByTeacherOpenCourseIds
===
* 根据开课ID集合批量删除
delete from teacher_open_course_merge_course_info where find_in_set(teacher_open_course_id,#teacherOpenCourseIds#)
getByIds
===

Loading…
Cancel
Save