From baacd1378b33c4a84ee7a4998fb08fd9979ee4e1 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 09 一月 2019 11:02:52 +0800 Subject: [PATCH] Merge branch 'dev-hongbao' --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserNotificationServiceImpl.java | 84 ++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 80 insertions(+), 4 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserNotificationServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserNotificationServiceImpl.java index 81cb001..5904c41 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserNotificationServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserNotificationServiceImpl.java @@ -13,13 +13,11 @@ import com.yeshi.fanli.entity.bus.user.Extract; import com.yeshi.fanli.entity.bus.user.UserInfo; import com.yeshi.fanli.exception.PushException; -import com.yeshi.fanli.log.LogHelper; import com.yeshi.fanli.service.inter.push.PushService; import com.yeshi.fanli.service.inter.user.SMSService; import com.yeshi.fanli.service.inter.user.UserInfoService; import com.yeshi.fanli.service.inter.user.UserNotificationService; import com.yeshi.fanli.util.Constant; -import com.yeshi.fanli.util.StringUtil; @Service public class UserNotificationServiceImpl implements UserNotificationService { @@ -37,6 +35,8 @@ @Override public void newerHongBao(Long uid, BigDecimal money) { + if (Constant.IS_TEST) + return; try { pushService.pushZNX(uid, Constant.znxConfig.getNewerHongbaoTitle(), Constant.znxConfig.getNewerHongbaoMsg().replace("[閲戦]", money.toString())); @@ -47,6 +47,8 @@ @Override public void orderFanliRecieved(Long uid, String orderId, BigDecimal money) { + if (Constant.IS_TEST) + return; try { pushService.pushZNX(uid, Constant.znxConfig.getOrderFanliRecieveTitle(), Constant.znxConfig .getOrderFanliRecieveMsg().replace("[璁㈠崟鍙穄", orderId).replace("[閲戦]", money.toString())); @@ -57,9 +59,11 @@ @Override public void tiChengRecieved(Long uid, BigDecimal money) { + if (Constant.IS_TEST) + return; try { - pushService.pushZNX(uid, Constant.znxConfig.getShareInviteMoneyRecieveTitle(), - Constant.znxConfig.getShareInviteMoneyRecieveMsg().replace("[閲戦]", money.toString())); + pushService.pushZNX(uid, Constant.znxConfig.getShareMoneyRecieveTitle(), + Constant.znxConfig.getShareMoneyRecieveMsg().replace("[閲戦]", money.toString())); } catch (PushException e) { e.printStackTrace(); } @@ -67,6 +71,8 @@ @Override public void orderFanliStatisticed(Long uid, String orderId) { + if (Constant.IS_TEST) + return; try { pushService.pushZNX(uid, Constant.znxConfig.getFanliOrderStatisticedTitle(), Constant.znxConfig.getFanliOrderStatisticedMsg().replace("[璁㈠崟鍙穄", orderId)); @@ -77,6 +83,8 @@ @Override public void tiChengStatisticed(Long uid, String orderId, BigDecimal money) { + if (Constant.IS_TEST) + return; orderId = orderId.substring(0, orderId.length() - 6) + "******"; try { pushService.pushZNX(uid, Constant.znxConfig.getTichengOrderStatisticedTitle(), Constant.znxConfig @@ -88,6 +96,8 @@ @Override public void weiQuanFanli(Long uid, String orderId, BigDecimal money) { + if (Constant.IS_TEST) + return; // 鍙彂閫佺珯鍐呬俊 AccountMessage am = new AccountMessage(); am.setContent(Constant.znxConfig.getWeiquanDrawbackFanliMsg().replace("[璁㈠崟鍙穄", orderId).replace("[閲戦]", @@ -101,6 +111,8 @@ @Override public void weiQuanTiCheng(Long uid, String orderId, BigDecimal money) { + if (Constant.IS_TEST) + return; orderId = orderId.substring(0, orderId.length() - 6) + "******"; AccountMessage am = new AccountMessage(); am.setContent(Constant.znxConfig.getWeiquanDrawbackShareMsg().replace("[璁㈠崟鍙穄", orderId).replace("[閲戦]", @@ -114,6 +126,8 @@ @Override public void extractApply(Long uid) { + if (Constant.IS_TEST) + return; try { pushService.pushZNX(uid, Constant.znxConfig.getExtractApplayTitle(), Constant.znxConfig.getExtractApplayMsg()); @@ -124,6 +138,8 @@ @Override public void extractTransferFail(Long uid, String time) { + if (Constant.IS_TEST) + return; try { pushService.pushZNX(uid, Constant.znxConfig.getExtractTransferFailTitle(), Constant.znxConfig.getExtractTransferFailMsg().replace("[鏃堕棿]", time)); @@ -134,6 +150,8 @@ @Override public void extractWrong(Long uid, Extract extract, String time) { + if (Constant.IS_TEST) + return; // 鎻愮幇澶辫触鐭俊閫氱煡 // try { // UserInfo user = userInfoService.getUserById(uid); @@ -159,6 +177,8 @@ @Override public void extractSuccess(Long uid, Extract extract, String time) { + if (Constant.IS_TEST) + return; // 鎻愮幇鎴愬姛鐭俊閫氱煡 // try { // UserInfo user = userInfoService.getUserById(uid); @@ -185,6 +205,8 @@ @Override public void alipayAccountValidRight(Long uid, BigDecimal money, String account) { + if (Constant.IS_TEST) + return; BindingAccount ba = new BindingAccount(); ba.setAccount(account); ba.setName("**"); @@ -199,4 +221,58 @@ accountMessageMapper.insertSelective(am); } + @Override + public void tiChengInviteRecieved(Long uid, BigDecimal money) { + if (Constant.IS_TEST) + return; + try { + pushService.pushZNX(uid, Constant.znxConfig.getInviteMoneyRecieveTitle(), + Constant.znxConfig.getInviteMoneyRecieveMsg().replace("[閲戦]", money.toString())); + } catch (PushException e) { + e.printStackTrace(); + } + + } + + @Override + public void tiChengShareRecieved(Long uid, BigDecimal money) { + if (Constant.IS_TEST) + return; + try { + pushService.pushZNX(uid, Constant.znxConfig.getShareMoneyRecieveTitle(), + Constant.znxConfig.getShareMoneyRecieveMsg().replace("[閲戦]", money.toString())); + } catch (PushException e) { + e.printStackTrace(); + } + + } + + @Override + public void orderShareStatisticed(Long uid, String orderId, BigDecimal money) { + if (Constant.IS_TEST) + return; + orderId = orderId.substring(0, orderId.length() - 6) + "******"; + try { + pushService.pushZNX(uid, Constant.znxConfig.getShareOrderStatisticedMsg(), Constant.znxConfig + .getShareOrderStatisticedMsg().replace("[璁㈠崟鍙穄", orderId).replace("[閲戦]", money.toString())); + } catch (PushException e) { + e.printStackTrace(); + } + + } + + @Override + public void orderInviteStatisticed(Long uid, String orderId, BigDecimal money) { + if (Constant.IS_TEST) + return; + orderId = orderId.substring(0, orderId.length() - 6) + "******"; + try { + pushService.pushZNX(uid, Constant.znxConfig.getInviteOrderStatisticedTitle(), Constant.znxConfig + .getInviteOrderStatisticedMsg().replace("[璁㈠崟鍙穄", orderId).replace("[閲戦]", money.toString())); + } catch (PushException e) { + e.printStackTrace(); + } + + } + } -- Gitblit v1.8.0