wzy
2022-10-09 99091a8cbb8e098575c75a7c640b568addbcc29d
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/TemplateMsgTask.java
@@ -2,6 +2,7 @@
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;
@@ -13,11 +14,12 @@
import org.springframework.beans.factory.annotation.Autowired;
import java.io.IOException;
import java.util.Map;
/**
 * 发送预约成功提醒消息
 */
public class TemplateMsgTask implements DeliverCallback {
public class TemplateMsgTask implements MessageHandler {
    @Autowired
    OnlinebookingDao onlinebookingDao;
@@ -34,12 +36,20 @@
    @Override
    public void handle(String consumerTag, Delivery message) throws IOException {
    public String getName() {
        return "发送预约成功提醒消息";
    }
        String msg = new String(message.getBody(), "UTF-8");
        JSONObject object = JSONObject.parseObject(msg);
        Integer templateMsgType = (Integer) object.get("templateMsgType");
        String content = object.get("content") + "";
    @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);