Authored by wangxin

新增订单发货收件人也是有货用户场景

... ... @@ -51,8 +51,12 @@ public class SendScenes {
//订单发货新场景,区别于旧场景
public static final String ORDER_SEND_OUT_NEW = "ORDER_SEND_OUT_NEW";
//订单发货新场景,收货人也是yoho用户
public static final String ORDER_SEND_OUT_OTHER = "ORDER_SEND_OUT_OTHER";
//订单发货通知,发分仓
public static final String ORDER_SEND_OUT_WAREHOUSE = "ORDER_SEND_OUT_WAREHOUSE";
//订单发货通知,发分仓,收货人也是yoho用户
public static final String ORDER_SEND_OUT_OTHER_WAREHOUSE = "ORDER_SEND_OUT_OTHER_WAREHOUSE";
//订单取消通知
public static final String ORDER_CANCEL = "ORDER_CANCEL";
//退货审核通过
... ...
... ... @@ -195,6 +195,17 @@ public interface ISendOrderMessage {
public SendMessageRspBo orderSendOutNew(String uid, String uName, String orderCode, String companyName, String expressNum);
/**
* 新定义订单发货通知,收件人为yoho用户(支持微信)
* @param uid
* @param uName
* @param orderCode
* @param companyName
* @param expressNum
* @return
*/
public SendMessageRspBo orderSendOutOther(String uid, String uName, String orderCode, String companyName, String expressNum);
/**
* 订单发货通知发至分仓(支持微信)
* @param uid 用户id
* @param uName 用户名
... ... @@ -206,6 +217,17 @@ public interface ISendOrderMessage {
public SendMessageRspBo orderSendOutWarehouse(String uid, String uName, String orderCode, String companyName, String expressNum);
/**
* 订单发货通知发至分仓(支持微信),收件人为yoho用户
* @param uid
* @param uName
* @param orderCode
* @param companyName
* @param expressNum
* @return
*/
public SendMessageRspBo orderSendOutOtherWarehouse(String uid, String uName, String orderCode, String companyName, String expressNum);
/**
* 订单取消(支持微信)
* @param uid 用户id
* @param orderCode 订单号
... ...
... ... @@ -213,26 +213,22 @@ public class SendOrderMessageImpl extends AbstractSendMessage implements ISendOr
@Override
public SendMessageRspBo orderSendOutNew(String uid, String uName, String orderCode, String companyName, String expressNum) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.ORDER_SEND_OUT_NEW, orderCode, uid);
messageCenterCommonEvent.putInParams("orderCode", orderCode);
messageCenterCommonEvent.putInParams("companyName", companyName);
messageCenterCommonEvent.putInParams("expressNum", expressNum);
messageCenterCommonEvent.putInParams("uName", uName);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return this.dealOrderSendOut(SendScenes.ORDER_SEND_OUT_NEW, uid, uName, orderCode, companyName, expressNum);
}
return new SendMessageRspBo(200, "SUCCESS");
@Override
public SendMessageRspBo orderSendOutOther(String uid, String uName, String orderCode, String companyName, String expressNum) {
return this.dealOrderSendOut(SendScenes.ORDER_SEND_OUT_OTHER, uid, uName, orderCode, companyName, expressNum);
}
@Override
public SendMessageRspBo orderSendOutWarehouse(String uid, String uName, String orderCode, String companyName, String expressNum) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.ORDER_SEND_OUT_WAREHOUSE, orderCode, uid);
messageCenterCommonEvent.putInParams("orderCode", orderCode);
messageCenterCommonEvent.putInParams("companyName", companyName);
messageCenterCommonEvent.putInParams("expressNum", expressNum);
messageCenterCommonEvent.putInParams("uName", uName);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return this.dealOrderSendOut(SendScenes.ORDER_SEND_OUT_WAREHOUSE, uid, uName, orderCode, companyName, expressNum);
}
return new SendMessageRspBo(200, "SUCCESS");
@Override
public SendMessageRspBo orderSendOutOtherWarehouse(String uid, String uName, String orderCode, String companyName, String expressNum) {
return this.dealOrderSendOut(SendScenes.ORDER_SEND_OUT_OTHER_WAREHOUSE, uid, uName, orderCode, companyName, expressNum);
}
@Override
... ... @@ -287,4 +283,15 @@ public class SendOrderMessageImpl extends AbstractSendMessage implements ISendOr
return new SendMessageRspBo(200, "SUCCESS");
}
}
private SendMessageRspBo dealOrderSendOut(String sendScene, String uid, String uName, String orderCode, String companyName, String expressNum) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(sendScene, orderCode, uid);
messageCenterCommonEvent.putInParams("orderCode", orderCode);
messageCenterCommonEvent.putInParams("companyName", companyName);
messageCenterCommonEvent.putInParams("expressNum", expressNum);
messageCenterCommonEvent.putInParams("uName", uName);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
}
\ No newline at end of file
... ...