Authored by min.ling

UFO更低出售价通知

... ... @@ -22,7 +22,7 @@
10、拼团服务号通知增加小程序跳转链接 2018-12-03 ADD BY LM 1.1.0
11、抽奖用户和拼团下单用户增加发券通知 2019-01-07 ADD BY LM 1.1.1
12、UFO增加调价场景通知 2019-01-29 ADD BY LM 1.1.2
13、限定商品发售通知 2019-03-15 ADD BY LM 1.1.3
13、限定商品发售通知,UFO更低出售价提醒 2019-03-21 ADD BY LM 1.1.3
-->
<groupId>com.yoho.dsf</groupId>
<artifactId>yoho-message-sdk</artifactId>
... ...
... ... @@ -9,4 +9,10 @@ public class UFOScenes {
//调价通知
public static final String UFO_PRICE_ADJUST = "UFO_PRICE_ADJUST";
//更低出售价提醒 商家已入驻
public static final String UFO_LESS_PRICE_ENTER = "UFO_LESS_PRICE_ENTER";
//更低出售价提醒 商家未入驻
public static final String UFO_LESS_PRICE = "UFO_LESS_PRICE";
}
... ...
... ... @@ -16,4 +16,27 @@ public interface IUFOSendService {
*/
SendMessageRspBo sendAdjustPrice(String uid,int productCount);
/**
* 更低出售价提醒 商家已入驻
* @param uid
* @param productName 商品名称
* @param size 尺寸
* @param goodsNumber 货号
* @param salePrice 提醒的更低售价
* @param productSkn 商品skn
* @return
*/
SendMessageRspBo sendLessPriceEnter(String uid,String productName,String size,String goodsNumber,String salePrice,String productSkn);
/**
* 更低出售价提醒 商家未入驻
* @param uid
* @param productName 商品名称
* @param size 尺寸
* @param goodsNumber 货号
* @param salePrice 提醒的更低售价
* @param orderCode 订单编号
* @return
*/
SendMessageRspBo sendLessPrice(String uid,String productName,String size,String goodsNumber,String salePrice,String orderCode);
}
... ...
... ... @@ -32,4 +32,47 @@ public class UFOSendServiceImpl implements IUFOSendService{
List<String> uids = Collections.singletonList(uid);
return new MessageCenterCommonEvent(sendScene, sendSceneKey,miniappType, uids);
}
/**
* 更低出售价提醒 商家已入驻
* @param uid
* @param productName 商品名称
* @param size 尺寸
* @param goodsNumber 货号
* @param salePrice 提醒的更低售价
* @param productSkn 商品skn
* @return
*/
public SendMessageRspBo sendLessPriceEnter(String uid,String productName,String size,String goodsNumber,String salePrice,String productSkn){
MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_LESS_PRICE_ENTER,uid,0,uid);
commonEvent.putInParams("productName",productName);
commonEvent.putInParams("size",size);
commonEvent.putInParams("goodsNumber",goodsNumber);
commonEvent.putInParams("productSkn",productSkn);
commonEvent.putInParams("salePrice",salePrice);
messageCenterMqHandler.sendMessageToMq(commonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
/**
* 更低出售价提醒 商家未入驻
* @param uid
* @param productName 商品名称
* @param size 尺寸
* @param goodsNumber 货号
* @param salePrice 提醒的更低售价
* @param orderCode 订单编号
* @return
*/
public SendMessageRspBo sendLessPrice(String uid,String productName,String size,String goodsNumber,String salePrice,String orderCode){
MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_LESS_PRICE,uid,0,uid);
commonEvent.putInParams("productName",productName);
commonEvent.putInParams("size",size);
commonEvent.putInParams("goodsNumber",goodsNumber);
commonEvent.putInParams("orderCode",orderCode);
commonEvent.putInParams("salePrice",salePrice);
messageCenterMqHandler.sendMessageToMq(commonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
}
... ...
... ... @@ -22,5 +22,16 @@ public class TestUFOMessage {
ufoSendService.sendAdjustPrice("500031566",10);
}
@Test
public void sendLessPriceEnter(){
ufoSendService.sendLessPriceEnter("500031566","VANS小清新线衣","12.5","A006","200","52054104");
}
@Test
public void sendLessPrice(){
ufoSendService.sendLessPrice("500031566","VANS帆布鞋","12.5","BF006","200","22017135957");
}
}
... ...