Authored by unknown

线下店增加地址入参

... ... @@ -16,7 +16,7 @@
4、线下店潮流课堂预约、开课模板 2018-09-10 ADD BY LM 1.0.3
5、有货有赚服务号消息模板 2018-09-21 ADD BY LM 1.0.4
6、线下店预约提醒更改开始结束时间为字符串 2018-10-30 ADD BY LM 1.0.5
7、拼团购-砍价5期小程序消息模板 2018-11-03 ADD BY LM 1.0.6
7、拼团购-砍价5期小程序消息模板,线下店修改地址参数 2018-11-14 ADD BY LM 1.0.6
-->
<groupId>com.yoho.dsf</groupId>
<artifactId>yoho-message-sdk</artifactId>
... ...
... ... @@ -51,6 +51,8 @@ public class OfflineShopScenes {
*/
public static String APPOINT_START_REMIND = "APPOINT_START_REMIND";
public static String DEFAULT_ADDRESS = "南京市中山路100号IST艾尚天地A座1F-2F YOHO!STORE店";
}
... ...
... ... @@ -15,9 +15,10 @@ public interface IOfflineShopMessage {
* @param endTime 限定活动结束时间
* @param isAB AB类为小程序限定发售详情页,CD类活动详情页
* @param miniPathParam 小程序页面路径的参数
* @param address 地址
* @return
*/
SendMessageRspBo reserveRemindForAllFans(String activityName, String startTime, String endTime, boolean isAB, String miniPathParam);
SendMessageRspBo reserveRemindForAllFans(String activityName, String startTime, String endTime, boolean isAB, String miniPathParam,String address);
/**
... ... @@ -28,9 +29,10 @@ public interface IOfflineShopMessage {
* @param startTime
* @param endTime
* @param activityId 用于小程序跳转
* @param address
* @return
*/
SendMessageRspBo realNameRegisterRemind(List<String> uids, String activityName, int startTime, int endTime, String activityId);
SendMessageRspBo realNameRegisterRemind(List<String> uids, String activityName, int startTime, int endTime, String activityId, String address);
/**
... ...
... ... @@ -10,6 +10,7 @@ import com.yoho.message.sdk.service.IOfflineShopMessage;
import com.yoho.message.sdk.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.util.List;
... ... @@ -27,9 +28,10 @@ public class OfflineShopMessageImpl extends AbstractSendMessage implements IOffl
* @param endTime 限定活动结束时间
* @param isAB 公众消息跳转的小程序路径
* @param miniPathParam 小程序页面参数
* @param address
* @return
*/
public SendMessageRspBo reserveRemindForAllFans(String activityName, String startTime, String endTime, boolean isAB, String miniPathParam) {
public SendMessageRspBo reserveRemindForAllFans(String activityName, String startTime, String endTime, boolean isAB, String miniPathParam,String address) {
String scene = isAB ? OfflineShopScenes.RESERVE_REMIND_AB : OfflineShopScenes.RESERVE_REMIND_CD;
// 指定线下店公众号
... ... @@ -40,6 +42,7 @@ public class OfflineShopMessageImpl extends AbstractSendMessage implements IOffl
messageCenterCommonEvent.putInParams("startTime", startTime);
messageCenterCommonEvent.putInParams("endTime", endTime);
messageCenterCommonEvent.putInParams("miniPathParam", miniPathParam);
messageCenterCommonEvent.putInParams("address", StringUtils.isEmpty(address) ? OfflineShopScenes.DEFAULT_ADDRESS : address);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
... ... @@ -52,9 +55,10 @@ public class OfflineShopMessageImpl extends AbstractSendMessage implements IOffl
* @param startTime
* @param endTime
* @param activityId
* @param address
* @return
*/
public SendMessageRspBo realNameRegisterRemind(List<String> uids, String activityName, int startTime, int endTime, String activityId) {
public SendMessageRspBo realNameRegisterRemind(List<String> uids, String activityName, int startTime, int endTime, String activityId,String address) {
// 指定线下店小程序
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(OfflineShopScenes.REALNAME_REGISTER_REMIND,
String.valueOf(System.currentTimeMillis()), PublicNumberConstants.OFF_SHOP_MINIPROGRAM, PublicNumberConstants.OFF_SHOP_SERVICE, uids);
... ... @@ -64,7 +68,7 @@ public class OfflineShopMessageImpl extends AbstractSendMessage implements IOffl
DateUtils.long2DateStr(startTime * 1000l, DateUtils.DateTimeFormat) +
"-"+ DateUtils.long2DateStr(endTime * 1000l, DateUtils.DateTimeFormat));
messageCenterCommonEvent.putInParams("activityId", activityId);
messageCenterCommonEvent.putInParams("address", StringUtils.isEmpty(address) ? OfflineShopScenes.DEFAULT_ADDRESS : address);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
... ...
... ... @@ -27,7 +27,7 @@ public class TestOfflineShopMessage {
@Test
public void reserveRemineForAllFans() {
offlineShopMessage.reserveRemindForAllFans("线下店王大锤测试活动",
"", "", false, "123");
"", "", false, "123","");
}
@Test
... ... @@ -56,7 +56,7 @@ public class TestOfflineShopMessage {
List<String> uids = new ArrayList<>();
uids.add("500031478");
offlineShopMessage.realNameRegisterRemind(uids, "中国李宁LI-NING蝴蝶鞋2018NYFW男款线上线下同步发售!",
1517905629, 1517905629, "12");
1517905629, 1517905629, "12","");
}
@Test
... ...