|
@@ -21,11 +21,9 @@ import com.ym.mec.biz.dal.dto.RongyunBasicUserDto;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.enums.GroupType;
|
|
|
import com.ym.mec.biz.dal.enums.TeachModeEnum;
|
|
|
-import com.ym.mec.biz.service.StudentAttendanceService;
|
|
|
-import com.ym.mec.biz.service.SysConfigService;
|
|
|
-import com.ym.mec.biz.service.SysTenantConfigService;
|
|
|
-import com.ym.mec.biz.service.TeacherAttendanceService;
|
|
|
+import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
+import com.ym.mec.common.page.WrapperUtil;
|
|
|
import com.ym.mec.im.IMHelper;
|
|
|
import com.ym.mec.im.message.*;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
@@ -38,6 +36,7 @@ import com.ym.utils.DateTimeUtils;
|
|
|
import com.ym.utils.IdentifierUtils;
|
|
|
import com.ym.whiteboard.WhiteBoardHelper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import lombok.val;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
@@ -98,6 +97,8 @@ public class RoomServiceImpl implements RoomService {
|
|
|
@Autowired
|
|
|
private SysTenantConfigService sysTenantConfigService;
|
|
|
@Autowired
|
|
|
+ private TenantAssetsInfoService tenantAssetsInfoService;
|
|
|
+ @Autowired
|
|
|
private RedisTemplate<String,String> redisTemplate;
|
|
|
|
|
|
@Override
|
|
@@ -148,6 +149,13 @@ public class RoomServiceImpl implements RoomService {
|
|
|
throw new ApiException(ErrorEnum.ROOM_NOT_START);
|
|
|
// throw new BizException("网络教室暂未开启,请在{}分钟后进入教室",DateUtil.minutesBetween(addMinutes,courseSchedule.getStartClassTime()));
|
|
|
}
|
|
|
+ final TenantAssetsInfo one = tenantAssetsInfoService.getOne(new WrapperUtil<TenantAssetsInfo>()
|
|
|
+ .hasEq("tenant_id_", courseSchedule.getTenantId())
|
|
|
+ .queryWrapper()
|
|
|
+ .gt("balance_", 0));
|
|
|
+ if(one == null){
|
|
|
+ throw new ApiException(ErrorEnum.CLOUD_BALANCE_NOT_FEE);
|
|
|
+ }
|
|
|
|
|
|
//是否是连堂课
|
|
|
String continueCourseTime = sysTenantConfigService.getTenantConfigValue(SysConfigService.ONLINE_CONTINUE_COURSE_TIME,courseSchedule.getTenantId());
|