Authored by min.ling

UFO更低出售价通知

@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
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 + 13、限定商品发售通知,UFO更低出售价提醒 2019-03-21 ADD BY LM 1.1.3
26 --> 26 -->
27 <groupId>com.yoho.dsf</groupId> 27 <groupId>com.yoho.dsf</groupId>
28 <artifactId>yoho-message-sdk</artifactId> 28 <artifactId>yoho-message-sdk</artifactId>
@@ -9,4 +9,10 @@ public class UFOScenes { @@ -9,4 +9,10 @@ public class UFOScenes {
9 //调价通知 9 //调价通知
10 public static final String UFO_PRICE_ADJUST = "UFO_PRICE_ADJUST"; 10 public static final String UFO_PRICE_ADJUST = "UFO_PRICE_ADJUST";
11 11
  12 + //更低出售价提醒 商家已入驻
  13 + public static final String UFO_LESS_PRICE_ENTER = "UFO_LESS_PRICE_ENTER";
  14 +
  15 + //更低出售价提醒 商家未入驻
  16 + public static final String UFO_LESS_PRICE = "UFO_LESS_PRICE";
  17 +
12 } 18 }
@@ -16,4 +16,27 @@ public interface IUFOSendService { @@ -16,4 +16,27 @@ public interface IUFOSendService {
16 */ 16 */
17 SendMessageRspBo sendAdjustPrice(String uid,int productCount); 17 SendMessageRspBo sendAdjustPrice(String uid,int productCount);
18 18
  19 + /**
  20 + * 更低出售价提醒 商家已入驻
  21 + * @param uid
  22 + * @param productName 商品名称
  23 + * @param size 尺寸
  24 + * @param goodsNumber 货号
  25 + * @param salePrice 提醒的更低售价
  26 + * @param productSkn 商品skn
  27 + * @return
  28 + */
  29 + SendMessageRspBo sendLessPriceEnter(String uid,String productName,String size,String goodsNumber,String salePrice,String productSkn);
  30 +
  31 + /**
  32 + * 更低出售价提醒 商家未入驻
  33 + * @param uid
  34 + * @param productName 商品名称
  35 + * @param size 尺寸
  36 + * @param goodsNumber 货号
  37 + * @param salePrice 提醒的更低售价
  38 + * @param orderCode 订单编号
  39 + * @return
  40 + */
  41 + SendMessageRspBo sendLessPrice(String uid,String productName,String size,String goodsNumber,String salePrice,String orderCode);
19 } 42 }
@@ -32,4 +32,47 @@ public class UFOSendServiceImpl implements IUFOSendService{ @@ -32,4 +32,47 @@ public class UFOSendServiceImpl implements IUFOSendService{
32 List<String> uids = Collections.singletonList(uid); 32 List<String> uids = Collections.singletonList(uid);
33 return new MessageCenterCommonEvent(sendScene, sendSceneKey,miniappType, uids); 33 return new MessageCenterCommonEvent(sendScene, sendSceneKey,miniappType, uids);
34 } 34 }
  35 +
  36 + /**
  37 + * 更低出售价提醒 商家已入驻
  38 + * @param uid
  39 + * @param productName 商品名称
  40 + * @param size 尺寸
  41 + * @param goodsNumber 货号
  42 + * @param salePrice 提醒的更低售价
  43 + * @param productSkn 商品skn
  44 + * @return
  45 + */
  46 + public SendMessageRspBo sendLessPriceEnter(String uid,String productName,String size,String goodsNumber,String salePrice,String productSkn){
  47 + MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_LESS_PRICE_ENTER,uid,0,uid);
  48 + commonEvent.putInParams("productName",productName);
  49 + commonEvent.putInParams("size",size);
  50 + commonEvent.putInParams("goodsNumber",goodsNumber);
  51 + commonEvent.putInParams("productSkn",productSkn);
  52 + commonEvent.putInParams("salePrice",salePrice);
  53 + messageCenterMqHandler.sendMessageToMq(commonEvent);
  54 + return new SendMessageRspBo(200, "SUCCESS");
  55 + }
  56 +
  57 +
  58 + /**
  59 + * 更低出售价提醒 商家未入驻
  60 + * @param uid
  61 + * @param productName 商品名称
  62 + * @param size 尺寸
  63 + * @param goodsNumber 货号
  64 + * @param salePrice 提醒的更低售价
  65 + * @param orderCode 订单编号
  66 + * @return
  67 + */
  68 + public SendMessageRspBo sendLessPrice(String uid,String productName,String size,String goodsNumber,String salePrice,String orderCode){
  69 + MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_LESS_PRICE,uid,0,uid);
  70 + commonEvent.putInParams("productName",productName);
  71 + commonEvent.putInParams("size",size);
  72 + commonEvent.putInParams("goodsNumber",goodsNumber);
  73 + commonEvent.putInParams("orderCode",orderCode);
  74 + commonEvent.putInParams("salePrice",salePrice);
  75 + messageCenterMqHandler.sendMessageToMq(commonEvent);
  76 + return new SendMessageRspBo(200, "SUCCESS");
  77 + }
35 } 78 }
@@ -22,5 +22,16 @@ public class TestUFOMessage { @@ -22,5 +22,16 @@ public class TestUFOMessage {
22 ufoSendService.sendAdjustPrice("500031566",10); 22 ufoSendService.sendAdjustPrice("500031566",10);
23 } 23 }
24 24
  25 + @Test
  26 + public void sendLessPriceEnter(){
  27 + ufoSendService.sendLessPriceEnter("500031566","VANS小清新线衣","12.5","A006","200","52054104");
  28 + }
  29 +
  30 + @Test
  31 + public void sendLessPrice(){
  32 + ufoSendService.sendLessPrice("500031566","VANS帆布鞋","12.5","BF006","200","22017135957");
  33 + }
  34 +
  35 +
25 } 36 }
26 37