Authored by wangxin

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

@@ -51,8 +51,12 @@ public class SendScenes { @@ -51,8 +51,12 @@ public class SendScenes {
51 51
52 //订单发货新场景,区别于旧场景 52 //订单发货新场景,区别于旧场景
53 public static final String ORDER_SEND_OUT_NEW = "ORDER_SEND_OUT_NEW"; 53 public static final String ORDER_SEND_OUT_NEW = "ORDER_SEND_OUT_NEW";
  54 + //订单发货新场景,收货人也是yoho用户
  55 + public static final String ORDER_SEND_OUT_OTHER = "ORDER_SEND_OUT_OTHER";
54 //订单发货通知,发分仓 56 //订单发货通知,发分仓
55 public static final String ORDER_SEND_OUT_WAREHOUSE = "ORDER_SEND_OUT_WAREHOUSE"; 57 public static final String ORDER_SEND_OUT_WAREHOUSE = "ORDER_SEND_OUT_WAREHOUSE";
  58 + //订单发货通知,发分仓,收货人也是yoho用户
  59 + public static final String ORDER_SEND_OUT_OTHER_WAREHOUSE = "ORDER_SEND_OUT_OTHER_WAREHOUSE";
56 //订单取消通知 60 //订单取消通知
57 public static final String ORDER_CANCEL = "ORDER_CANCEL"; 61 public static final String ORDER_CANCEL = "ORDER_CANCEL";
58 //退货审核通过 62 //退货审核通过
@@ -195,6 +195,17 @@ public interface ISendOrderMessage { @@ -195,6 +195,17 @@ public interface ISendOrderMessage {
195 public SendMessageRspBo orderSendOutNew(String uid, String uName, String orderCode, String companyName, String expressNum); 195 public SendMessageRspBo orderSendOutNew(String uid, String uName, String orderCode, String companyName, String expressNum);
196 196
197 /** 197 /**
  198 + * 新定义订单发货通知,收件人为yoho用户(支持微信)
  199 + * @param uid
  200 + * @param uName
  201 + * @param orderCode
  202 + * @param companyName
  203 + * @param expressNum
  204 + * @return
  205 + */
  206 + public SendMessageRspBo orderSendOutOther(String uid, String uName, String orderCode, String companyName, String expressNum);
  207 +
  208 + /**
198 * 订单发货通知发至分仓(支持微信) 209 * 订单发货通知发至分仓(支持微信)
199 * @param uid 用户id 210 * @param uid 用户id
200 * @param uName 用户名 211 * @param uName 用户名
@@ -206,6 +217,17 @@ public interface ISendOrderMessage { @@ -206,6 +217,17 @@ public interface ISendOrderMessage {
206 public SendMessageRspBo orderSendOutWarehouse(String uid, String uName, String orderCode, String companyName, String expressNum); 217 public SendMessageRspBo orderSendOutWarehouse(String uid, String uName, String orderCode, String companyName, String expressNum);
207 218
208 /** 219 /**
  220 + * 订单发货通知发至分仓(支持微信),收件人为yoho用户
  221 + * @param uid
  222 + * @param uName
  223 + * @param orderCode
  224 + * @param companyName
  225 + * @param expressNum
  226 + * @return
  227 + */
  228 + public SendMessageRspBo orderSendOutOtherWarehouse(String uid, String uName, String orderCode, String companyName, String expressNum);
  229 +
  230 + /**
209 * 订单取消(支持微信) 231 * 订单取消(支持微信)
210 * @param uid 用户id 232 * @param uid 用户id
211 * @param orderCode 订单号 233 * @param orderCode 订单号
@@ -213,26 +213,22 @@ public class SendOrderMessageImpl extends AbstractSendMessage implements ISendOr @@ -213,26 +213,22 @@ public class SendOrderMessageImpl extends AbstractSendMessage implements ISendOr
213 213
214 @Override 214 @Override
215 public SendMessageRspBo orderSendOutNew(String uid, String uName, String orderCode, String companyName, String expressNum) { 215 public SendMessageRspBo orderSendOutNew(String uid, String uName, String orderCode, String companyName, String expressNum) {
216 - MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.ORDER_SEND_OUT_NEW, orderCode, uid);  
217 - messageCenterCommonEvent.putInParams("orderCode", orderCode);  
218 - messageCenterCommonEvent.putInParams("companyName", companyName);  
219 - messageCenterCommonEvent.putInParams("expressNum", expressNum);  
220 - messageCenterCommonEvent.putInParams("uName", uName);  
221 - messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent); 216 + return this.dealOrderSendOut(SendScenes.ORDER_SEND_OUT_NEW, uid, uName, orderCode, companyName, expressNum);
  217 + }
222 218
223 - return new SendMessageRspBo(200, "SUCCESS"); 219 + @Override
  220 + public SendMessageRspBo orderSendOutOther(String uid, String uName, String orderCode, String companyName, String expressNum) {
  221 + return this.dealOrderSendOut(SendScenes.ORDER_SEND_OUT_OTHER, uid, uName, orderCode, companyName, expressNum);
224 } 222 }
225 223
226 @Override 224 @Override
227 public SendMessageRspBo orderSendOutWarehouse(String uid, String uName, String orderCode, String companyName, String expressNum) { 225 public SendMessageRspBo orderSendOutWarehouse(String uid, String uName, String orderCode, String companyName, String expressNum) {
228 - MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.ORDER_SEND_OUT_WAREHOUSE, orderCode, uid);  
229 - messageCenterCommonEvent.putInParams("orderCode", orderCode);  
230 - messageCenterCommonEvent.putInParams("companyName", companyName);  
231 - messageCenterCommonEvent.putInParams("expressNum", expressNum);  
232 - messageCenterCommonEvent.putInParams("uName", uName);  
233 - messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent); 226 + return this.dealOrderSendOut(SendScenes.ORDER_SEND_OUT_WAREHOUSE, uid, uName, orderCode, companyName, expressNum);
  227 + }
234 228
235 - return new SendMessageRspBo(200, "SUCCESS"); 229 + @Override
  230 + public SendMessageRspBo orderSendOutOtherWarehouse(String uid, String uName, String orderCode, String companyName, String expressNum) {
  231 + return this.dealOrderSendOut(SendScenes.ORDER_SEND_OUT_OTHER_WAREHOUSE, uid, uName, orderCode, companyName, expressNum);
236 } 232 }
237 233
238 @Override 234 @Override
@@ -287,4 +283,15 @@ public class SendOrderMessageImpl extends AbstractSendMessage implements ISendOr @@ -287,4 +283,15 @@ public class SendOrderMessageImpl extends AbstractSendMessage implements ISendOr
287 283
288 return new SendMessageRspBo(200, "SUCCESS"); 284 return new SendMessageRspBo(200, "SUCCESS");
289 } 285 }
290 -} 286 +
  287 + private SendMessageRspBo dealOrderSendOut(String sendScene, String uid, String uName, String orderCode, String companyName, String expressNum) {
  288 + MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(sendScene, orderCode, uid);
  289 + messageCenterCommonEvent.putInParams("orderCode", orderCode);
  290 + messageCenterCommonEvent.putInParams("companyName", companyName);
  291 + messageCenterCommonEvent.putInParams("expressNum", expressNum);
  292 + messageCenterCommonEvent.putInParams("uName", uName);
  293 + messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
  294 +
  295 + return new SendMessageRspBo(200, "SUCCESS");
  296 + }
  297 +}