cy 3 anos atrás
pai
commit
d130404dba

+ 2 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/TeacherSalaryEnum.java

@@ -8,9 +8,10 @@ import com.yonge.toolset.base.enums.BaseEnum;
  */
 public enum TeacherSalaryEnum implements BaseEnum<String, TeacherSalaryEnum> {
     //未上课-还未开始上课等待上课结束后结算
-    NOT_START("未结算"),
+    NOT_START("未开始"),
     //已结算-已经结算完成
     COMPLETE("已结算"),
+    WAIT("未结算"),
     //已取消-学生发起退款等等其他操作
     CANCEL("已取消");
 

+ 6 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherFreeTimeServiceImpl.java

@@ -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);