南网oss登录接口修改

This commit is contained in:
liang.chao 2024-01-30 15:19:11 +08:00
parent 713bc6ece2
commit 97341c2561
2 changed files with 14 additions and 10 deletions

View File

@ -3,14 +3,17 @@ package com.bonus.sgzb.auth.controller;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.bonus.sgzb.auth.form.*;
import com.bonus.sgzb.auth.service.NwRegisterService;
import com.bonus.sgzb.auth.service.NwUserLoginService;
import com.bonus.sgzb.common.core.constant.CacheConstants; import com.bonus.sgzb.common.core.constant.CacheConstants;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
import com.bonus.sgzb.common.redis.service.RedisService; import com.bonus.sgzb.common.redis.service.RedisService;
import com.bonus.sgzb.system.api.RemoteUserService; import com.bonus.sgzb.system.api.RemoteUserService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisConnectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.bonus.sgzb.auth.form.LoginBody;
import com.bonus.sgzb.auth.form.RegisterBody;
import com.bonus.sgzb.auth.service.SysLoginService; import com.bonus.sgzb.auth.service.SysLoginService;
import com.bonus.sgzb.common.core.domain.R; import com.bonus.sgzb.common.core.domain.R;
import com.bonus.sgzb.common.core.utils.JwtUtils; import com.bonus.sgzb.common.core.utils.JwtUtils;

View File

@ -26,8 +26,8 @@ public class NwRegisterServiceImpl implements NwRegisterService {
@Override @Override
public String registersNew(HttpServletRequest request, RegisterForms registerForms) { public String registersNew(HttpServletRequest request, RegisterForms registerForms) {
log.info("统一个人手机注册 registersForPersonal方法 入参 request:{}, registerForms:{}", request, JSON.toJSONString(registerForms)); /* log.info("统一个人手机注册 registersForPersonal方法 入参 request:{}, registerForms:{}", request, JSON.toJSONString(registerForms));
/* 校验请求参数 */ *//* 校验请求参数 *//*
this.checkRequestParam(request, registerForms); this.checkRequestParam(request, registerForms);
Integer loginModeType = registerForms.getLoginModeType(); Integer loginModeType = registerForms.getLoginModeType();
NwApp nwApp = new NwApp(); NwApp nwApp = new NwApp();
@ -53,11 +53,11 @@ public class NwRegisterServiceImpl implements NwRegisterService {
RespLoginData respLoginData = null; RespLoginData respLoginData = null;
//用户中心用户id //用户中心用户id
String ossExternalId = null; String ossExternalId = null;
/* 查询商城是否存在当前用户 */ *//* 查询商城是否存在当前用户 *//*
// UserAccount mallUser = this.queryUserByMall(registerForms); // UserAccount mallUser = this.queryUserByMall(registerForms);
/* 查询用户中心是否存在当前用户 */ *//* 查询用户中心是否存在当前用户 *//*
CloudUserVo cloudUserVo = this.queryUserBySso(registerForms); CloudUserVo cloudUserVo = this.queryUserBySso(registerForms);
/* 数据幂等性操作 记录日志 */ *//* 数据幂等性操作 记录日志 *//*
RegistersVo registersVo = getRegisterVo(registerForms); RegistersVo registersVo = getRegisterVo(registerForms);
log.error("check001_registersVo:{}", JsonUtils.object2Json(registersVo)); log.error("check001_registersVo:{}", JsonUtils.object2Json(registersVo));
@ -68,7 +68,7 @@ public class NwRegisterServiceImpl implements NwRegisterService {
throw new BaseException(ExceptionDict.USER_NAME_EXISTS_CODE, ExceptionDict.USER_NAME_EXISTS_MSG); throw new BaseException(ExceptionDict.USER_NAME_EXISTS_CODE, ExceptionDict.USER_NAME_EXISTS_MSG);
} }
} }
/* 添加商城用户逻辑 */ *//* 添加商城用户逻辑 *//*
log.error("check002_respLoginData:{}", JsonUtils.object2Json(respLoginData)); log.error("check002_respLoginData:{}", JsonUtils.object2Json(respLoginData));
if (respLoginData.getCode().equals(CodeConstants.HTTP_RESPONSE_CODE_200)) { if (respLoginData.getCode().equals(CodeConstants.HTTP_RESPONSE_CODE_200)) {
if (null != cloudUserVo) { if (null != cloudUserVo) {
@ -106,7 +106,8 @@ public class NwRegisterServiceImpl implements NwRegisterService {
deleteInterceptor(); deleteInterceptor();
deleteKey(registerForms); deleteKey(registerForms);
throw new UserException("9999", e.getMessage()); throw new UserException("9999", e.getMessage());
} }*/
return null;
} }
private void checkRequestParam(HttpServletRequest request, RegisterForms registerForms) { private void checkRequestParam(HttpServletRequest request, RegisterForms registerForms) {