Authored by Wang

增加被推荐人的uid

... ... @@ -7,7 +7,7 @@ import com.yoho.message.sdk.common.model.SendMessageRspBo;
*/
public interface ISendPromotionMessage {
SendMessageRspBo inviteCouponWait(String uid, String orderCode, String reward);
SendMessageRspBo inviteCouponWait(String uid, String orderCode, String reward, String firstOrderUid);
SendMessageRspBo inviteCouponSend(String uid, String orderCode, String reward);
SendMessageRspBo inviteCouponSend(String uid, String orderCode, String reward, String firstOrderUid);
}
... ...
... ... @@ -19,18 +19,20 @@ public class SendPromotionMessageImpl extends AbstractSendMessage implements ISe
private MessageCenterMqHandler messageCenterMqHandler;
@Override
public SendMessageRspBo inviteCouponWait(String uid, String orderCode, String reward) {
public SendMessageRspBo inviteCouponWait(String uid, String orderCode, String reward, String firstOrderUid) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(PromotionScenes.INVITE_COUPON_WAIT, orderCode, uid);
messageCenterCommonEvent.putInParams("amount", reward);
messageCenterCommonEvent.putInParams("firstOrderUid", firstOrderUid);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo inviteCouponSend(String uid, String orderCode, String reward) {
public SendMessageRspBo inviteCouponSend(String uid, String orderCode, String reward, String firstOrderUid) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(PromotionScenes.INVITE_COUPON_SEND, orderCode, uid);
messageCenterCommonEvent.putInParams("amount", reward);
messageCenterCommonEvent.putInParams("firstOrderUid", firstOrderUid);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
... ...
... ... @@ -19,11 +19,11 @@ public class TestPromotionMessage {
@Test
public void testInviteCouponWait() {
sendPromotionMessage.inviteCouponWait("8041612", "1234567", "50元优惠券");
sendPromotionMessage.inviteCouponWait("50002614", "170183676", "50元优惠券", "1234567");
}
@Test
public void testInviteCouponSend() {
sendPromotionMessage.inviteCouponSend("8041612", "1234567", "50元优惠券");
sendPromotionMessage.inviteCouponSend("50002614", "1234567", "50元优惠券", "1234567");
}
}
... ...