package com.qxueyou.scc.exercise.service.impl; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.qxueyou.scc.exercise.service.IExerciseVerService; /*import com.qxueyou.scc.base.model.Constants; import com.qxueyou.scc.base.model.Result; import com.qxueyou.scc.base.service.ICacheService; import com.qxueyou.scc.exercise.model.ExerciseSubmitAnswerData; import com.qxueyou.scc.exercise.service.IExerciseVerService; import com.qxueyou.scc.msg.model.Message;*/ /** * Á·Ï°ÌâĿȫվͳ¼Æ ¸öÈËͳ¼Æ * @author zhiyong * */ @Service("ExerciseItemStatisticsDealService") public class ExerciseItemStatisticsDealService{ // /** »º´æservice */ // @Autowired // ICacheService cacheService; /** Á·Ï°½Ó¿Úservice */ @Autowired IExerciseVerService exerciseVerService; @SuppressWarnings("unused") private static final Logger log = LogManager.getLogger("ExerciseItemStatisticsDealService"); // @PostConstruct // void init() { // // CommonONSConsumer.registerHandler("USER_EXER_ITEM_STATIS", "ExerciseItemStatisticsDealService"); // // } // @Override // public void doHandle(Message msg, ConsumeContext context) { // try { // String userId = msg.getUserProperties("userId"); // String userName = msg.getUserProperties("userName"); // String currTime = msg.getUserProperties("currTime"); // String exerciseGroupId = msg.getUserProperties("groupId"); // // // String key = Constants.EXER_ITEM_STATISTICAL_CACHE_KEY // + userId + exerciseGroupId + currTime; // // // »ñÈ¡´ð°¸¼¯ºÏ // ExerciseSubmitAnswerData answerData = cacheService.get(key, ExerciseSubmitAnswerData.class); // //log.error("Á·Ï°¸öÈËȫվͳ¼Æ¿ªÊ¼---------exerItemIdMap="+exerItemIdMap); // if(answerData == null){ // return; // } // Result result = exerciseVerService.doStatisUserExerciseItemData(userId, userName, answerData); // // if(result.isSuccess()){ // cacheService.delete(key); // } // // } catch (Exception e) { // // log.error("¸üÐÂÓû§Á·Ï°¸öÈËͳ¼ÆÈ«Õ¾Í³¼ÆÊý¾Ýʧ°Ü:" + e, e); // // throw e; // } // } }