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.stereotype.Service; import com.qxueyou.scc.base.service.IONSExceptionLogService; //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.IHandoutService; /** * pdf 转图片相关消息 * * @author charkraMin * */ @Service("HandoutConvertPDFDealService") public class HandoutConvertPDFDealService{ //public class HandoutConvertPDFDealService implements IONSMsgDealService { @Autowired IHandoutService handoutService; @Autowired IONSExceptionLogService onsExceptionLogService; @SuppressWarnings("unused") private static Logger log = LogManager.getLogger("ONSExceptionLogService"); @PostConstruct void init() { // CommonONSConsumer.registerHandler("CONVERT_PDF", "HandoutConvertPDFDealService"); } // @Override // public void doHandle(Message msg, ConsumeContext context) { // // try { // String handoutId = msg.getUserProperties("handoutId"); // String fullPath = msg.getUserProperties("fullPath"); // String module = msg.getUserProperties("module"); // String userId = msg.getUserProperties("userId"); // // handoutService.insertHandoutPages(fullPath, handoutId, module, userId, "PDF"); // }catch(Exception e){ // // String businessId = cfg.getConfigByEnv("ons-common-topic") + "-" + UUIDUtils.generateUUID(); // String desp = "handoutId:" + msg.getUserProperties("handoutId") // + ";fullPath:" + msg.getUserProperties("fullPath") // + ";module:" + msg.getUserProperties("module") // + ";classId:" + msg.getUserProperties("classId") // + ";userId:" + msg.getUserProperties("userId"); // // log.error( businessId + " :转码PDF讲义失败:" + e, e); // onsExceptionLogService.logSaveExceptionLog(cfg.getConfigByEnv("ons-common-topic"), "CONVERT_PDF", businessId , desp ); // } // } }