UsersMapper.java 5.88 KB
Newer Older
licc's avatar
licc committed
1 2
package cn.wisenergy.mapper;

3

licc's avatar
licc committed
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
import cn.wisenergy.model.app.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author 86187
 * @ Description:
 * @ Author     : 86187
 * @ Date       : 2021/1/6 15:32
 */
@Mapper
public interface UsersMapper extends BaseMapper<User> {
    /**
     * 添加
     *
     * @param user 用户信息
     * @return 用户信息
     */
    int add(User user);

    /**
     * 编辑
     *
     * @param user 用户信息
     * @return 修改是否成功
     */
    int edit(User user);

    /**
     * 删除
     *
     * @param id 用户id
     * @return 删除是否成功
     */
    int delById(@Param("id") Integer id);

44
   List<User> getList(Map<String, Object> map);
licc's avatar
licc committed
45

licc's avatar
licc committed
46 47 48 49 50 51
    /**
     * 获取所有的非普通用户列表
     *
     * @return 非普通用户列表
     */
    List<User> findAllNotZeroUser();
licc's avatar
licc committed
52

53
 User findByName(String name);
licc's avatar
licc committed
54

m1991's avatar
m1991 committed
55
    String findPswByName(String UserName);
licc's avatar
licc committed
56

m1991's avatar
m1991 committed
57 58
    void save(User user);

liqin's avatar
liqin committed
59 60
    /**
     * 获取用户信息
licc's avatar
licc committed
61
     *
liqin's avatar
liqin committed
62 63 64 65
     * @return 用户信息
     */
    User getUserById(@Param("id") Long id);

licc's avatar
licc committed
66
    /**
licc's avatar
licc committed
67 68
     * 获取用户信息
     *
licc's avatar
licc committed
69 70 71
     * @param userId 用户id
     * @return 用户信息
     */
72 73 74
    User getByUserId(@Param("userId") String userId);

    /**
licc's avatar
licc committed
75 76
     * 获取用户信息
     *
77 78 79 80 81 82
     * @param userId 用户id
     * @return 用户信息
     */
    Integer ByUserId(@Param("userId") String userId);

    /**
licc's avatar
licc committed
83 84
     * 获取用户信息
     *
85 86 87 88
     * @param
     * @return 用户信息
     */
    Integer beInvitedCode1(@Param("beInvitedCode") String beInvitedCode);
licc's avatar
licc committed
89 90

    /**
licc's avatar
licc committed
91 92
     * 获取用户信息
     *
licc's avatar
licc committed
93 94 95 96
     * @param beInvitedCode 用户被邀请码
     * @return 用户信息
     */
    User getByBeInvitedCode(@Param("beInvitedCode") String beInvitedCode);
licc's avatar
licc committed
97

licc's avatar
licc committed
98 99
    /**
     * 获取黄金树以上会员用户
licc's avatar
licc committed
100
     *
licc's avatar
licc committed
101 102 103 104
     * @return
     */
    List<User> getAllGoldUser();

m1991's avatar
m1991 committed
105 106
    /**
     * 查询用户
licc's avatar
licc committed
107
     *
108
     *
m1991's avatar
m1991 committed
109 110 111
     * @param param
     * @return
     */
licc's avatar
licc committed
112
    public List<User> getUsersListByMap(Map<String, Object> param);
m1991's avatar
m1991 committed
113 114

    //根据手机号查询用户Integer
licc's avatar
licc committed
115
    User queryUsersByPhone(@Param("userId") String userId);
m1991's avatar
m1991 committed
116

117
    //根据用户的推荐人邀请码比对推荐人的本人邀请码,查询推荐人的用户ID
licc's avatar
licc committed
118
    Integer inviteCodeBeInvitedCode(@Param("beInvitedCode") Integer beInvitedCode);
119

m1991's avatar
m1991 committed
120 121
    /**
     * 用户注册
licc's avatar
licc committed
122 123
     *
     * @param userId
m1991's avatar
m1991 committed
124 125 126 127
     * @param inviteCode
     * @param beInvitedCode
     * @param userLevel
     */
128
    Integer insertbyint(@Param("userId") String userId, @Param("inviteCode") String inviteCode, @Param("beInvitedCode") String beInvitedCode, @Param("userLevel") Integer userLevel, @Param("headImage") String headImage,@Param("frozen") Integer frozen);
m1991's avatar
m1991 committed
129

130
    Integer save(@Param("userId") String userId, @Param("beInvitedCode") String beInvitedCode);
licc's avatar
licc committed
131

132
 User edit1(int userLevel, String intiveCode, String userId);
licc's avatar
licc committed
133 134 135

