Authored by tanling

fix

@@ -40,7 +40,7 @@ public class SendUserMessageImpl extends AbstractSendMessage implements ISendUse @@ -40,7 +40,7 @@ public class SendUserMessageImpl extends AbstractSendMessage implements ISendUse
40 40
41 MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid); 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")); 42 messageCenterCommonEvent.putInParams("startTime", DateUtils.long2DateStr(Long.parseLong(String.valueOf(startTime)), "yyyy-MM-dd HH:mm"));
43 - messageCenterCommonEvent.putInParams("assisId", assistId); 43 + messageCenterCommonEvent.putInParams("assistId", assistId);
44 messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent); 44 messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
45 return new SendMessageRspBo(200, "SUCCESS"); 45 return new SendMessageRspBo(200, "SUCCESS");
46 } 46 }
@@ -48,7 +48,7 @@ public class SendUserMessageImpl extends AbstractSendMessage implements ISendUse @@ -48,7 +48,7 @@ public class SendUserMessageImpl extends AbstractSendMessage implements ISendUse
48 @Override 48 @Override
49 public SendMessageRspBo assistUidProcess(String uid, String assistId) { 49 public SendMessageRspBo assistUidProcess(String uid, String assistId) {
50 MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid); 50 MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid);
51 - messageCenterCommonEvent.putInParams("assisId", assistId); 51 + messageCenterCommonEvent.putInParams("assistId", assistId);
52 messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent); 52 messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
53 return new SendMessageRspBo(200, "SUCCESS"); 53 return new SendMessageRspBo(200, "SUCCESS");
54 } 54 }
@@ -56,7 +56,7 @@ public class SendUserMessageImpl extends AbstractSendMessage implements ISendUse @@ -56,7 +56,7 @@ public class SendUserMessageImpl extends AbstractSendMessage implements ISendUse
56 @Override 56 @Override
57 public SendMessageRspBo assistExpireProcess(String uid, String assistId) { 57 public SendMessageRspBo assistExpireProcess(String uid, String assistId) {
58 MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid); 58 MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.MEMBERSHIP_UPGRADE, null, uid);
59 - messageCenterCommonEvent.putInParams("assisId", assistId); 59 + messageCenterCommonEvent.putInParams("assistId", assistId);
60 messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent); 60 messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
61 return new SendMessageRspBo(200, "SUCCESS"); 61 return new SendMessageRspBo(200, "SUCCESS");
62 } 62 }
  1 +package com.yoho.message.sdk.test;
  2 +
  3 +import com.yoho.message.sdk.service.promotion.ISendPromotionMessage;
  4 +import com.yoho.message.sdk.service.user.ISendUserMessage;
  5 +import org.junit.Test;
  6 +import org.junit.runner.RunWith;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.test.context.ContextConfiguration;
  9 +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  10 +
  11 +/**
  12 + * Created by yoho on 2017/6/27.
  13 + */
  14 +@RunWith(SpringJUnit4ClassRunner.class)
  15 +@ContextConfiguration(locations = { "classpath*:META-INF/spring/test-message-sdk-*.xml" })
  16 +public class TestUserMessage {
  17 +
  18 + @Autowired
  19 + private ISendUserMessage sendPromotionMessage;
  20 +
  21 + @Test
  22 + public void assistStart() {
  23 + sendPromotionMessage.assistStart("54096844", "2", 1517905629);
  24 + }
  25 +
  26 +
  27 + @Test
  28 + public void assistUidProcess() {
  29 + sendPromotionMessage.assistUidProcess("54096844", "2");
  30 + }
  31 +
  32 + @Test
  33 + public void assistExpireProcess() {
  34 + sendPromotionMessage.assistExpireProcess("54096844", "2");
  35 + }
  36 +
  37 +}