|
|
package com.yoho.message.sdk.service.user.impl;
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.yoho.message.sdk.common.constants.SendScenes;
|
|
|
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.user.ISendUserMessage;
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
* <Description> 用户模块发消息<br>
|
|
|
*
|
|
|
* @author amos.shan<br>
|
|
|
* @version 1.0<br>
|
|
|
* @taskId <br>
|
|
|
* @CreateDate 2016年12月22日 <br>
|
|
|
*/
|
|
|
@Service
|
|
|
public class SendUserMessageImpl extends AbstractSendMessage implements ISendUserMessage {
|
|
|
@Autowired
|
|
|
private MessageCenterMqHandler messageCenterMqHandler;
|
|
|
|
|
|
@Override
|
|
|
public SendMessageRspBo membershipUpgrade(String vipLevel, String vipDiscount, String uid) {
|
|
|
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, String.valueOf(System.currentTimeMillis()), uid);
|
|
|
messageCenterCommonEvent.putInParams("vipLevel", vipLevel);
|
|
|
messageCenterCommonEvent.putInParams("vipDiscount", vipDiscount);
|
|
|
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
|
|
|
|
|
|
return new SendMessageRspBo(200, "SUCCESS");
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|