Authored by min.ling

限定商品开售通知

@@ -22,11 +22,12 @@ @@ -22,11 +22,12 @@
22 10、拼团服务号通知增加小程序跳转链接 2018-12-03 ADD BY LM 1.1.0 22 10、拼团服务号通知增加小程序跳转链接 2018-12-03 ADD BY LM 1.1.0
23 11、抽奖用户和拼团下单用户增加发券通知 2019-01-07 ADD BY LM 1.1.1 23 11、抽奖用户和拼团下单用户增加发券通知 2019-01-07 ADD BY LM 1.1.1
24 12、UFO增加调价场景通知 2019-01-29 ADD BY LM 1.1.2 24 12、UFO增加调价场景通知 2019-01-29 ADD BY LM 1.1.2
  25 + 13、限定商品发售通知 2019-03-15 ADD BY LM 1.1.3
25 --> 26 -->
26 <groupId>com.yoho.dsf</groupId> 27 <groupId>com.yoho.dsf</groupId>
27 <artifactId>yoho-message-sdk</artifactId> 28 <artifactId>yoho-message-sdk</artifactId>
28 <name>yoho-message-sdk</name> 29 <name>yoho-message-sdk</name>
29 - <version>1.1.2-SNAPSHOT</version> 30 + <version>1.1.3-SNAPSHOT</version>
30 <packaging>jar</packaging> 31 <packaging>jar</packaging>
31 32
32 <dependencies> 33 <dependencies>
@@ -5,7 +5,7 @@ public enum MiniAppTypeEnum { @@ -5,7 +5,7 @@ public enum MiniAppTypeEnum {
5 NEW_FORCE(1, "新与力", "wxe4f1cbdfd470035d"), // 已经废弃不用了 5 NEW_FORCE(1, "新与力", "wxe4f1cbdfd470035d"), // 已经废弃不用了
6 OFFSHOP(2,"线下店","wx8c854ca3917e9ba8"), 6 OFFSHOP(2,"线下店","wx8c854ca3917e9ba8"),
7 REDMAN_SHOP(3,"红人小店","wx66ecf50a505afefa"), 7 REDMAN_SHOP(3,"红人小店","wx66ecf50a505afefa"),
8 - LIMIT_SELL(4, "限定频道","wx39f299b6485cf97a"), 8 + LIMIT_SELL(4, "限定频道","wxed31f9e8705fb8d1"),
9 GROUP_ORDER(60, "拼团独立小程序","wx207f18be42db9028"); 9 GROUP_ORDER(60, "拼团独立小程序","wx207f18be42db9028");
10 10
11 private String appId; 11 private String appId;
@@ -33,4 +33,7 @@ public final class PromotionScenes { @@ -33,4 +33,7 @@ public final class PromotionScenes {
33 33
34 //成功获得限购码当天提醒 34 //成功获得限购码当天提醒
35 public static final String GET_LIMITCODE_SUCCESS = "GET_LIMITCODE_SUCCESS"; 35 public static final String GET_LIMITCODE_SUCCESS = "GET_LIMITCODE_SUCCESS";
  36 +
  37 + //限定发售商品开始发售提醒
  38 + public static final String LIMIT_PRODUCT_SELL_START = "LIMIT_PRODUCT_SELL_START";
36 } 39 }
@@ -42,4 +42,17 @@ public interface ISendLimitCodeMessage { @@ -42,4 +42,17 @@ public interface ISendLimitCodeMessage {
42 * @return 42 * @return
43 */ 43 */
44 SendMessageRspBo getLimitCodeSuccess(String uid, String productName, String releaseDateTime, String limitProductCode); 44 SendMessageRspBo getLimitCodeSuccess(String uid, String productName, String releaseDateTime, String limitProductCode);
  45 +
  46 +
  47 + /**
  48 + * 获取限购码的用户开售当天提醒
  49 + * @param uid
  50 + * @param mobile 购买者手机号(中间四位*代替)
  51 + * @param productName 商品名称
  52 + * @param productPrice 商品价格
  53 + * @param sellStartTime 发售时间(yyyy-MM-dd HH:mm)
  54 + * @param productSkn 商品skn
  55 + * @return
  56 + */
  57 + SendMessageRspBo limitProductSellStart(String uid,String mobile,String productName,String productPrice,String sellStartTime,String productSkn);
45 } 58 }
1 package com.yoho.message.sdk.service.impl; 1 package com.yoho.message.sdk.service.impl;
2 2
  3 +import com.yoho.message.sdk.common.constants.MiniAppTypeEnum;
3 import com.yoho.message.sdk.common.constants.PromotionScenes; 4 import com.yoho.message.sdk.common.constants.PromotionScenes;
4 import com.yoho.message.sdk.common.handler.MessageCenterMqHandler; 5 import com.yoho.message.sdk.common.handler.MessageCenterMqHandler;
5 import com.yoho.message.sdk.common.model.MessageCenterCommonEvent; 6 import com.yoho.message.sdk.common.model.MessageCenterCommonEvent;
@@ -95,4 +96,26 @@ public class SendlimitCodeMessageImpl extends AbstractSendMessage implements ISe @@ -95,4 +96,26 @@ public class SendlimitCodeMessageImpl extends AbstractSendMessage implements ISe
95 messageCenterMqHandler.sendMessageToMq(centerCommonEvent); 96 messageCenterMqHandler.sendMessageToMq(centerCommonEvent);
96 return new SendMessageRspBo(200, "SUCCESS"); 97 return new SendMessageRspBo(200, "SUCCESS");
97 } 98 }
  99 +
  100 + /**
  101 + * 获取限购码的用户开售当天提醒
  102 + * @param uid
  103 + * @param mobile 购买者手机号(中间四位*代替)
  104 + * @param productName 商品名称
  105 + * @param productPrice 商品价格
  106 + * @param sellStartTime 发售时间(yyyy-MM-dd HH:mm)
  107 + * @param productSkn 商品skn
  108 + * @return
  109 + */
  110 + public SendMessageRspBo limitProductSellStart(String uid,String mobile,String productName,String productPrice,String sellStartTime,String productSkn){
  111 + MessageCenterCommonEvent centerCommonEvent = genMessageCenterCommonEvent(PromotionScenes.LIMIT_PRODUCT_SELL_START,
  112 + String.valueOf(System.currentTimeMillis()), MiniAppTypeEnum.LIMIT_SELL.getCode(), uid);
  113 + centerCommonEvent.putInParams("mobile",mobile);
  114 + centerCommonEvent.putInParams("productName",productName);
  115 + centerCommonEvent.putInParams("productPrice",productPrice);
  116 + centerCommonEvent.putInParams("sellStartTime",sellStartTime);
  117 + centerCommonEvent.putInParams("productSkn",productSkn);
  118 + messageCenterMqHandler.sendMessageToMq(centerCommonEvent);
  119 + return new SendMessageRspBo(200, "SUCCESS");
  120 + }
98 } 121 }
@@ -33,4 +33,9 @@ public class TestLimitCodeMessage { @@ -33,4 +33,9 @@ public class TestLimitCodeMessage {
33 sendLimitCodeMessage.getLimitCodeSuccess("1234567","VANS帅气卫衣","2018-12-01 14:00","ABCDEFG"); 33 sendLimitCodeMessage.getLimitCodeSuccess("1234567","VANS帅气卫衣","2018-12-01 14:00","ABCDEFG");
34 } 34 }
35 35
  36 + @Test
  37 + public void limitProductSellStart(){
  38 + sendLimitCodeMessage.limitProductSellStart("500031566","189****1292","VANS清新卫衣","120","2019-03-28 12:00","52054104");
  39 + }
  40 +
36 } 41 }