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
|
} |