From 3fd36846ad612f627c0784587dc6099a322a158e Mon Sep 17 00:00:00 2001 From: houruijun <411269194@kidgrow.com> Date: Wed, 24 Jun 2020 18:55:09 +0800 Subject: [PATCH] 1.编写扣费业务4大接口(AI 调用前,失败退,调用后,人工读) 2.增加写mq消息队列 3.增加扣费业务相关全局静态值 4.调整扣费,套餐,套餐记录services里面的调用关系。 --- kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/controller/OAuth2Controller.java | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/controller/OAuth2Controller.java b/kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/controller/OAuth2Controller.java index f5e695b..9478d1a 100644 --- a/kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/controller/OAuth2Controller.java +++ b/kidgrow-uaa/kidgrow-uaa-server/src/main/java/com/kidgrow/oauth2/controller/OAuth2Controller.java @@ -6,6 +6,7 @@ import com.kidgrow.authclient.util.AuthUtils; import com.kidgrow.common.constant.SecurityConstants; import com.kidgrow.common.context.ClientContextHolder; +import com.kidgrow.common.utils.AesUtils; import com.kidgrow.common.utils.ResponseUtil; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -62,8 +63,12 @@ public void getUserTokenInfo( @ApiParam(required = true, name = "username", value = "账号") String username, @ApiParam(required = true, name = "password", value = "密码") String password, - HttpServletRequest request, HttpServletResponse response) throws IOException { - UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(username, password); + HttpServletRequest request, HttpServletResponse response) throws Exception { + //先解密 + String decryptName = AesUtils.desEncrypt(username).trim(); + String decryptPwd = AesUtils.desEncrypt(password).trim(); + + UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(decryptName, decryptPwd); writerToken(request, response, token, "用户名或密码错误"); } -- Gitblit v1.8.0