Commit 60001fbe by WeiCong

登陆类增加异常日志打印

parent e949a165
...@@ -4,7 +4,10 @@ import log.Log; ...@@ -4,7 +4,10 @@ import log.Log;
import log.LogFactory; import log.LogFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.sss.common.model.IDatafield; import org.sss.common.model.IDatafield;
import org.sss.common.model.ILoginContext; import org.sss.common.model.ILoginContext;
import org.sss.common.model.IMenuItem; import org.sss.common.model.IMenuItem;
...@@ -17,6 +20,7 @@ import org.sss.presentation.noui.api.response.ResultUtil; ...@@ -17,6 +20,7 @@ import org.sss.presentation.noui.api.response.ResultUtil;
import org.sss.presentation.noui.common.Constants; import org.sss.presentation.noui.common.Constants;
import org.sss.presentation.noui.context.NoUiContext; import org.sss.presentation.noui.context.NoUiContext;
import org.sss.presentation.noui.context.NoUiContextManager; import org.sss.presentation.noui.context.NoUiContextManager;
import org.sss.presentation.noui.context.TxInfo;
import org.sss.presentation.noui.jwt.JWT; import org.sss.presentation.noui.jwt.JWT;
import org.sss.presentation.noui.jwt.JwtLogin; import org.sss.presentation.noui.jwt.JwtLogin;
import org.sss.presentation.noui.jwt.RedisLoginInfo; import org.sss.presentation.noui.jwt.RedisLoginInfo;
...@@ -39,6 +43,7 @@ public class LoginController { ...@@ -39,6 +43,7 @@ public class LoginController {
NoUiContext context=null; NoUiContext context=null;
try { try {
NoUiRequest noUiRequest = new NoUiRequest(request, "", dataMap); NoUiRequest noUiRequest = new NoUiRequest(request, "", dataMap);
TxInfo.putTxInfo("login","/login","login");
Map<String, Object> map = new HashMap<>();//此map会存储返回错误码 Map<String, Object> map = new HashMap<>();//此map会存储返回错误码
String userId = noUiRequest.getDataMap().get(Constants.USERNAME).toString(); String userId = noUiRequest.getDataMap().get(Constants.USERNAME).toString();
String password = noUiRequest.getDataMap().get(Constants.PASSWORD).toString(); String password = noUiRequest.getDataMap().get(Constants.PASSWORD).toString();
...@@ -121,6 +126,7 @@ public class LoginController { ...@@ -121,6 +126,7 @@ public class LoginController {
//context.getSupport().disconnect(); //context.getSupport().disconnect();
context.dispose(); context.dispose();
} }
TxInfo.releaseCurrTxInfo();
} }
// log.debug("Login command is finished"); // log.debug("Login command is finished");
// return ResultUtil.result(ErrorCodes.ERROR, "login failed", null); // return ResultUtil.result(ErrorCodes.ERROR, "login failed", null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment