From e1fcabf3946b7a5a6b76931657413a29735d0762 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 19 一月 2019 17:37:45 +0800 Subject: [PATCH] 新版消息通知 --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java index 80d62ee..911b5ae 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserAccountServiceImpl.java @@ -44,6 +44,7 @@ import com.yeshi.fanli.exception.UserAccountException; import com.yeshi.fanli.log.LogHelper; import com.yeshi.fanli.service.inter.hongbao.HongBaoService; +import com.yeshi.fanli.service.inter.msg.UserAccountMsgNotificationService; import com.yeshi.fanli.service.inter.user.SpreadUserImgService; import com.yeshi.fanli.service.inter.user.UserAccountService; import com.yeshi.fanli.util.Constant; @@ -51,6 +52,7 @@ import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.TimeUtil; import com.yeshi.fanli.util.factory.AccountDetailsFactory; +import com.yeshi.fanli.util.factory.msg.MsgAccountDetailFactory; import com.yeshi.fanli.util.wx.WXLoginUtil; import net.sf.json.JSONObject; @@ -98,6 +100,9 @@ @Resource private SpreadUserImgService spreadUserImgService; + + @Resource + private UserAccountMsgNotificationService userAccountMsgNotificationService; @Transactional @Override @@ -219,13 +224,17 @@ // 缁戝畾鍏崇郴 UserInfo updateUserInfo = new UserInfo(userInfo.getId()); - if (!StringUtil.isNullOrEmpty(lastUser.getPhone())) + if (!StringUtil.isNullOrEmpty(lastUser.getPhone())) { updateUserInfo.setPhone(lastUser.getPhone()); - + userAccountMsgNotificationService.bindingSuccess(userInfo.getId(), + MsgAccountDetailFactory.TYPE_PHONE); + } if (!StringUtil.isNullOrEmpty(lastUser.getOpenid())) { updateUserInfo.setOpenid(lastUser.getOpenid()); updateUserInfo.setTbName(lastUser.getTbName()); updateUserInfo.setTbPic(lastUser.getTbPic()); + userAccountMsgNotificationService.bindingSuccess(userInfo.getId(), + MsgAccountDetailFactory.TYPE_TB); } updateUserInfo.setLastLoginTime(System.currentTimeMillis()); userInfoMapper.updateByPrimaryKeySelective(updateUserInfo); @@ -532,6 +541,7 @@ moneyRecordMapper.insertSelective(moneyRecord); } + userAccountMsgNotificationService.connectSuccess(mainUser.getId(), lessUser.getId()); } /** @@ -657,6 +667,7 @@ UserInfo update = new UserInfo(user.getId()); update.setPhone(phone); userInfoMapper.updateByPrimaryKeySelective(update); + userAccountMsgNotificationService.bindingSuccess(uid, MsgAccountDetailFactory.TYPE_PHONE); } @Override @@ -677,6 +688,7 @@ UserInfo updateUserInfo = new UserInfo(uid); updateUserInfo.setPhone(""); userInfoMapper.updateByPrimaryKeySelective(updateUserInfo); + userAccountMsgNotificationService.unBindingSuccess(uid, MsgAccountDetailFactory.TYPE_PHONE); } @Override @@ -702,6 +714,8 @@ update.setPortrait(tbPortrait); } userInfoMapper.updateByPrimaryKeySelective(update); + + userAccountMsgNotificationService.bindingSuccess(uid, MsgAccountDetailFactory.TYPE_TB); } @Override @@ -726,6 +740,8 @@ } userInfoMapper.updateByPrimaryKeySelective(update); + + userAccountMsgNotificationService.unBindingSuccess(uid, MsgAccountDetailFactory.TYPE_TB); } @Override @@ -758,6 +774,8 @@ updateUserInfo.setPortrait(Constant.systemCommonConfig.getDefaultPortrait()); } userInfoMapper.updateByPrimaryKeySelective(updateUserInfo); + + userAccountMsgNotificationService.changeBindingSuccess(uid, MsgAccountDetailFactory.TYPE_WX); } @Override -- Gitblit v1.8.0