Authored by unknown

抽奖拼团用户新增发券通知场景

@@ -20,11 +20,12 @@ @@ -20,11 +20,12 @@
20 8、限定发售服务号模板 2018-11-20 ADD BY LM 1.0.8 20 8、限定发售服务号模板 2018-11-20 ADD BY LM 1.0.8
21 9、砍价新增砍价id参数 2018-11-29 ADD BY LM 1.0.9 21 9、砍价新增砍价id参数 2018-11-29 ADD BY LM 1.0.9
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 --> 24 -->
24 <groupId>com.yoho.dsf</groupId> 25 <groupId>com.yoho.dsf</groupId>
25 <artifactId>yoho-message-sdk</artifactId> 26 <artifactId>yoho-message-sdk</artifactId>
26 <name>yoho-message-sdk</name> 27 <name>yoho-message-sdk</name>
27 - <version>1.1.0-SNAPSHOT</version> 28 + <version>1.1.1-SNAPSHOT</version>
28 <packaging>jar</packaging> 29 <packaging>jar</packaging>
29 30
30 <dependencies> 31 <dependencies>
@@ -107,5 +107,8 @@ public class SendScenes { @@ -107,5 +107,8 @@ public class SendScenes {
107 //退款成功 补加小程序通知 因为同为优先级一,暂新增场景处理 107 //退款成功 补加小程序通知 因为同为优先级一,暂新增场景处理
108 public static final String REFUND_SUCCESS_MINI = "REFUND_SUCCESS_MINI"; 108 public static final String REFUND_SUCCESS_MINI = "REFUND_SUCCESS_MINI";
109 109
  110 + //拼团或者参与yoluck抽奖 无出拼团外订单 发券通知
  111 + public static final String GROUP_COUPON_NOTICE = "GROUP_COUPON_NOTICE";
  112 +
110 113
111 } 114 }
@@ -11,8 +11,6 @@ public interface ISendCrmMessage { @@ -11,8 +11,6 @@ public interface ISendCrmMessage {
11 * @taskId <br> 11 * @taskId <br>
12 * @param uid 12 * @param uid
13 * @param productSkn 13 * @param productSkn
14 - * @param inboxContent  
15 - * @param inboxTypeId  
16 * @param imgUrl 14 * @param imgUrl
17 * @return <br> 15 * @return <br>
18 */ 16 */
@@ -29,4 +27,16 @@ public interface ISendCrmMessage { @@ -29,4 +27,16 @@ public interface ISendCrmMessage {
29 * @return <br> 27 * @return <br>
30 */ 28 */
31 SendMessageRspBo generalSceneMsg(String mobiles, String content); 29 SendMessageRspBo generalSceneMsg(String mobiles, String content);
  30 +
  31 +
  32 + /**
  33 + * 拼团和抽奖无官网订单用户发券通知
  34 + * @param uid
  35 + * @param couponAmount 优惠券金额
  36 + * @param couponDateTime 优惠券发放时间 yyyy-MM-dd HH:mm:ss
  37 + * @param couponExpireDays 优惠券有效天数
  38 + * @return
  39 + */
  40 + SendMessageRspBo sendGroupCouponNotice(String uid,String couponAmount,String couponDateTime,String couponExpireDays);
  41 +
32 } 42 }
1 package com.yoho.message.sdk.service.crm.impl; 1 package com.yoho.message.sdk.service.crm.impl;
2 2
3 -import java.util.Arrays;  
4 -import java.util.List;  
5 -  
6 -import org.apache.commons.lang3.StringUtils;  
7 -import org.springframework.beans.factory.annotation.Autowired;  
8 -import org.springframework.stereotype.Service;  
9 -  
10 import com.yoho.message.sdk.common.constants.SendScenes; 3 import com.yoho.message.sdk.common.constants.SendScenes;
11 import com.yoho.message.sdk.common.handler.MessageCenterMqHandler; 4 import com.yoho.message.sdk.common.handler.MessageCenterMqHandler;
12 import com.yoho.message.sdk.common.model.MessageCenterCommonEvent; 5 import com.yoho.message.sdk.common.model.MessageCenterCommonEvent;
13 import com.yoho.message.sdk.common.model.SendMessageRspBo; 6 import com.yoho.message.sdk.common.model.SendMessageRspBo;
14 import com.yoho.message.sdk.service.AbstractSendMessage; 7 import com.yoho.message.sdk.service.AbstractSendMessage;
15 import com.yoho.message.sdk.service.crm.ISendCrmMessage; 8 import com.yoho.message.sdk.service.crm.ISendCrmMessage;
  9 +import org.apache.commons.lang3.StringUtils;
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.stereotype.Service;
  12 +
  13 +import java.util.Arrays;
  14 +import java.util.List;
16 15
17 @Service 16 @Service
18 public class SendCrmMessageImpl extends AbstractSendMessage implements ISendCrmMessage { 17 public class SendCrmMessageImpl extends AbstractSendMessage implements ISendCrmMessage {
@@ -62,4 +61,23 @@ public class SendCrmMessageImpl extends AbstractSendMessage implements ISendCrmM @@ -62,4 +61,23 @@ public class SendCrmMessageImpl extends AbstractSendMessage implements ISendCrmM
62 } 61 }
63 return new SendMessageRspBo(200, "SUCCESS"); 62 return new SendMessageRspBo(200, "SUCCESS");
64 } 63 }
  64 +
  65 + /**
  66 + * 拼团和抽奖无官网订单用户发券通知
  67 + * @param uid
  68 + * @param couponAmount 优惠券金额
  69 + * @param couponDateTime 优惠券发放时间 yyyy-MM-dd HH:mm:ss
  70 + * @param couponExpireDays 优惠券有效天数
  71 + * @return
  72 + */
  73 + public SendMessageRspBo sendGroupCouponNotice(String uid,String couponAmount,String couponDateTime,String couponExpireDays){
  74 + MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.GROUP_COUPON_NOTICE, uid, uid);
  75 + messageCenterCommonEvent.putInParams("couponAmount", couponAmount);
  76 + messageCenterCommonEvent.putInParams("couponDateTime", couponDateTime);
  77 + messageCenterCommonEvent.putInParams("couponExpireDays", couponExpireDays);
  78 + messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
  79 + return new SendMessageRspBo(200, "SUCCESS");
  80 + }
  81 +
  82 +
65 } 83 }