yujian
2019-01-22 2366d2ada9e67f915a06b51b3c5be08a00847f0c
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
package com.yeshi.fanli.service.inter.user;
 
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
 
import com.yeshi.fanli.entity.admin.UserInfoAdmin;
import com.yeshi.fanli.entity.bus.user.InviteUser;
import com.yeshi.fanli.entity.bus.user.UserInfo;
 
public interface UserInfoService {
    /**
     * 通过openid和loginType,获取用户
     * 
     * @param loginType
     *            1:阿里系列(淘宝)账户
     * @param openid
     *            :登录淘宝后得到的openid
     * @param appid
     * @return 用户,如果不存在返回null
     */
    public UserInfo getUserByLoginTypeAndOpenId(int loginType, String openid, String appid);
 
    /**
     * 添加用户
     * 
     * @param form
     *            用户信息
     * @return 用户,添加失败返回null
     */
    public UserInfo addUser(UserInfo form, String appid);
 
    /**
     * 通过用户id获取用户
     * 
     * @param uid
     *            用户id
     * @return 用户
     */
    public UserInfo getUserById(long uid);
 
    /**
     * Mybatis通过用户ID获取用户信息
     * 
     * @param uid
     * @return
     */
    public UserInfo getUserByIdWithMybatis(long uid);
 
    public void update(UserInfo user);
 
    public long getUserCount();
 
    public List<UserInfo> getUserList(int index, String key);
 
    public int getUserCount(String key);
 
    public Map<String, Integer> getnewUserByDate(int days, Date date);
 
    public Map<String, Integer> getnewUserByMonth(int months, Date date);
 
    public Map<String, Integer> getUserTotalByDate(int days, Date date);
 
    public Map<String, Integer> getUserTotalByMonth(int months, Date date);
 
    public List<UserInfo> getUserListByUid(long uid);
 
    public double getFreezeAssets(double min);
 
    public double getCanAssets(double min);
 
    public long getRandomShamUser();
 
    public boolean inviteWXUserInfo(String code, UserInfo inviter);
 
    public void unBindUserInfo(UserInfo find, int type);
 
    public void addMoney(UserInfo userInfo, BigDecimal money);
 
    public List<UserInfo> findFriends(long id, int type);
 
    public List<InviteUser> getFriendsList(long id, int type, int page, int pageSize);
 
    public long getFriendsListCount(long id, int type);
 
    public int findFriendsCount(long id, int type);
 
    public boolean createUser(UserInfo form, String appid);
 
    public void updateLoginInfo(UserInfo user);
 
    public void cleanPassword(long id);
 
    public BigDecimal getNewPeopleHB(Long id);
 
    public BigDecimal getMyHB(Long id);
 
    /**
     * 查询用户信息  -- 用户管理列表
     * @param start
     * @param count
     * @param key
     * @param userType
     * @param days
     * @param startTime
     * @param endTime
     * @param orderMode
     * @return
     */
    public List<UserInfoAdmin> query(long start, int count, String key, Integer userType, 
            Integer days, String startTime, String endTime,Integer orderField, Integer orderMode);
 
    public long queryCount(String key, Integer userType, Integer days, String startTime, 
            String endTime);
 
    public double querySumMoney(String key, Integer userType, Integer days, String startTime, String endTime);
    
 
    /**
     * 选择性更新
     * @param record
     * @return
     */
    public int updateByPrimaryKeySelective(UserInfo record);
 
    /**
     * 其强制删除绑定信息
     * @param user
     * @param type
     */
    public void deleteBindInfo(UserInfo user, int type);
 
    /**
     * 根据id查询用户信息
     * @param id
     * @return
     */
    public UserInfo selectByPKey(Long id);
 
    
    /**
     * 超过 daysNum  天未登陆的用户
     * @param daysNum
     * @param list
     * @return
     */
    public List<Long> longTimeNoLogin(int daysNum, List<Long> list);
 
    /**
     * 根据电话号码、邀请码获取邀请用户
     * @param phone
     * @param inviteCode
     * @return
     */
    public UserInfo getInfoByPhoneOrInviteCode(String phone, String inviteCode);
 
}