    Integer getuserIdById(@Param("userId") String userId);

136 137
    Integer getById(@Param("userId") String userId);

138
    String BYQMById(@Param("userId") String userId);
m1991's avatar
m1991 committed
139

codezwjava's avatar
codezwjava committed
140 141
    /**
     * 根据userid获取获取所有的直接推荐人
licc's avatar
licc committed
142
     *
codezwjava's avatar
codezwjava committed
143 144 145
     * @param inviteCode 用户本人的邀请码
     * @return 所有填写此人的邀请码的用户
     */
146
    List<User> getByInviteCode(@Param("inviteCode") String inviteCode, @Param("userLevel") int userLevel);
codezwjava's avatar
codezwjava committed
147

148 149
    /**
     * 通过邀请码,获取用户信息
licc's avatar
licc committed
150
     *
151 152 153 154
     * @param inviteCode 邀请码
     * @return 用户信息
     */
    User queryByInviteCode(@Param("inviteCode") String inviteCode);
licc's avatar
licc committed
155 156 157 158 159 160 161

    /**
     * 通过用户等级,获取该等级用户列表
     *
     * @param userLevel 用户等级
     * @return 等级用户列表
     */
162
    List<cn.wisenergy.model.app.User> getByLevel(@Param("userLevel") Integer userLevel);
163 164 165 166 167 168

    /**
     * @param
     * @return
     */
    User biInvitedCode1(@Param("inviteCode") String inviteCode);
169 170 171 172


    /**
     * 用户邀请码查询用户数据
licc's avatar
licc committed
173
     *
174 175 176 177
     * @param inviteCode
     * @return
     */
    User InvitedCode2(@Param("inviteCode") String inviteCode);
codezwjava's avatar
codezwjava committed
178 179 180

    /**
     * 根据用户的推荐人邀请码 查询上级用户的id
licc's avatar
licc committed
181
     *
codezwjava's avatar
codezwjava committed
182 183 184 185 186 187
     * @param beInvitedCode
     * @return
     */
    String getUserByIntiveCode(String beInvitedCode);

    String getUserIdByIntiveCode(String outerUserId);
188 189 190

    /**
     * 获取所有的空投用户
licc's avatar
licc committed
191 192
     * 且注册时间为一月之前
     *
193 194
     * @return
     */
195
    List<User> getAerialDeliveryUserBeforOneMonth(@Param("before") String before,
196
                                                      @Param("now") String now);
197 198 199

    /**
     * 随机获取一条小于当前id的用户 即: 比当前用户早注册的用户
licc's avatar
licc committed
200
     *
201 202 203 204
     * @param id
     * @return
     */
    User randOneGetUserByUserId(Integer id);
codezwjava's avatar
codezwjava committed
205 206 207 208 209 210 211 212 213 214 215 216 217 218

    /**
     * 根据邀请码获取所有的下级用户
     * @param userId
     * @return
     */
    List<User> getListByIntvitedCode(String userId);

    /**
     * 根据当前用户的推荐人邀请码获取推荐人的用户信息(上级用户信息)
     * @param beInvitedCode
     * @return
     */
    User getuserByBeInvitedCode(String beInvitedCode);
219 220 221 222 223 224 225 226 227 228 229 230 231 232

    /**
     * 获取在团队中处于同一位置的用户集合
     * @param beInvitedCode
     * @return
     */
    List<User> getListUserByBeInvitedCode(String beInvitedCode);

    /**
     * 通过邀请码获取用户信息
     * @param inviteCode
     * @return
     */
    User getUserByInviteCode(String inviteCode);
233 234 235 236 237 238 239 240

    /**
     * 根据用户的userid查询用户对象
     * @param userId
     * @return
     */
    User getUserByUserId(String userId);

241 242 243 244 245 246 247
    /**
     * 分页查询所有用户信息
     * @param map
     * @return
     */
    List<User> getUserList(Map<String, Object> map);

248 249 250 251 252 253
 /**
  * 统计用户总记录数
  *
  * @param map 入参
  * @return 结果
  */
254
 int countUser( Map<String, Object> map);
255

licc's avatar
licc committed
256
}