admin
2019-02-19 9192375a211cff2f91d1f65f932f97612d8dbcdb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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();
        }
    }
 
}