UsersMapper.java 3.58 KB
Newer Older
licc's avatar
licc committed
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
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;

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
46
    List<User> findAll();
licc's avatar
licc committed
47

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

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

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

licc's avatar
licc committed
54
    /**
licc's avatar
licc committed
55 56
     * 获取用户信息
     *
licc's avatar
licc committed
57 58 59
     * @param userId 用户id
     * @return 用户信息
     */
60 61 62
    User getByUserId(@Param("userId") String userId);

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

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

    /**
licc's avatar
licc committed
79 80
     * 获取用户信息
     *
licc's avatar
licc committed
81 82 83 84
     * @param beInvitedCode 用户被邀请码
     * @return 用户信息
     */
    User getByBeInvitedCode(@Param("beInvitedCode") String beInvitedCode);
licc's avatar
licc committed
85

licc's avatar
licc committed
86 87
    /**
     * 获取黄金树以上会员用户
licc's avatar
licc committed
88
     *
licc's avatar
licc committed
89 90 91 92
     * @return
     */
    List<User> getAllGoldUser();

m1991's avatar
m1991 committed
93 94
    /**
     * 查询用户
licc's avatar
licc committed
95
     *
m1991's avatar
m1991 committed
96 97 98
     * @param param
     * @return
     */
licc's avatar
licc committed
99
    public List<User> getUsersListByMap(Map<String, Object> param);
m1991's avatar
m1991 committed
100 101

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

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

m1991's avatar
m1991 committed
107 108
    /**
     * 用户注册
licc's avatar
licc committed
109
     *
m1991's avatar
m1991 committed
110 111 112 113 114
     * @param userId
     * @param inviteCode
     * @param beInvitedCode
     * @param userLevel
     */
licc's avatar
licc committed
115
    Integer save(@Param("userId") String userId, @Param("inviteCode") String inviteCode, @Param("beInvitedCode") String beInvitedCode, @Param("userLevel") Integer userLevel);
m1991's avatar
m1991 committed
116

licc's avatar
licc committed
117 118 119 120 121 122 123
    Integer insertbyint(@Param("userId") String userId, @Param("beInvitedCode") String beInvitedCode);

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

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

    Integer BYQMById(@Param("userId") String userId);
m1991's avatar
m1991 committed
124

codezwjava's avatar
codezwjava committed
125 126
    /**
     * 根据userid获取获取所有的直接推荐人
licc's avatar
licc committed
127
     *
codezwjava's avatar
codezwjava committed
128 129 130
     * @param inviteCode 用户本人的邀请码
     * @return 所有填写此人的邀请码的用户
     */
131
    List<User> getByInviteCode(@Param("inviteCode") String inviteCode, @Param("userLevel") int userLevel);
codezwjava's avatar
codezwjava committed
132

133 134
    /**
     * 通过邀请码,获取用户信息
licc's avatar
licc committed
135
     *
136 137 138 139
     * @param inviteCode 邀请码
     * @return 用户信息
     */
    User queryByInviteCode(@Param("inviteCode") String inviteCode);
licc's avatar
licc committed
140 141 142 143 144 145 146 147

    /**
     * 通过用户等级,获取该等级用户列表
     *
     * @param userLevel 用户等级
     * @return 等级用户列表
     */
    List<User> getByLevel(@Param("userLevel") Integer userLevel);
148 149 150 151 152 153 154

    /**
     *
     * @param
     * @return
     */
    User biInvitedCode1(@Param("inviteCode") String inviteCode);
licc's avatar
licc committed
155
}