package com.qxueyou.scc.school.service.impl; import javax.annotation.PostConstruct; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.stereotype.Service; //import com.aliyun.openservices.ons.api.ConsumeContext; //import com.aliyun.openservices.ons.api.Message; import com.qxueyou.scc.base.dao.CommonDAO; import com.qxueyou.scc.base.service.IONSExceptionLogService; //import com.qxueyou.scc.config.AliOssConfig; //import com.qxueyou.scc.base.service.IONSMsgDealService; //import com.qxueyou.scc.base.service.impl.CommonONSConsumer; //import com.qxueyou.scc.base.util.UUIDUtils; import com.qxueyou.scc.school.service.ILessonService; @Service("VideoIssueStopDealService") public class VideoIssueStopDealService{ //public class VideoIssueStopDealService implements IONSMsgDealService { @Autowired CommonDAO dao; // @Autowired // ICacheService cacheService; @SuppressWarnings("unused") @Autowired private ILessonService lessonService; @Autowired IONSExceptionLogService onsExceptionLogService; @SuppressWarnings("unused") private static Logger log = LogManager.getLogger("ONSExceptionLogService"); @PostConstruct void init() { // CommonONSConsumer.registerHandler("VIDEO_ISSUE_STOP","VideoIssueStopDealService"); } // @Override // public void doHandle(Message msg, ConsumeContext context) { // try { // // String videoId = msg.getUserProperties("videoId"); // String operateType = msg.getUserProperties("operateType"); // // lessonService.doSingleVideoIssueStop(videoId,operateType); // // } catch (Exception e) { // // String businessId = cfg.getConfigByEnv("ons-common-topic") + "-" + UUIDUtils.generateUUID(); // String desp = "jobId:" + msg.getUserProperties("jobId") ; // // log.error( businessId + " :定时器调用视频有效期发布or停用失败:" + e, e); // onsExceptionLogService.logSaveExceptionLog(cfg.getConfigByEnv("ons-common-topic"), "VIDEO_ISSUE_STOP", businessId , desp ); // // } // } }