|
@@ -1,8 +1,10 @@
|
|
|
package com.yonge.cooleshow.biz.dal.service.impl;
|
|
|
|
|
|
+import com.alibaba.excel.util.CollectionUtils;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.yonge.cooleshow.biz.dal.dao.TeacherFreeTimeDao;
|
|
|
import com.yonge.cooleshow.biz.dal.dto.PracticeTimesSetting;
|
|
@@ -51,7 +53,10 @@ public class TeacherFreeTimeServiceImpl extends ServiceImpl<TeacherFreeTimeDao,
|
|
|
baseMapper.deleteSubjectPrice(oldTeacherFreeTime.getId());
|
|
|
}
|
|
|
//将其他配置改为非默认
|
|
|
- baseMapper.updateDefaultFlag(false,teacherFreeTime.getTeacherId());
|
|
|
+ List<TeacherFreeTime> checkGapLock = baseMapper.selectList(Wrappers.<TeacherFreeTime>lambdaQuery().eq(TeacherFreeTime::getTeacherId, teacherFreeTime.getTeacherId()));
|
|
|
+ if (!CollectionUtils.isEmpty(checkGapLock)){
|
|
|
+ baseMapper.updateDefaultFlag(false,teacherFreeTime.getTeacherId());
|
|
|
+ }
|
|
|
baseMapper.insert(teacherFreeTime);
|
|
|
|
|
|
List<TeacherSubjectPrice> priceList= JSONArray.parseArray(teacherFreeTime.getSubjectPrice(), TeacherSubjectPrice.class);
|