Bläddra i källkod

学员小课管理,定时任务分批处理

zouxuan 2 år sedan
förälder
incheckning
20488ef226

+ 3 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentStatisticsServiceImpl.java

@@ -12,6 +12,7 @@ import com.ym.mec.biz.service.StudentStatisticsService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.redis.service.RedisCache;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.util.collection.MapUtil;
 import org.apache.commons.collections.CollectionUtils;
@@ -33,7 +34,7 @@ public class StudentStatisticsServiceImpl extends BaseServiceImpl<Integer, Stude
 	@Autowired
 	private StudentBasicInfoDao studentBasicInfoDao;
 	@Autowired
-	private RedisTemplate<String,Integer> redisTemplate;
+	private RedisCache<String,Integer> redisCache;
 
 	@Override
 	public BaseDAO<Integer, StudentStatistics> getDAO() {
@@ -42,6 +43,7 @@ public class StudentStatisticsServiceImpl extends BaseServiceImpl<Integer, Stude
 
 	@Override
 	public void updateStudentStatistics() {
+		RedisTemplate<String, Integer> redisTemplate = redisCache.getRedisTemplate();
 		Integer num = redisTemplate.opsForValue().get("updateStudentStatisticsNum:");
 		if(num == null || num == 1){
 			if(num == null){