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)); + } }