package com.qxueyou.scc.school.service.impl;
|
|
import org.springframework.stereotype.Component;
|
|
//import com.aliyun.openservices.ons.api.SendResult;
|
//import com.qxueyou.scc.base.model.ONSMsg;
|
//import com.qxueyou.scc.base.model.Result;
|
//import com.qxueyou.scc.base.service.impl.ONSBaseMsgProducer;
|
|
/**
|
* 微商消息ONS发送者
|
* @author zhiyong
|
*
|
*/
|
@Component
|
public class WBONSProducer{
|
//public class WBONSProducer extends ONSBaseMsgProducer {
|
|
|
// public Result sendMsg(ONSMsg msg) {
|
//
|
// try {
|
//
|
// SendResult sendResult = producer.send(msg.toONSMsg());
|
//
|
// return new Result(true,sendResult.getMessageId());
|
//
|
// } catch (Exception e) {
|
// log.error("call WBONSProducer.sendMsg failed:"+msg.toString(),e);
|
// }
|
//
|
// return new Result(false);
|
// }
|
//
|
// @Override
|
// protected String getProducerId() {
|
// return cfg.getConfigByEnv("ons-wb-producer-id");
|
// }
|
//
|
// @Override
|
// public String getTopic() {
|
// return cfg.getConfigByEnv("ons-wb-topic");
|
// }
|
|
}
|