Authored by tanling

fix

@@ -11,5 +11,5 @@ public interface ISendPromotionMessage { @@ -11,5 +11,5 @@ public interface ISendPromotionMessage {
11 11
12 SendMessageRspBo inviteCouponSend(String uid, String orderCode, String reward, String firstOrderUid); 12 SendMessageRspBo inviteCouponSend(String uid, String orderCode, String reward, String firstOrderUid);
13 13
14 - SendMessageRspBo assistCouponSend(String uid, String reward); 14 + SendMessageRspBo assistCouponSend(String uid, int couponTime);
15 } 15 }
@@ -6,6 +6,7 @@ import com.yoho.message.sdk.common.model.MessageCenterCommonEvent; @@ -6,6 +6,7 @@ import com.yoho.message.sdk.common.model.MessageCenterCommonEvent;
6 import com.yoho.message.sdk.common.model.SendMessageRspBo; 6 import com.yoho.message.sdk.common.model.SendMessageRspBo;
7 import com.yoho.message.sdk.service.AbstractSendMessage; 7 import com.yoho.message.sdk.service.AbstractSendMessage;
8 import com.yoho.message.sdk.service.promotion.ISendPromotionMessage; 8 import com.yoho.message.sdk.service.promotion.ISendPromotionMessage;
  9 +import com.yoho.message.sdk.utils.DateUtils;
9 import org.springframework.beans.factory.annotation.Autowired; 10 import org.springframework.beans.factory.annotation.Autowired;
10 import org.springframework.stereotype.Service; 11 import org.springframework.stereotype.Service;
11 12
@@ -38,9 +39,9 @@ public class SendPromotionMessageImpl extends AbstractSendMessage implements ISe @@ -38,9 +39,9 @@ public class SendPromotionMessageImpl extends AbstractSendMessage implements ISe
38 return new SendMessageRspBo(200, "SUCCESS"); 39 return new SendMessageRspBo(200, "SUCCESS");
39 } 40 }
40 41
41 - public SendMessageRspBo assistCouponSend(String uid, String reward) { 42 + public SendMessageRspBo assistCouponSend(String uid, int couponTime) {
42 MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(PromotionScenes.ASSSIT_COUPON_SEND, null, uid); 43 MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(PromotionScenes.ASSSIT_COUPON_SEND, null, uid);
43 - messageCenterCommonEvent.putInParams("reward", reward); 44 + messageCenterCommonEvent.putInParams("couponTime", DateUtils.long2DateStr(couponTime, "yyyy-MM-dd HH:mm" ));
44 45
45 messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent); 46 messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
46 return new SendMessageRspBo(200, "SUCCESS"); 47 return new SendMessageRspBo(200, "SUCCESS");
@@ -23,4 +23,28 @@ public interface ISendUserMessage { @@ -23,4 +23,28 @@ public interface ISendUserMessage {
23 * @return <br> 23 * @return <br>
24 */ 24 */
25 SendMessageRspBo membershipUpgrade(String vipLevel, String vipDiscount, String uid); 25 SendMessageRspBo membershipUpgrade(String vipLevel, String vipDiscount, String uid);
  26 +
  27 +
  28 + /**
  29 + * 助力活动开始
  30 + * @param uid
  31 + * @param startTime
  32 + * @return
  33 + */
  34 + SendMessageRspBo assistStart(String uid, String assistId, int startTime);
  35 +
  36 + /**
  37 + * 助力活动还差一人
  38 + * @param uid
  39 + * @return
  40 + */
  41 + SendMessageRspBo assistUidProcess(String uid, String assistId);
  42 +
  43 + /**
  44 + * 助力活动还剩一个小时
  45 + * @param uid
  46 + * @return
  47 + */
  48 + SendMessageRspBo assistExpireProcess(String uid, String assistId);
  49 +
26 } 50 }
1 package com.yoho.message.sdk.service.user.impl; 1 package com.yoho.message.sdk.service.user.impl;
2 2
  3 +import com.yoho.message.sdk.utils.DateUtils;
3 import org.springframework.beans.factory.annotation.Autowired; 4 import org.springframework.beans.factory.annotation.Autowired;
4 import org.springframework.stereotype.Service; 5 import org.springframework.stereotype.Service;
5 6
@@ -34,4 +35,30 @@ public class SendUserMessageImpl extends AbstractSendMessage implements ISendUse @@ -34,4 +35,30 @@ public class SendUserMessageImpl extends AbstractSendMessage implements ISendUse
34 return new SendMessageRspBo(200, "SUCCESS"); 35 return new SendMessageRspBo(200, "SUCCESS");
35 } 36 }
36 37
  38 + @Override
  39 + public SendMessageRspBo assistStart(String uid, String assistId, int startTime) {
  40 +
  41 + MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid);
  42 + messageCenterCommonEvent.putInParams("startTime", DateUtils.long2DateStr(Long.parseLong(String.valueOf(startTime)), "yyyy-MM-dd HH:mm"));
  43 + messageCenterCommonEvent.putInParams("assisId", assistId);
  44 + messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
  45 + return new SendMessageRspBo(200, "SUCCESS");
  46 + }
  47 +
  48 + @Override
  49 + public SendMessageRspBo assistUidProcess(String uid, String assistId) {
  50 + MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid);
  51 + messageCenterCommonEvent.putInParams("assisId", assistId);
  52 + messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
  53 + return new SendMessageRspBo(200, "SUCCESS");
  54 + }
  55 +
  56 + @Override
  57 + public SendMessageRspBo assistExpireProcess(String uid, String assistId) {
  58 + MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid);
  59 + messageCenterCommonEvent.putInParams("assisId", assistId);
  60 + messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
  61 + return new SendMessageRspBo(200, "SUCCESS");
  62 + }
  63 +
37 } 64 }