This commit is contained in:
parent
743a2b2f53
commit
341c9f0e4e
|
@ -64,7 +64,7 @@ public class SysThirdLoginConfigServiceImpl extends BaseServiceImpl<SysThirdLogi
|
||||||
.eq(SysThirdLoginConfigEntity::getOpenType, openType));
|
.eq(SysThirdLoginConfigEntity::getOpenType, openType));
|
||||||
|
|
||||||
if (config == null) {
|
if (config == null) {
|
||||||
throw new ServerException("未找到第三方登录配置");
|
throw new ServerException("未配置第三方登录,请配置后再尝试");
|
||||||
}
|
}
|
||||||
|
|
||||||
AuthRequest authRequest = switch (ThirdLoginEnum.toEnum(openType)) {
|
AuthRequest authRequest = switch (ThirdLoginEnum.toEnum(openType)) {
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package net.maku.system.service.impl;
|
package net.maku.system.service.impl;
|
||||||
|
|
||||||
import com.aliyun.oss.ServiceException;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import me.zhyd.oauth.model.AuthUser;
|
import me.zhyd.oauth.model.AuthUser;
|
||||||
|
import net.maku.framework.common.exception.ServerException;
|
||||||
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
|
import net.maku.framework.mybatis.service.impl.BaseServiceImpl;
|
||||||
import net.maku.system.convert.SysThirdLoginConvert;
|
import net.maku.system.convert.SysThirdLoginConvert;
|
||||||
import net.maku.system.dao.SysThirdLoginDao;
|
import net.maku.system.dao.SysThirdLoginDao;
|
||||||
|
@ -54,7 +54,7 @@ public class SysThirdLoginServiceImpl extends BaseServiceImpl<SysThirdLoginDao,
|
||||||
SysThirdLoginEntity entity = baseMapper.selectOne(Wrappers.<SysThirdLoginEntity>lambdaQuery()
|
SysThirdLoginEntity entity = baseMapper.selectOne(Wrappers.<SysThirdLoginEntity>lambdaQuery()
|
||||||
.eq(SysThirdLoginEntity::getOpenType, openType).eq(SysThirdLoginEntity::getOpenId, openId));
|
.eq(SysThirdLoginEntity::getOpenType, openType).eq(SysThirdLoginEntity::getOpenId, openId));
|
||||||
if (entity == null) {
|
if (entity == null) {
|
||||||
throw new ServiceException("还未绑定用户,请先绑定用户");
|
throw new ServerException("还未绑定用户,请先绑定用户");
|
||||||
}
|
}
|
||||||
|
|
||||||
return entity.getUserId();
|
return entity.getUserId();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user