提交 872ff7ab authored 作者: hzh's avatar hzh

代码优化

上级 dea281b3
package org.dromara.auth.service.impl; package org.dromara.auth.service.impl;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference; import org.apache.dubbo.config.annotation.DubboReference;
import org.dromara.auth.service.IAuthStrategy; import org.dromara.auth.service.IAuthStrategy;
import org.dromara.common.core.domain.model.LoginBody; import org.dromara.common.core.domain.model.LoginBody;
...@@ -23,6 +24,7 @@ import static org.dromara.common.core.utils.ServletUtils.getClientIP; ...@@ -23,6 +24,7 @@ import static org.dromara.common.core.utils.ServletUtils.getClientIP;
* @date 2025-02-08 * @date 2025-02-08
* @desc TODO * @desc TODO
**/ **/
@Slf4j
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public abstract class AbstractMallStrategy implements IAuthStrategy { public abstract class AbstractMallStrategy implements IAuthStrategy {
...@@ -47,7 +49,12 @@ public abstract class AbstractMallStrategy implements IAuthStrategy { ...@@ -47,7 +49,12 @@ public abstract class AbstractMallStrategy implements IAuthStrategy {
remoteUserBo.setNickName(remoteUserBo.getUserName()); remoteUserBo.setNickName(remoteUserBo.getUserName());
remoteUserBo.setUserType(UserType.APP_USER.getUserType()); remoteUserBo.setUserType(UserType.APP_USER.getUserType());
remoteUserBo.setPhonenumber(loginUser.getPhone()); remoteUserBo.setPhonenumber(loginUser.getPhone());
try {
thirdUserId = remoteUserService.registerUserInfo(remoteUserBo); thirdUserId = remoteUserService.registerUserInfo(remoteUserBo);
} catch (Exception e) {
log.info("用户已存在:{},租户id:{}", remoteUserBo.getUserName(), remoteUserBo.getTenantId());
thirdUserId = remoteUserService.getUserInfo(remoteUserBo.getUserName(), remoteUserBo.getTenantId()).getUserId();
}
} }
Long memberId = null; Long memberId = null;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论