UsersMapper.java 4.32 KB
Newer Older
licc's avatar
licc committed
1 2 3 4 5 6 7
package cn.wisenergy.mapper;

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;

8
import java.io.Serializable;
9
import java.util.Date;
licc's avatar
licc committed
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
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);

    List<User> getList(Map<String, Object> map);

m1991's avatar
m1991 committed
47
    List<User> findAll();
licc's avatar
licc committed
48

m1991's avatar
m1991 committed
49
    User findByName(String name);
licc's avatar
licc committed
50

m1991's avatar
m1991 committed
51
    String findPswByName(String UserName);
licc's avatar
licc committed
52

m1991's avatar
m1991 committed
53 54
    void save(User user);

liqin's avatar
liqin committed
55 56 57 58 59 60
    /**
     * 获取用户信息
     * @return 用户信息
     */
    User getUserById(@Param("id") Long id);

licc's avatar
licc committed
61
    /**
licc's avatar
licc committed
62 63
     * 获取用户信息
     *
licc's avatar
licc committed
64 65 66
     * @param userId 用户id
     * @return 用户信息
     */
67 68 69
    User getByUserId(@Param("userId") String userId);

    /**
licc's avatar
licc committed
70 71
     * 获取用户信息
     *
72 73 74 75 76 77
     * @param userId 用户id
     * @return 用户信息
     */
    Integer ByUserId(@Param("userId") String userId);

    /**
licc's avatar
licc committed
78 79
     * 获取用户信息
     *
80 81 82 83
     * @param
     * @return 用户信息
     */
    Integer beInvitedCode1(@Param("beInvitedCode") String beInvitedCode);
licc's avatar
licc committed
84 85

    /**
licc's avatar
licc committed
86 87
     * 获取用户信息
     *
licc's avatar
licc committed
88 89 90 91
     * @param beInvitedCode 用户被邀请码
     * @return 用户信息
     */
    User getByBeInvitedCode(@Param("beInvitedCode") String beInvitedCode);
licc's avatar
licc committed
92

licc's avatar
licc committed
93 94
    /**
     * 获取黄金树以上会员用户
licc's avatar
licc committed
95
     *
licc's avatar
licc committed
96 97 98 99
     * @return
     */
    List<User> getAllGoldUser();

m1991's avatar
m1991 committed
100 101
    /**
     * 查询用户
licc's avatar
licc committed
102
     *
m1991's avatar
m1991 committed
103 104 105
     * @param param
     * @return
     */
licc's avatar
licc committed
106
    public List<User> getUsersListByMap(Map<String, Object> param);
m1991's avatar
m1991 committed
107 108

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

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

m1991's avatar
m1991 committed
114 115
    /**
     * 用户注册
116
     *  @param userId
m1991's avatar
m1991 committed
117 118 119 120
     * @param inviteCode
     * @param beInvitedCode
     * @param userLevel
     */
121
    Integer insertbyint(@Param("userId") String userId, @Param("inviteCode") String inviteCode, @Param("beInvitedCode") String beInvitedCode, @Param("userLevel") Integer userLevel, @Param("headImage") String headImage);
m1991's avatar
m1991 committed
122

123
    Integer save(@Param("userId") String userId, @Param("beInvitedCode") String beInvitedCode);
licc's avatar
licc committed
124 125 126 127 128

    User edit1(int userLevel, String intiveCode, String userId);

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

129 130
    Integer getById(@Param("userId") String userId);

licc's avatar
licc committed
131
    Integer BYQMById(@Param("userId") String userId);
m1991's avatar
m1991 committed
132

codezwjava's avatar
codezwjava committed
133 134
    /**
     * 根据userid获取获取所有的直接推荐人
licc's avatar
licc committed
135
     *
codezwjava's avatar
codezwjava committed
136 137 138
     * @param inviteCode 用户本人的邀请码
     * @return 所有填写此人的邀请码的用户
     */
139
    List<User> getByInviteCode(@Param("inviteCode") String inviteCode, @Param("userLevel") int userLevel);
codezwjava's avatar
codezwjava committed
140

141 142
    /**
     * 通过邀请码,获取用户信息
licc's avatar
licc committed
143
     *
144 145 146 147
     * @param inviteCode 邀请码
     * @return 用户信息
     */
    User queryByInviteCode(@Param("inviteCode") String inviteCode);
licc's avatar
licc committed
148 149 150 151 152 153 154 155

    /**
     * 通过用户等级,获取该等级用户列表
     *
     * @param userLevel 用户等级
     * @return 等级用户列表
     */
    List<User> getByLevel(@Param("userLevel") Integer userLevel);
156 157 158 159 160 161 162

    /**
     *
     * @param
     * @return
     */
    User biInvitedCode1(@Param("inviteCode") String inviteCode);
163 164 165 166 167 168 169 170


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

    /**
     * 根据用户的推荐人邀请码 查询上级用户的id
     * @param beInvitedCode
     * @return
     */
    String getUserByIntiveCode(String beInvitedCode);

    String getUserIdByIntiveCode(String outerUserId);
180 181 182 183 184 185

    /**
     * 获取所有的空投用户
     * @return
     */
    List<User> getAerialDeliveryUser();
licc's avatar
licc committed
186
}