Helius
2022-05-27 4351e71d782741143a98f86f6648acd16689165f
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package com.matrix.system.shopXcx.mqTask;
 
 
import com.alibaba.fastjson.JSONObject;
import com.matrix.component.asyncmessage.MessageHandler;
import com.matrix.system.hive.dao.OnlinebookingDao;
import com.matrix.system.hive.dao.SysShopInfoDao;
import com.matrix.system.shopXcx.dao.ShopProductDao;
import com.matrix.system.shopXcx.dao.ShopWxtemplateMsgDao;
import com.matrix.system.shopXcx.mqTask.templateMsg.AppointmentSuccess;
import com.matrix.system.shopXcx.shopEnum.TemplateMsgType;
import com.rabbitmq.client.DeliverCallback;
import com.rabbitmq.client.Delivery;
import org.springframework.beans.factory.annotation.Autowired;
 
import java.io.IOException;
import java.util.Map;
 
/**
 * 发送预约成功提醒消息
 */
public class TemplateMsgTask implements MessageHandler {
 
    @Autowired
    OnlinebookingDao onlinebookingDao;
    @Autowired
    SysShopInfoDao shopInfoDao;
    @Autowired
    ShopProductDao productDao;
 
    @Autowired
    ShopWxtemplateMsgDao wxtemplateMsgDao;
 
    @Autowired
    AppointmentSuccess appointmentSuccess;
 
 
    @Override
    public String getName() {
        return "发送预约成功提醒消息";
    }
 
    @Override
    public String getRouteKey() {
        return AsyncMessageRouting.ORDER_OUT_SOTORE;
    }
 
    @Override
    public void handle(Map<String,Object> param){
 
        Integer templateMsgType = (Integer) param.get("templateMsgType");
        String content = param.get("content") + "";
 
        if (TemplateMsgType.APPOINTMENT_SUCCESS.getCode().equals(templateMsgType)) {
            appointmentSuccess.sendTemplateMsg(content);
        }
 
 
    }
}