diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/api/OrderFeignClient.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/api/OrderFeignClient.java index 3710022e2..8230c31b3 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/api/OrderFeignClient.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/api/OrderFeignClient.java @@ -1,10 +1,6 @@ package com.youlai.mall.oms.api; -import com.youlai.common.result.Result; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestParam; /** * @author haoxr diff --git a/youlai-auth/src/main/java/com/youlai/auth/controller/OAuthController.java b/youlai-auth/src/main/java/com/youlai/auth/controller/OAuthController.java index 4e3286569..5d57e190b 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/controller/OAuthController.java +++ b/youlai-auth/src/main/java/com/youlai/auth/controller/OAuthController.java @@ -53,7 +53,6 @@ public class OAuthController { @ApiIgnore Principal principal, @ApiIgnore @RequestParam Map parameters ) throws HttpRequestMethodNotSupportedException { - JwtTokenPair jwtTokenPair = new JwtTokenPair(); /** * 获取登录认证的客户端ID @@ -64,18 +63,14 @@ public class OAuthController { */ String clientId = JwtUtils.getAuthClientId(); OAuthClientEnum client = OAuthClientEnum.getByClientId(clientId); - switch (client) { case WEAPP: // 微信小程序 - jwtTokenPair = weAppService.login(parameters); - break; + return Result.success(weAppService.login(parameters)); case TEST: // knife4j接口测试文档使用 client_id/client_secret : client/123456 return tokenEndpoint.postAccessToken(principal, parameters).getBody(); default: -// oAuth2AccessToken = tokenEndpoint.postAccessToken(principal, parameters).getBody(); - break; + return Result.success(tokenEndpoint.postAccessToken(principal, parameters).getBody()); } - return Result.success(jwtTokenPair); } @ApiOperation(value = "注销", notes = "logout") diff --git a/youlai-auth/src/main/java/com/youlai/auth/service/WeAppService.java b/youlai-auth/src/main/java/com/youlai/auth/service/WeAppService.java index c2fec23c2..e04df7931 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/service/WeAppService.java +++ b/youlai-auth/src/main/java/com/youlai/auth/service/WeAppService.java @@ -53,6 +53,7 @@ public class WeAppService { public JwtTokenPair login(Map parameters) { String code = parameters.get("code"); + String userInfo = parameters.get("userInfo"); if (StrUtil.isBlank(code)) { throw new BizException("code不能为空");