Authored by tanling

fix

... ... @@ -11,5 +11,5 @@ public interface ISendPromotionMessage {
SendMessageRspBo inviteCouponSend(String uid, String orderCode, String reward, String firstOrderUid);
SendMessageRspBo assistCouponSend(String uid, String reward);
SendMessageRspBo assistCouponSend(String uid, int couponTime);
}
... ...
... ... @@ -6,6 +6,7 @@ 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 com.yoho.message.sdk.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
... ... @@ -38,9 +39,9 @@ public class SendPromotionMessageImpl extends AbstractSendMessage implements ISe
return new SendMessageRspBo(200, "SUCCESS");
}
public SendMessageRspBo assistCouponSend(String uid, String reward) {
public SendMessageRspBo assistCouponSend(String uid, int couponTime) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(PromotionScenes.ASSSIT_COUPON_SEND, null, uid);
messageCenterCommonEvent.putInParams("reward", reward);
messageCenterCommonEvent.putInParams("couponTime", DateUtils.long2DateStr(couponTime, "yyyy-MM-dd HH:mm" ));
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
... ...
... ... @@ -23,4 +23,28 @@ public interface ISendUserMessage {
* @return <br>
*/
SendMessageRspBo membershipUpgrade(String vipLevel, String vipDiscount, String uid);
/**
* 助力活动开始
* @param uid
* @param startTime
* @return
*/
SendMessageRspBo assistStart(String uid, String assistId, int startTime);
/**
* 助力活动还差一人
* @param uid
* @return
*/
SendMessageRspBo assistUidProcess(String uid, String assistId);
/**
* 助力活动还剩一个小时
* @param uid
* @return
*/
SendMessageRspBo assistExpireProcess(String uid, String assistId);
}
... ...
package com.yoho.message.sdk.service.user.impl;
import com.yoho.message.sdk.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
... ... @@ -34,4 +35,30 @@ public class SendUserMessageImpl extends AbstractSendMessage implements ISendUse
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo assistStart(String uid, String assistId, int startTime) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid);
messageCenterCommonEvent.putInParams("startTime", DateUtils.long2DateStr(Long.parseLong(String.valueOf(startTime)), "yyyy-MM-dd HH:mm"));
messageCenterCommonEvent.putInParams("assisId", assistId);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo assistUidProcess(String uid, String assistId) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid);
messageCenterCommonEvent.putInParams("assisId", assistId);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo assistExpireProcess(String uid, String assistId) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid);
messageCenterCommonEvent.putInParams("assisId", assistId);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
}
... ...