| | |
| | | package com.yeshi.fanli.entity.config.push;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushContentDTO;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | |
|
| | | public class PushMsgFactory {
|
| | |
|
| | | /**
|
| | | * 返利订单被统计
|
| | | * |
| | | * @param sourceType
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createFanLiOrderStatisticed(int sourceType, String orderId, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getFanliOrderStatisticedTitle();
|
| | | String content = Constant.znxConfig.getFanliOrderStatisticedMsg();
|
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)).replace("[订单号]", orderId)
|
| | | .replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 分享订单被统计
|
| | | * |
| | | * @param sourceType
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createShareOrderStatisticed(int sourceType, String orderId, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getShareOrderStatisticedTitle();
|
| | | String content = Constant.znxConfig.getShareOrderStatisticedMsg();
|
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType))
|
| | | .replace("[订单号]", UserUtil.filterOrderId(orderId)).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请订单被统计
|
| | | * |
| | | * @param sourceType
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createInviteOrderStatisticed(int sourceType, String orderId, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getInviteOrderStatisticedTitle();
|
| | | String content = Constant.znxConfig.getInviteOrderStatisticedMsg();
|
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType))
|
| | | .replace("[订单号]", UserUtil.filterOrderId(orderId)).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 返利到账
|
| | | * |
| | | * @param sourceType
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createMoneyFanliRecieved(int sourceType, String orderId, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getMoneyFanliRecievedTitle();
|
| | | String content = Constant.znxConfig.getMoneyFanliRecievedMsg();
|
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)).replace("[订单号]", orderId)
|
| | | .replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 分享奖金到账
|
| | | * |
| | | * @param sourceType
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | |
|
| | | public static PushContentDTO createMoneyShareRecieved(int sourceType, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getMoneyShareRecievedTitle();
|
| | | String content = Constant.znxConfig.getMoneyShareRecievedMsg();
|
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请奖金到账
|
| | | * |
| | | * @param sourceType
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createMoneyInviteRecieved(int sourceType, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getMoneyInviteRecievedTitle();
|
| | | String content = Constant.znxConfig.getMoneyInviteRecievedMsg();
|
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 团队分红
|
| | | * @Title: createMoneyTeamDividents
|
| | | * @Description: |
| | | * @param sourceType
|
| | | * @param money
|
| | | * @return |
| | | * PushContentDTO 返回类型
|
| | | * @throws
|
| | | */
|
| | | public static PushContentDTO createMoneyTeamDividents(BigDecimal money) {
|
| | | String title = Constant.znxConfig.getMoneyTeamDividentsRecievedTitle();
|
| | | String content = Constant.znxConfig.getMoneyTeamDividentsRecievedMsg();
|
| | | content = content.replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 系统补齐
|
| | | * |
| | | * @param reason
|
| | | * @param money
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createMoneySystemCompensate(String reason, BigDecimal money) {
|
| | | String title = Constant.znxConfig.getMoneySystemCompensateTitle();
|
| | | String content = Constant.znxConfig.getMoneySystemCompensateMsg();
|
| | | content = content.replace("[原因]", reason).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 提现成功
|
| | | * @param applyTime
|
| | | * @param money
|
| | | * @param alipayAccount
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createMoneyExtractSuccess(Date applyTime, BigDecimal money, String alipayAccount) {
|
| | | String title = Constant.znxConfig.getMoneyExtractSuccessTitle();
|
| | | String content = Constant.znxConfig.getMoneyExtractSuccessMsg();
|
| | | content = content.replace("[提现时间]", TimeUtil.getGernalTime(applyTime.getTime(), "yyyy.MM.dd HH:mm"))
|
| | | .replace("[支付宝账号]", UserUtil.filterAlipayAccount(alipayAccount)).replace("[金额]", money.toString());
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请队员成功
|
| | | * @param time
|
| | | * @param nickName
|
| | | * @return
|
| | | */
|
| | | public static PushContentDTO createInviteTeamSuccess(Date time, String nickName) {
|
| | | String title = Constant.znxConfig.getInviteTeamSuccessTitle();
|
| | | String content = Constant.znxConfig.getInviteTeamSuccessMsg();
|
| | | content = content.replace("[时间]", TimeUtil.getGernalTime(time.getTime(), "yyyy.MM.dd HH:mm")).replace("[队员昵称]",
|
| | | nickName);
|
| | | return new PushContentDTO(title, content);
|
| | | }
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.entity.config.push; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.yeshi.fanli.dto.push.PushContentDTO; |
| | | import com.yeshi.fanli.util.Constant; |
| | | import org.yeshi.utils.TimeUtil; |
| | | import com.yeshi.fanli.util.account.UserUtil; |
| | | |
| | | public class PushMsgFactory { |
| | | |
| | | /** |
| | | * 返利订单被统计 |
| | | * |
| | | * @param sourceType |
| | | * @param orderId |
| | | * @param money |
| | | * @return |
| | | */ |
| | | public static PushContentDTO createFanLiOrderStatisticed(int sourceType, String orderId, BigDecimal money) { |
| | | String title = Constant.znxConfig.getFanliOrderStatisticedTitle(); |
| | | String content = Constant.znxConfig.getFanliOrderStatisticedMsg(); |
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)).replace("[订单号]", orderId) |
| | | .replace("[金额]", money.toString()); |
| | | return new PushContentDTO(title, content); |
| | | } |
| | | |
| | | /** |
| | | * 分享订单被统计 |
| | | * |
| | | * @param sourceType |
| | | * @param orderId |
| | | * @param money |
| | | * @return |
| | | */ |
| | | public static PushContentDTO createShareOrderStatisticed(int sourceType, String orderId, BigDecimal money) { |
| | | String title = Constant.znxConfig.getShareOrderStatisticedTitle(); |
| | | String content = Constant.znxConfig.getShareOrderStatisticedMsg(); |
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)) |
| | | .replace("[订单号]", orderId).replace("[金额]", money.toString()); |
| | | return new PushContentDTO(title, content); |
| | | } |
| | | |
| | | /** |
| | | * 邀请订单被统计 |
| | | * |
| | | * @param sourceType |
| | | * @param orderId |
| | | * @param money |
| | | * @return |
| | | */ |
| | | public static PushContentDTO createInviteOrderStatisticed(int sourceType, String orderId, BigDecimal money) { |
| | | String title = Constant.znxConfig.getInviteOrderStatisticedTitle(); |
| | | String content = Constant.znxConfig.getInviteOrderStatisticedMsg(); |
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)) |
| | | .replace("[订单号]", UserUtil.filterOrderId(orderId)).replace("[金额]", money.toString()); |
| | | return new PushContentDTO(title, content); |
| | | } |
| | | |
| | | /** |
| | | * 返利到账 |
| | | * |
| | | * @param sourceType |
| | | * @param orderId |
| | | * @param money |
| | | * @return |
| | | */ |
| | | public static PushContentDTO createMoneyFanliRecieved(int sourceType, String orderId, BigDecimal money) { |
| | | String title = Constant.znxConfig.getMoneyFanliRecievedTitle(); |
| | | String content = Constant.znxConfig.getMoneyFanliRecievedMsg(); |
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)).replace("[订单号]", orderId) |
| | | .replace("[金额]", money.toString()); |
| | | return new PushContentDTO(title, content); |
| | | } |
| | | |
| | | /** |
| | | * 分享奖金到账 |
| | | * |
| | | * @param sourceType |
| | | * @param orderId |
| | | * @param money |
| | | * @return |
| | | */ |
| | | |
| | | public static PushContentDTO createMoneyShareRecieved(int sourceType, BigDecimal money) { |
| | | String title = Constant.znxConfig.getMoneyShareRecievedTitle(); |
| | | String content = Constant.znxConfig.getMoneyShareRecievedMsg(); |
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)).replace("[金额]", money.toString()); |
| | | return new PushContentDTO(title, content); |
| | | } |
| | | |
| | | /** |
| | | * 邀请奖金到账 |
| | | * |
| | | * @param sourceType |
| | | * @param orderId |
| | | * @param money |
| | | * @return |
| | | */ |
| | | public static PushContentDTO createMoneyInviteRecieved(int sourceType, BigDecimal money) { |
| | | String title = Constant.znxConfig.getMoneyInviteRecievedTitle(); |
| | | String content = Constant.znxConfig.getMoneyInviteRecievedMsg(); |
| | | content = content.replace("[订单类型]", Constant.getSourceName(sourceType)).replace("[金额]", money.toString()); |
| | | return new PushContentDTO(title, content); |
| | | } |
| | | |
| | | /** |
| | | * 团队分红 |
| | | * @Title: createMoneyTeamDividents |
| | | * @Description: |
| | | * @param sourceType |
| | | * @param money |
| | | * @return |
| | | * PushContentDTO 返回类型 |
| | | * @throws |
| | | */ |
| | | public static PushContentDTO createMoneyTeamDividents(BigDecimal money) { |
| | | String title = Constant.znxConfig.getMoneyTeamDividentsRecievedTitle(); |
| | | String content = Constant.znxConfig.getMoneyTeamDividentsRecievedMsg(); |
| | | content = content.replace("[金额]", money.toString()); |
| | | return new PushContentDTO(title, content); |
| | | } |
| | | |
| | | /** |
| | | * 系统补齐 |
| | | * |
| | | * @param reason |
| | | * @param money |
| | | * @return |
| | | */ |
| | | public static PushContentDTO createMoneySystemCompensate(String reason, BigDecimal money) { |
| | | String title = Constant.znxConfig.getMoneySystemCompensateTitle(); |
| | | String content = Constant.znxConfig.getMoneySystemCompensateMsg(); |
| | | content = content.replace("[原因]", reason).replace("[金额]", money.toString()); |
| | | return new PushContentDTO(title, content); |
| | | } |
| | | |
| | | /** |
| | | * 提现成功 |
| | | * @param applyTime |
| | | * @param money |
| | | * @param alipayAccount |
| | | * @return |
| | | */ |
| | | public static PushContentDTO createMoneyExtractSuccess(Date applyTime, BigDecimal money, String alipayAccount) { |
| | | String title = Constant.znxConfig.getMoneyExtractSuccessTitle(); |
| | | String content = Constant.znxConfig.getMoneyExtractSuccessMsg(); |
| | | content = content.replace("[提现时间]", TimeUtil.getGernalTime(applyTime.getTime(), "yyyy.MM.dd HH:mm")) |
| | | .replace("[支付宝账号]", UserUtil.filterAlipayAccount(alipayAccount)).replace("[金额]", money.toString()); |
| | | return new PushContentDTO(title, content); |
| | | } |
| | | |
| | | /** |
| | | * 邀请队员成功 |
| | | * @param time |
| | | * @param nickName |
| | | * @return |
| | | */ |
| | | public static PushContentDTO createInviteTeamSuccess(Date time, String nickName) { |
| | | String title = Constant.znxConfig.getInviteTeamSuccessTitle(); |
| | | String content = Constant.znxConfig.getInviteTeamSuccessMsg(); |
| | | content = content.replace("[时间]", TimeUtil.getGernalTime(time.getTime(), "yyyy.MM.dd HH:mm")).replace("[队员昵称]", |
| | | nickName); |
| | | return new PushContentDTO(title, content); |
| | | } |
| | | |
| | | } |