From b60fe0515ce130fab9344276a4be47522cc3e986 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 30 May 2022 15:23:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B9=E6=B3=95=E4=B8=A2=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/controller/GovWebController.java | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java b/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java index 43b2719dc8..08c019f22b 100644 --- a/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java +++ b/epmet-auth/src/main/java/com/epmet/controller/GovWebController.java @@ -11,10 +11,7 @@ import com.epmet.service.GovWebService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** @@ -84,4 +81,24 @@ public class GovWebController { return new Result().ok(r); } + + /** + * desc: 根据用户id + * + * @return com.epmet.commons.tools.utils.Result + * @author LiuJanJun + * @date 2021/3/8 5:07 下午 + */ + @PostMapping("generateTokenBySSOKey/{uuid}/{userId}/{app}/{client}") + public Result generateTokenBySSOKey(@PathVariable(value = "uuid")String uuid, @PathVariable String userId, + @RequestParam String customerId, + @RequestParam String client, + @RequestParam String app) { + //判断是否非法登陆 + /*if (!redisUtils.hasKey(RedisKeys.getIcLoginAuthKey(customerId,uuid))){ + log.error("有人使用userid:{} 非法登陆",userId); + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode()); + }*/ + return new Result().ok(govWebService.generateTokenBySSOKey(customerId,userId,app,client)); + } }