소스 검색

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

zouxuan 2 년 전
부모
커밋
20488ef226
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentStatisticsServiceImpl.java

+ 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){