package org.fanli.service.user.service.impl.account.msg;
|
|
import javax.annotation.Resource;
|
|
import org.fanli.facade.user.entity.account.msg.MsgAccountDetail;
|
import org.fanli.facade.user.entity.account.msg.UserAccountMsgNotificationService;
|
import org.fanli.facade.user.exception.account.msg.MsgAccountDetailException;
|
import org.fanli.facade.user.service.account.msg.MsgAccountDetailService;
|
import org.fanli.facade.user.util.factory.MsgAccountDetailFactory;
|
import org.springframework.stereotype.Service;
|
|
@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();
|
}
|
}
|
|
}
|