派生自 projectDept/qhighschool

EricsHu
2022-12-05 068fc7f2e81178e55fa191a13709af64b1a163f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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");
//    }
 
}