|
|
package com.yoho.message.sdk.service.promotion.impl;
|
|
|
|
|
|
import com.yoho.message.sdk.common.constants.PromotionScenes;
|
|
|
import com.yoho.message.sdk.common.handler.MessageCenterMqHandler;
|
|
|
import com.yoho.message.sdk.common.model.MessageCenterCommonEvent;
|
|
|
import com.yoho.message.sdk.common.model.SendMessageRspBo;
|
|
|
import com.yoho.message.sdk.service.AbstractSendMessage;
|
|
|
import com.yoho.message.sdk.service.promotion.ISendPromotionMessage;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
/**
|
|
|
* Created by yoho on 2017/6/27.
|
|
|
*/
|
|
|
@Service
|
|
|
public class SendPromotionMessageImpl extends AbstractSendMessage implements ISendPromotionMessage {
|
|
|
|
|
|
@Autowired
|
|
|
private MessageCenterMqHandler messageCenterMqHandler;
|
|
|
|
|
|
@Override
|
|
|
public SendMessageRspBo inviteCouponWait(String uid, String orderCode, String reward) {
|
|
|
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(PromotionScenes.INVITE_COUPON_WAIT, orderCode, uid);
|
|
|
messageCenterCommonEvent.putInParams("amount", reward);
|
|
|
|
|
|
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
|
|
|
return new SendMessageRspBo(200, "SUCCESS");
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public SendMessageRspBo inviteCouponSend(String uid, String orderCode, String reward) {
|
|
|
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(PromotionScenes.INVITE_COUPON_SEND, orderCode, uid);
|
|
|
messageCenterCommonEvent.putInParams("amount", reward);
|
|
|
|
|
|
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
|
|
|
return new SendMessageRspBo(200, "SUCCESS");
|
|
|
}
|
|
|
} |
...
|
...
|
|