Authored by DengXinFei

拼团购发送小程序场景 --modify by xinfei

package com.yoho.message.sdk.common.constants;
/**
* 团购发送场景
*
* @ClassName GroupScenes
* @Author xinfei
* @Date 2018/8/8 10:41
**/
public class GroupScenes {
// 拼团成功
public static final String GROUP_ORDER_SUCCESS = "GROUP_ORDER_SUCCESS";
// 拼团失败
public static final String GROUP_ORDER_FAIL = "GROUP_ORDER_FAIL";
// 拼团进度
public static final String GROUP_ORDER_SPEED = "GROUP_ORDER_SPEED";
//开团成功
public static final String START_GROUP_SUCCESS = "START_GROUP_SUCCESS";
//拼团即将结束
public static final String GROUP_COMMING_TO_END = "GROUP_COMMING_TO_END";
}
... ...
... ... @@ -90,20 +90,6 @@ public class SendScenes {
// 待支付
public static final String MINI_WAITING_PAY = "MINI_WAITING_PAY";
// 拼团成功
public static final String GROUP_ORDER_SUCCESS = "GROUP_ORDER_SUCCESS";
// 拼团失败
public static final String GROUP_ORDER_FAIL = "GROUP_ORDER_FAIL";
// 拼团进度
public static final String GROUP_ORDER_SPEED = "GROUP_ORDER_SPEED";
//开团成功
public static final String START_GROUP_SUCCESS = "START_GROUP_SUCCESS";
//拼团即将结束
public static final String GROUP_COMMING_TO_END = "GROUP_COMMING_TO_END";
//上门换货审核通过
public static final String HOME_CHANGE_VERIFY_PASS = "HOME_CHANGE_VERIFY_PASS";
... ... @@ -112,12 +98,4 @@ public class SendScenes {
//换货商品未寄回
public static final String CHANGE_NOT_SEND_BACK = "CHANGE_NOT_SEND_BACK";
//有货有赚项目 佣金结算提醒
public static final String YOZHUAN_COMMISSION_SETTLEMENT = "YOZHUAN_COMMISSION_SETTLEMENT";
//有货有赚项目 提现打款提醒
public static final String YOZHUAN_CRASH_ACCOUNT = "YOZHUAN_CRASH_ACCOUNT";
//有货有赚项目 订单任务完成提醒
public static final String YOZHUAN_ORDER_COMPLETE = "YOZHUAN_ORDER_COMPLETE";
}
... ...
package com.yoho.message.sdk.common.constants;
/**
*
* 有货有赚发送消息场景
*
* @ClassName YouZhuanScenes
* @Author xinfei
* @Date 2018/8/8 10:44
**/
public class YouZhuanScenes {
//有货有赚项目 佣金结算提醒
public static final String YOZHUAN_COMMISSION_SETTLEMENT = "YOZHUAN_COMMISSION_SETTLEMENT";
//有货有赚项目 提现打款提醒
public static final String YOZHUAN_CRASH_ACCOUNT = "YOZHUAN_CRASH_ACCOUNT";
//有货有赚项目 订单任务完成提醒
public static final String YOZHUAN_ORDER_COMPLETE = "YOZHUAN_ORDER_COMPLETE";
}
... ...
package com.yoho.message.sdk.service.order.impl;
import com.yoho.message.sdk.common.constants.SendScenes;
import com.yoho.message.sdk.common.constants.GroupScenes;
import com.yoho.message.sdk.common.handler.MessageCenterMqHandler;
import com.yoho.message.sdk.common.model.MessageCenterCommonEvent;
import com.yoho.message.sdk.common.model.SendMessageRspBo;
... ... @@ -35,7 +35,7 @@ public class GroupOrderServiceImpl extends AbstractSendMessage implements IGroup
*/
@Override
public SendMessageRspBo startGroupSuccess(String uid, String orderCode, String productName, String groupPrice, int groupNum, String endTime){
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.START_GROUP_SUCCESS, orderCode, uid);
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(GroupScenes.START_GROUP_SUCCESS, orderCode, uid);
messageCenterCommonEvent.putInParams("orderCode", orderCode);
messageCenterCommonEvent.putInParams("productName", productName);
... ... @@ -58,7 +58,7 @@ public class GroupOrderServiceImpl extends AbstractSendMessage implements IGroup
*/
@Override
public SendMessageRspBo startGroupSuccess(String uid, String orderCode, String productName) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.GROUP_COMMING_TO_END, orderCode, uid);
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(GroupScenes.GROUP_COMMING_TO_END, orderCode, uid);
messageCenterCommonEvent.putInParams("orderCode", orderCode);
messageCenterCommonEvent.putInParams("productName", productName);
... ... @@ -79,7 +79,7 @@ public class GroupOrderServiceImpl extends AbstractSendMessage implements IGroup
@Override
public SendMessageRspBo fightGroupsSuccess(String uid, String orderCode, int groupTime, String productName, String groupOrderAmount) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.GROUP_ORDER_SUCCESS, orderCode, uid);
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(GroupScenes.GROUP_ORDER_SUCCESS, orderCode, uid);
messageCenterCommonEvent.putInParams("orderCode", orderCode);
messageCenterCommonEvent.putInParams("groupTime", DateUtils.long2DateStr(groupTime * 1000l, DateUtils.fullDateTimeFormat));
... ... @@ -104,7 +104,7 @@ public class GroupOrderServiceImpl extends AbstractSendMessage implements IGroup
@Override
public SendMessageRspBo fightGroupsFail(String uid, String orderCode, int groupFailTime, String productName, String groupOrderAmount) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.GROUP_ORDER_FAIL, orderCode, uid);
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(GroupScenes.GROUP_ORDER_FAIL, orderCode, uid);
messageCenterCommonEvent.putInParams("orderCode", orderCode);
messageCenterCommonEvent.putInParams("groupFailTime", DateUtils.long2DateStr(groupFailTime * 1000l, DateUtils.fullDateTimeFormat));
... ... @@ -129,7 +129,7 @@ public class GroupOrderServiceImpl extends AbstractSendMessage implements IGroup
*/
@Override
public SendMessageRspBo fightGroupsSpeed(String uid, String orderCode, String leftTime, int groupTime, String productName, String payAmount) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.GROUP_ORDER_SPEED, orderCode, uid);
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(GroupScenes.GROUP_ORDER_SPEED, orderCode, uid);
messageCenterCommonEvent.putInParams("leftTime", leftTime);
messageCenterCommonEvent.putInParams("orderCode", orderCode);
... ...
... ... @@ -9,27 +9,33 @@ public interface ISendProductMessage {
/**
* 佣金结算提醒 有货有赚项目
* @param orderNum 订单数量
* @param orderAmount 订单金额
* @return
* 有货有赚项目 佣金结算提醒
*
* @param uid
* @param CommissionAmount 佣金总金额
* @param moneyArriveTime 结算到账时间
* @return 返回成功标志
*/
SendMessageRspBo commissionNotice(String uid,String orderNum, String orderAmount);
SendMessageRspBo commissionNotice(String uid, String CommissionAmount, String moneyArriveTime);
/**
* 提现打款提醒 有货有赚项目
* @param accountCode
* @param accountAmount
* @param accountTime
* @return
* 有货有赚项目 提现打款提醒
*
* @param uid 接收用户UID
* @param totalAmount 打款总金额
* @param moneyArriveTime 打款到账时间
* @return 返回成功标志
*/
SendMessageRspBo cashAccountNotice(String uid,String accountCode, String accountAmount,String accountTime);
SendMessageRspBo cashAccountNotice(String uid, String totalAmount, String moneyArriveTime);
/**
* 订单任务完成提醒 有货有赚项目
* @param uid
* @param ForecastIncome
* @return
* 有货有赚项目 订单任务完成提醒
*
* @param uid 接收用户UID
* @param activeName 活动名称
* @param activeCommission 获得奖励预估收入金额
* @param activeEndTime 活动结束时间
* @return 返回成功标志
*/
SendMessageRspBo orderCompletedNotice(String uid,String ForecastIncome);
SendMessageRspBo orderCompletedNotice(String uid, String activeName, String activeCommission, String activeEndTime);
}
... ...
package com.yoho.message.sdk.service.product;
import com.yoho.message.sdk.common.constants.SendScenes;
import com.yoho.message.sdk.common.constants.YouZhuanScenes;
import com.yoho.message.sdk.common.handler.MessageCenterMqHandler;
import com.yoho.message.sdk.common.model.MessageCenterCommonEvent;
import com.yoho.message.sdk.common.model.SendMessageRspBo;
... ... @@ -9,7 +10,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by min.ling on 2018/8/3.
*
* 有货有赚项目发送消息汇总
*
* @Author Created by min.ling on 2018/8/3.
*/
@Service
public class SendProductMessageImpl extends AbstractSendMessage implements ISendProductMessage {
... ... @@ -20,16 +24,16 @@ public class SendProductMessageImpl extends AbstractSendMessage implements ISend
/**
* 有货有赚项目 佣金结算提醒
*
* @param uid
* @param orderNum 订单数量
* @param orderAmount 订单金额
* @return
* @param uid 接收用户UID
* @param CommissionAmount 佣金总金额
* @param moneyArriveTime 结算到账时间
* @return 返回成功标志
*/
@Override
public SendMessageRspBo commissionNotice(String uid, String orderNum, String orderAmount) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.YOZHUAN_COMMISSION_SETTLEMENT, uid, uid);
messageCenterCommonEvent.putInParams("orderNum", orderNum);
messageCenterCommonEvent.putInParams("orderAmount", orderAmount);
public SendMessageRspBo commissionNotice(String uid, String CommissionAmount, String moneyArriveTime) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(YouZhuanScenes.YOZHUAN_COMMISSION_SETTLEMENT, uid, uid);
messageCenterCommonEvent.putInParams("CommissionAmount", CommissionAmount);
messageCenterCommonEvent.putInParams("moneyArriveTime", moneyArriveTime);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
... ... @@ -37,18 +41,16 @@ public class SendProductMessageImpl extends AbstractSendMessage implements ISend
/**
* 有货有赚项目 提现打款提醒
*
* @param uid
* @param accountCode
* @param accountAmount
* @param accountTime
* @return
* @param uid 接收用户UID
* @param totalAmount 打款总金额
* @param moneyArriveTime 打款到账时间
* @return 返回成功标志
*/
@Override
public SendMessageRspBo cashAccountNotice(String uid, String accountCode, String accountAmount, String accountTime) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.YOZHUAN_CRASH_ACCOUNT, accountCode, uid);
messageCenterCommonEvent.putInParams("accountCode", accountCode);
messageCenterCommonEvent.putInParams("accountAmount", accountAmount);
messageCenterCommonEvent.putInParams("accountTime", accountTime);
public SendMessageRspBo cashAccountNotice(String uid, String totalAmount, String moneyArriveTime) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(YouZhuanScenes.YOZHUAN_CRASH_ACCOUNT, uid, uid);
messageCenterCommonEvent.putInParams("totalAmount", totalAmount);
messageCenterCommonEvent.putInParams("moneyArriveTime", moneyArriveTime);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
... ... @@ -56,14 +58,18 @@ public class SendProductMessageImpl extends AbstractSendMessage implements ISend
/**
* 有货有赚项目 订单任务完成提醒
*
* @param uid
* @param ForecastIncome
* @return
* @param uid 接收用户UID
* @param activeName 活动名称
* @param activeCommission 获得奖励预估收入金额
* @param activeEndTime 活动结束时间
* @return 返回成功标志
*/
@Override
public SendMessageRspBo orderCompletedNotice(String uid, String ForecastIncome) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(SendScenes.YOZHUAN_ORDER_COMPLETE, uid, uid);
messageCenterCommonEvent.putInParams("ForecastIncome", ForecastIncome);
public SendMessageRspBo orderCompletedNotice(String uid, String activeName, String activeCommission, String activeEndTime) {
MessageCenterCommonEvent messageCenterCommonEvent = genMessageCenterCommonEvent(YouZhuanScenes.YOZHUAN_ORDER_COMPLETE, uid, uid);
messageCenterCommonEvent.putInParams("activeName", activeName);
messageCenterCommonEvent.putInParams("activeCommission", activeCommission);
messageCenterCommonEvent.putInParams("activeEndTime", activeEndTime);
messageCenterMqHandler.sendMessageToMq(messageCenterCommonEvent);
return new SendMessageRspBo(200, "SUCCESS");
}
... ...