|
|
package com.yoho.message.sdk.service.user.impl;
|
|
|
|
|
|
import com.yoho.message.sdk.common.constants.UserVipLevelEnum;
|
|
|
import com.yoho.message.sdk.utils.DateUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
...
|
...
|
@@ -53,5 +54,26 @@ public class SendUserMessageImpl extends AbstractSendMessage implements ISendUse |
|
|
return new SendMessageRspBo(200, "SUCCESS");
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public SendMessageRspBo userVipChange(String uid,int oldVipLevel,int currentVipLevel,int expireTime){
|
|
|
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.USER_VIP_CHANGE, String.valueOf(System.currentTimeMillis()), uid);
|
|
|
messageCenterCommonEvent.putInParams("oldVipLevel",UserVipLevelEnum.getNameByValue(oldVipLevel));
|
|
|
messageCenterCommonEvent.putInParams("currentVipLevel", UserVipLevelEnum.getNameByValue(currentVipLevel));
|
|
|
messageCenterCommonEvent.putInParams("expireDate", DateUtils.long2DateStr(expireTime * 1000l, "yyyy-MM-dd"));
|
|
|
messageCenterCommonEvent.putInParams("vipRights", UserVipLevelEnum.getDescByValue(currentVipLevel));
|
|
|
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
|
|
|
return new SendMessageRspBo(200,"SUCCESS");
|
|
|
}
|
|
|
|
|
|
|
|
|
@Override
|
|
|
public SendMessageRspBo userRegisterNotice(String uid,String nickName,int registerTime){
|
|
|
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.USER_REGISTER_NOTICE, String.valueOf(System.currentTimeMillis()), uid);
|
|
|
messageCenterCommonEvent.putInParams("nickName", nickName);
|
|
|
messageCenterCommonEvent.putInParams("registerDate", DateUtils.long2DateStr(registerTime * 1000l, "yyyy-MM-dd"));
|
|
|
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
|
|
|
return new SendMessageRspBo(200,"SUCCESS");
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|