| | |
| | | package com.yeshi.fanli.service.impl.user.msg;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
|
| | | import com.yeshi.fanli.exception.msg.MsgAccountDetailException;
|
| | | import com.yeshi.fanli.service.inter.user.msg.MsgAccountDetailService;
|
| | | import com.yeshi.fanli.service.inter.user.msg.UserAccountMsgNotificationService;
|
| | | import com.yeshi.fanli.util.factory.msg.MsgAccountDetailFactory;
|
| | |
|
| | | @Service
|
| | | public class UserAccountMsgNotificationServiceImpl implements UserAccountMsgNotificationService {
|
| | |
|
| | | @Resource
|
| | | private MsgAccountDetailService msgAccountDetailService;
|
| | |
|
| | | @Override
|
| | | public void bindingSuccess(Long uid, int type) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createBindingAccount(uid, type);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void unBindingSuccess(Long uid, int type) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createUnBindingAccount(uid, type);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void changeBindingSuccess(Long uid, int type) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createChangeBindingAccount(uid, type);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void connectSuccess(Long uid, Long lessUid) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createConnectAccount(uid, lessUid);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void userRank(Long uid, String orderType, int orderCount, String rankName) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createUserRank(uid, orderType, orderCount, rankName);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void taoBaoAuthFail(Long uid, String taoBaoNickName, String reason) {
|
| | | MsgAccountDetail detail = MsgAccountDetailFactory.createTaoBaoAuthFail(uid, taoBaoNickName, reason);
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | package com.yeshi.fanli.service.impl.user.msg; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail; |
| | | import com.yeshi.fanli.exception.msg.MsgAccountDetailException; |
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService; |
| | | import com.yeshi.fanli.service.inter.user.msg.MsgAccountDetailService; |
| | | import com.yeshi.fanli.service.inter.user.msg.UserAccountMsgNotificationService; |
| | | import com.yeshi.fanli.util.factory.msg.MsgAccountDetailFactory; |
| | | |
| | | @Service |
| | | public class UserAccountMsgNotificationServiceImpl implements UserAccountMsgNotificationService { |
| | | |
| | | @Resource |
| | | private MsgAccountDetailService msgAccountDetailService; |
| | | |
| | | @Resource |
| | | private MsgExtraService msgExtraService; |
| | | |
| | | @Override |
| | | public void bindingSuccess(Long uid, int type) { |
| | | //不发送绑定消息 |
| | | // saveDetail(MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_BIND)); |
| | | } |
| | | |
| | | @Override |
| | | public void unBindingSuccess(Long uid, int type) { |
| | | // saveDetail(MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_UNBIND)); |
| | | } |
| | | |
| | | @Override |
| | | public void changeBindingSuccess(Long uid, int type) { |
| | | // saveDetail(MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_CHANGE)); |
| | | } |
| | | |
| | | @Override |
| | | public void taoBaoAuthFail(Long uid, String taoBaoNickName, String reason) { |
| | | saveDetail(MsgAccountDetailFactory.createBindFail(uid, MsgAccountDetailFactory.TYPE_TB, |
| | | MsgAccountDetailFactory.WAY_CHANGE, reason)); |
| | | } |
| | | |
| | | @Override |
| | | public void createChangeInviteCode(Long uid, String oldCode, String newCode) { |
| | | saveDetail(MsgAccountDetailFactory.createChangeInviteCode(uid, oldCode, newCode)); |
| | | } |
| | | |
| | | @Override |
| | | public void vipPreUpgrade(Long uid, String originalName, String upName, int days, long targetNum1, Long targetNum2, |
| | | boolean teamPass) { |
| | | saveDetail(MsgAccountDetailFactory.vipPreUpgrade(uid, originalName, upName, days, targetNum1, targetNum2, |
| | | teamPass)); |
| | | } |
| | | |
| | | @Override |
| | | public void vipUpgradeSuccess(Long uid, int days) { |
| | | saveDetail(MsgAccountDetailFactory.vipUpgradeSuccess(uid, days)); |
| | | } |
| | | |
| | | @Override |
| | | public void vipUpgradeFail(Long uid, String reason) { |
| | | saveDetail(MsgAccountDetailFactory.vipUpgradeFail(uid, reason)); |
| | | } |
| | | |
| | | @Override |
| | | public void teacherInvite(Long uid, String nickname, String kefuName, String kefuWX) { |
| | | saveDetail(MsgAccountDetailFactory.teacherInvite(uid, nickname, kefuName, kefuWX)); |
| | | } |
| | | |
| | | @Override |
| | | public void teacherSuccess(Long uid, int days, String kefuName, String kefuWX) { |
| | | saveDetail(MsgAccountDetailFactory.teacherSuccess(uid, days, kefuName, kefuWX)); |
| | | } |
| | | |
| | | private void saveDetail(MsgAccountDetail detail) { |
| | | try { |
| | | msgAccountDetailService.addMsgAccountDetail(detail); |
| | | } catch (MsgAccountDetailException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void artificialVipUpgradePass(Long uid, String originalName, String upName, int days) { |
| | | saveDetail(MsgAccountDetailFactory.artificialVipUpgradeSuccess(uid, originalName, upName, days)); |
| | | } |
| | | |
| | | @Override |
| | | public void artificialVipUpgradeReject(Long uid, String originalName, String upName, String reson) { |
| | | saveDetail(MsgAccountDetailFactory.artificialVipUpgradeFail(uid, originalName, upName, reson)); |
| | | } |
| | | |
| | | } |