|
@@ -6,6 +6,7 @@ import java.util.Map;
|
|
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
+import com.ruoyi.common.core.redis.RedisCache;
|
|
|
import com.ruoyi.common.utils.DateUtils;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
@@ -32,6 +33,9 @@ public class CourseTableServiceImpl implements ICourseTableService
|
|
|
@Autowired
|
|
|
private CourseTableTimeMapper courseTableTimeMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private RedisCache redisCache;
|
|
|
+
|
|
|
/**
|
|
|
* 查询课程
|
|
|
*
|
|
@@ -113,6 +117,15 @@ public class CourseTableServiceImpl implements ICourseTableService
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
map.put("teacher","");
|
|
|
map.put("subject","");
|
|
|
+ //家长端查询下课时间
|
|
|
+ String key = schoolId + ":" + classId;
|
|
|
+ //key = 学校id:班级id
|
|
|
+ //Redis根据key键,查询对应的值
|
|
|
+ String value = redisCache.getCacheObject(key);
|
|
|
+ String[] split = value.split(":");
|
|
|
+ //下课时间
|
|
|
+ String xiakeTime = split[1];
|
|
|
+ map.put("time",xiakeTime);
|
|
|
//获取当前时间
|
|
|
String nowTime = DateUtils.getTime();
|
|
|
//判断当天是周几
|