feat: 添加根据手机号获取用户认证信息
This commit is contained in:
@@ -56,6 +56,14 @@ public interface UserMapper extends BaseMapper<User> {
|
||||
*/
|
||||
UserAuthInfo getUserAuthInfoByOpenId(String openid);
|
||||
|
||||
/**
|
||||
* 根据手机号获取用户认证信息
|
||||
*
|
||||
* @param mobile
|
||||
* @return
|
||||
*/
|
||||
UserAuthInfo getUserAuthInfoByMobile(String mobile);
|
||||
|
||||
/**
|
||||
* 获取导出用户列表
|
||||
*
|
||||
@@ -73,5 +81,4 @@ public interface UserMapper extends BaseMapper<User> {
|
||||
*/
|
||||
UserBO getUserProfile(Long userId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
/**
|
||||
* 用户业务接口
|
||||
*
|
||||
* @author haoxr
|
||||
* @author Ray.Hao
|
||||
* @since 2022/1/14
|
||||
*/
|
||||
public interface UserService extends IService<User> {
|
||||
@@ -174,4 +174,12 @@ public interface UserService extends IService<User> {
|
||||
* @param openId 微信 OpenID
|
||||
*/
|
||||
void registerOrBindWechatUser(String openId);
|
||||
|
||||
/**
|
||||
* 根据手机号获取用户认证信息
|
||||
*
|
||||
* @param mobile 手机号
|
||||
* @return {@link UserAuthInfo}
|
||||
*/
|
||||
UserAuthInfo getUserAuthInfoByMobile(String mobile);
|
||||
}
|
||||
|
||||
@@ -159,6 +159,24 @@
|
||||
t1.openid = #{openid} AND t1.is_deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 根据手机号获取用户的认证信息 -->
|
||||
<select id="getUserAuthInfoByMobile" resultMap="UserAuthMap">
|
||||
SELECT
|
||||
t1.id userId,
|
||||
t1.username,
|
||||
t1.nickname,
|
||||
t1.PASSWORD,
|
||||
t1.STATUS,
|
||||
t1.dept_id ,
|
||||
t3.CODE
|
||||
FROM
|
||||
sys_user t1
|
||||
LEFT JOIN sys_user_role t2 ON t2.user_id = t1.id
|
||||
LEFT JOIN sys_role t3 ON t3.id = t2.role_id
|
||||
WHERE
|
||||
t1.mobile = #{mobile} AND t1.is_deleted = 0
|
||||
</select>
|
||||
|
||||
<!-- 获取用户导出列表 -->
|
||||
<select id="listExportUsers" resultType="com.youlai.boot.system.model.dto.UserExportDTO">
|
||||
SELECT
|
||||
@@ -215,4 +233,6 @@
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user