Authored by unknown

增加有赚项目接口

@@ -105,4 +105,13 @@ public class SendScenes { @@ -105,4 +105,13 @@ public class SendScenes {
105 public static final String RETRUN_NOT_SEND_BACK = "RETRUN_NOT_SEND_BACK"; 105 public static final String RETRUN_NOT_SEND_BACK = "RETRUN_NOT_SEND_BACK";
106 //换货商品未寄回 106 //换货商品未寄回
107 public static final String CHANGE_NOT_SEND_BACK = "CHANGE_NOT_SEND_BACK"; 107 public static final String CHANGE_NOT_SEND_BACK = "CHANGE_NOT_SEND_BACK";
  108 +
  109 + //有货有赚项目 佣金结算提醒
  110 + public static final String YOZHUAN_COMMISSION_SETTLEMENT = "YOZHUAN_COMMISSION_SETTLEMENT";
  111 +
  112 + //有货有赚项目 提现打款提醒
  113 + public static final String YOZHUAN_CRASH_ACCOUNT = "YOZHUAN_CRASH_ACCOUNT";
  114 +
  115 + //有货有赚项目 订单任务完成提醒
  116 + public static final String YOZHUAN_ORDER_COMPLETE = "YOZHUAN_ORDER_COMPLETE";
108 } 117 }
1 package com.yoho.message.sdk.service.product; 1 package com.yoho.message.sdk.service.product;
2 2
  3 +import com.yoho.message.sdk.common.constants.SendScenes;
  4 +import com.yoho.message.sdk.common.handler.MessageCenterMqHandler;
  5 +import com.yoho.message.sdk.common.model.MessageCenterCommonEvent;
3 import com.yoho.message.sdk.common.model.SendMessageRspBo; 6 import com.yoho.message.sdk.common.model.SendMessageRspBo;
  7 +import com.yoho.message.sdk.service.AbstractSendMessage;
  8 +import org.springframework.beans.factory.annotation.Autowired;
4 9
5 /** 10 /**
6 * Created by min.ling on 2018/8/3. 11 * Created by min.ling on 2018/8/3.
7 */ 12 */
8 -public class SendProductMessageImpl implements ISendProductMessage { 13 +public class SendProductMessageImpl extends AbstractSendMessage implements ISendProductMessage {
  14 +
  15 + @Autowired
  16 + private MessageCenterMqHandler messageCenterMqHandler;
  17 +
  18 +
9 @Override 19 @Override
10 public SendMessageRspBo commissionNotice(String uid, String orderNum, String orderAmount) { 20 public SendMessageRspBo commissionNotice(String uid, String orderNum, String orderAmount) {
11 - return null; 21 + MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.YOZHUAN_COMMISSION_SETTLEMENT, uid, uid);
  22 + messageCenterCommonEvent.putInParams("orderNum", orderNum);
  23 + messageCenterCommonEvent.putInParams("orderAmount", orderAmount);
  24 + messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
  25 + return new SendMessageRspBo(200, "SUCCESS");
12 } 26 }
13 27
14 @Override 28 @Override
15 public SendMessageRspBo cashAccountNotice(String uid, String accountCode, String accountAmount, String accountTime) { 29 public SendMessageRspBo cashAccountNotice(String uid, String accountCode, String accountAmount, String accountTime) {
16 - return null; 30 + MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.YOZHUAN_CRASH_ACCOUNT, accountCode, uid);
  31 + messageCenterCommonEvent.putInParams("accountCode", accountCode);
  32 + messageCenterCommonEvent.putInParams("accountAmount", accountAmount);
  33 + messageCenterCommonEvent.putInParams("accountTime", accountTime);
  34 + messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
  35 + return new SendMessageRspBo(200, "SUCCESS");
17 } 36 }
18 37
19 @Override 38 @Override
20 public SendMessageRspBo orderCompletedNotice(String uid, String ForecastIncome) { 39 public SendMessageRspBo orderCompletedNotice(String uid, String ForecastIncome) {
21 - return null; 40 + MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.YOZHUAN_ORDER_COMPLETE, uid, uid);
  41 + messageCenterCommonEvent.putInParams("ForecastIncome", ForecastIncome);
  42 + messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
  43 + return new SendMessageRspBo(200, "SUCCESS");
22 } 44 }
23 } 45 }