Authored by min.ling

UFO交易相关通知场景

... ... @@ -5,7 +5,7 @@
<parent>
<groupId>com.yoho</groupId>
<artifactId>parent</artifactId>
<version>1.5.3-SNAPSHOT</version>
<version>1.5.6-SNAPSHOT</version>
</parent>
<!--
... ... @@ -24,11 +24,12 @@
12、UFO增加调价场景通知 2019-01-29 ADD BY LM 1.1.2
13、限定商品发售通知,UFO更低出售价提醒 2019-03-21 ADD BY LM 1.1.3
14、UFO卖家取消和平台鉴定不通过交易关闭提醒 2019-04-24 ADD BY LM 1.1.4
15、UFO交易相关七个场景提醒 2019-05-08 ADD BY LM 1.1.5
-->
<groupId>com.yoho.dsf</groupId>
<artifactId>yoho-message-sdk</artifactId>
<name>yoho-message-sdk</name>
<version>1.1.4-SNAPSHOT</version>
<version>1.1.5-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
... ...
... ... @@ -21,4 +21,25 @@ public class UFOScenes {
//拼台鉴定不通过 交易关闭
public static final String UFO_PLAT_NOT_PASS = "UFO_PLAT_NOT_PASS";
//鉴定通过瑕疵待买家确认
public static final String UFO_BUYER_FLAW_CONFIRM = "UFO_BUYER_FLAW_CONFIRM";
//无法鉴定 交易关闭
public static final String UFO_IDENTIFY_FAIL = "UFO_IDENTIFY_FAIL";
//sku 被下架提醒
public static final String UFO_SKU_CLOSE = "UFO_SKU_CLOSE";
//买家支付订单(或预售订单) 提醒卖家发货
public static final String UFO_SELLER_GOODS_SEND = "UFO_SELLER_GOODS_SEND";
//卖家发货前买家取消预售订单 通知卖家
public static final String UFO_BUYER_CANCEL_BOOKING = "UFO_BUYER_CANCEL_BOOKING";
//卖家发货前买家取消订单 通知卖家
public static final String UFO_BUYER_CANCEL = "UFO_BUYER_CANCEL";
//卖家已发货 买家取消 通知卖家
public static final String UFO_BUYER_CANCEL_SENDED = "UFO_BUYER_CANCEL_SENDED";
}
... ...
... ... @@ -55,4 +55,78 @@ public interface IUFOSendService {
* @return
*/
SendMessageRspBo platformNotPass(String uid,String orderCode);
/**
* 鉴定通过 瑕疵待买家确认
* @param uid
* @param orderCode
* @return
*/
SendMessageRspBo buyerFlawConfirm(String uid,String orderCode);
/**
* 无法鉴定 交易关闭
* @param uid
* @param orderCode
* @return
*/
SendMessageRspBo identifyFail(String uid,String orderCode);
/**
* sku 被下架提醒卖家
* @param uid
* @param productName
* @param size
* @param goodsNumber
* @return
*/
SendMessageRspBo skuClosedNotice(String uid,String productName,String size,String goodsNumber);
/**
* 买家支付订单(或预售订单) 提醒卖家发货
* @param uid
* @param orderCode
* @param productName
* @param size
* @param goodsNumber
* @param limitTimeStr
* @return
*/
SendMessageRspBo sellerGoodsSend(String uid,String orderCode,String productName,String size,String goodsNumber,String limitTimeStr);
/**
* 卖家发货前买家取消预售订单 通知卖家
* @param uid
* @param orderCode
* @param productName
* @param size
* @param goodsNumber
* @return
*/
SendMessageRspBo buyerCancelBooking(String uid,String orderCode,String productName,String size,String goodsNumber);
/**
* 卖家发货前买家取消订单 通知卖家
* @param uid
* @param orderCode
* @param productName
* @param size
* @param goodsNumber
* @return
*/
SendMessageRspBo buyerCancel(String uid,String orderCode,String productName,String size,String goodsNumber);
/**
* 卖家已发货 买家取消 通知卖家
* @param uid
* @param orderCode
* @param productName
* @param size
* @param goodsNumber
* @return
*/
SendMessageRspBo buyerCancelSend(String uid,String orderCode,String productName,String size,String goodsNumber);
}
... ...
... ... @@ -90,4 +90,75 @@ public class UFOSendServiceImpl implements IUFOSendService{
messageCenterMqHandler.sendMessageToMq(commonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo buyerFlawConfirm(String uid, String orderCode) {
MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_BUYER_FLAW_CONFIRM,uid,0,uid);
commonEvent.putInParams("orderCode",orderCode);
messageCenterMqHandler.sendMessageToMq(commonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo identifyFail(String uid, String orderCode) {
MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_IDENTIFY_FAIL,uid,0,uid);
commonEvent.putInParams("orderCode",orderCode);
messageCenterMqHandler.sendMessageToMq(commonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo skuClosedNotice(String uid, String productName, String size, String goodsNumber) {
MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_SKU_CLOSE,uid,0,uid);
commonEvent.putInParams("productName",productName);
commonEvent.putInParams("size",size);
commonEvent.putInParams("goodsNumber",goodsNumber);
messageCenterMqHandler.sendMessageToMq(commonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo sellerGoodsSend(String uid, String orderCode, String productName, String size, String goodsNumber, String limitTimeStr) {
MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_SELLER_GOODS_SEND,uid,0,uid);
commonEvent.putInParams("orderCode",orderCode);
commonEvent.putInParams("productName",productName);
commonEvent.putInParams("size",size);
commonEvent.putInParams("goodsNumber",goodsNumber);
commonEvent.putInParams("limitTimeStr",limitTimeStr);
messageCenterMqHandler.sendMessageToMq(commonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo buyerCancelBooking(String uid, String orderCode, String productName, String size, String goodsNumber) {
MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_BUYER_CANCEL_BOOKING,uid,0,uid);
commonEvent.putInParams("orderCode",orderCode);
commonEvent.putInParams("productName",productName);
commonEvent.putInParams("size",size);
commonEvent.putInParams("goodsNumber",goodsNumber);
messageCenterMqHandler.sendMessageToMq(commonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo buyerCancel(String uid, String orderCode, String productName, String size, String goodsNumber) {
MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_BUYER_CANCEL,uid,0,uid);
commonEvent.putInParams("orderCode",orderCode);
commonEvent.putInParams("productName",productName);
commonEvent.putInParams("size",size);
commonEvent.putInParams("goodsNumber",goodsNumber);
messageCenterMqHandler.sendMessageToMq(commonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
@Override
public SendMessageRspBo buyerCancelSend(String uid, String orderCode, String productName, String size, String goodsNumber) {
MessageCenterCommonEvent commonEvent = genMessageCenterCommonEvent(UFOScenes.UFO_BUYER_CANCEL_SENDED,uid,0,uid);
commonEvent.putInParams("orderCode",orderCode);
commonEvent.putInParams("productName",productName);
commonEvent.putInParams("size",size);
commonEvent.putInParams("goodsNumber",goodsNumber);
messageCenterMqHandler.sendMessageToMq(commonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
}
... ...
... ... @@ -32,10 +32,9 @@ public class TestUFOMessage {
ufoSendService.sendLessPrice("500031566","VANS帆布鞋","12.5","BF006","200","22017135957");
}
@Test
public void sellerCancelTrade(){
ufoSendService.sellerCancelTrade("500031566", "9901975756610");
ufoSendService.sellerCancelTrade("600043484", "9901975756610");
}
@Test
... ... @@ -44,5 +43,40 @@ public class TestUFOMessage {
}
@Test
public void buyerFlawConfirm(){
ufoSendService.buyerFlawConfirm("500031566", "9901975756610");
}
@Test
public void identifyFail(){
ufoSendService.identifyFail("500031566", "9901975756610");
}
@Test
public void skuClosedNotice(){
ufoSendService.skuClosedNotice("500031566", "VANS连衣裙", "32", "A001");
}
@Test
public void sellerGoodsSend(){
ufoSendService.sellerGoodsSend("500031566", "9901975756610","VANS连衣裙","32","A001","32小时");
}
@Test
public void buyerCancelBooking(){
ufoSendService.buyerCancelBooking("500031566", "9901975756610", "VANS连衣裙", "32", "A001");
}
@Test
public void buyerCancel(){
ufoSendService.buyerCancel("500031566", "9901975756610", "VANS连衣裙", "32", "A001");
}
@Test
public void buyerCancelSend(){
ufoSendService.buyerCancelSend("500031566", "9901975756610","VANS连衣裙","32","A001");
}
}
... ...