| | |
| | | import com.qxueyou.scc.exercise.service.IExerciseVerService; |
| | | |
| | | /** |
| | | * 班级正确率处理service |
| | | * 班级正确率处理service |
| | | * @author zhiyong |
| | | * |
| | | */ |
| | | @Service("ExerciseGroupAccuracyDealService") |
| | | public class ExerciseGroupAccuracyDealService { |
| | | |
| | | /** 缓存service */ |
| | | /** 缓存service */ |
| | | @Autowired |
| | | ICacheService cache; |
| | | |
| | | /** 练习接口service */ |
| | | /** 练习接口service */ |
| | | @Autowired |
| | | IExerciseVerService exerciseVerService; |
| | | |
| | | /** 配置service */ |
| | | /** 配置service */ |
| | | /*@Autowired |
| | | IConfigService config;*/ |
| | | |
| | | /** |
| | | * 排名更新时间,默认60秒 半小时更新一次 |
| | | * 排名更新时间,默认60秒 半小时更新一次 |
| | | */ |
| | | //private int updateRankMinutes = 60; |
| | | |
| | |
| | | String doCount = msg.getUserProperties("doCount"); |
| | | String correctCount = msg.getUserProperties("correctCount"); |
| | | |
| | | if(cache.get(getCacheIdFromRank(groupId), Integer.class) != null){// 缓存不为空 说明已经处理过 |
| | | if(cache.get(getCacheIdFromRank(groupId), Integer.class) != null){// 缓存不为空 说明已经处理过 |
| | | return; |
| | | } |
| | | |
| | | updateUpdateTime(groupId); |
| | | |
| | | // 更新字段值到exercise_group_extend表 |
| | | // 更新字段值到exercise_group_extend表 |
| | | exerciseVerService.doUpdateExerGroupClsAccuracy(groupId,doCount,correctCount); |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | |
| | | log.error("更新练习组班级正确率失败:" + e, e); |
| | | log.error("更新练习组班级正确率失败:" + e, e); |
| | | |
| | | throw e; |
| | | |
| | |
| | | }*/ |
| | | |
| | | /** |
| | | * 插入缓存记录,标记本次更新排名时间 半小时更新一次 |
| | | * 插入缓存记录,标记本次更新排名时间 半小时更新一次 |
| | | * |
| | | * @param rank |
| | | private void updateUpdateTime(String groupId) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取cacheId |
| | | * 获取cacheId |
| | | * |
| | | * @param rank |
| | | * @return |