|
@ -34,6 +34,9 @@ public class SystemManager {
|
|
|
{
|
|
|
ActionResult result = null;
|
|
|
TenantSession tenantSession = (TenantSession)session.getAttribute(ContextAttributes.TENANT_SESSION);
|
|
|
if (saasAdmin.equals(tenantSession.getTenant())){
|
|
|
tenantSession.setRole("admin");//标识为中心管理员角色
|
|
|
}
|
|
|
//特殊账户
|
|
|
if(user.equals("admin") && password.equals("JKZL"))
|
|
|
{
|
|
@ -42,9 +45,8 @@ public class SystemManager {
|
|
|
userInfo.setUserName("管理员");
|
|
|
session.setAttribute("userInfo",userInfo);
|
|
|
tenantSession.setUserCode("admin");//设置租户code
|
|
|
tenantSession.setRole("admin");//标识为管理员账号
|
|
|
session.setAttribute(ContextAttributes.TENANT_SESSION, tenantSession);
|
|
|
LocalContext.getContext().setAttachment(ContextAttributes.TENANT_NAME,tenantSession.getUserCode());
|
|
|
LocalContext.getContext().setAttachment(ContextAttributes.TENANT_NAME,tenantSession.getTenant());
|
|
|
LocalContext.getContext().setAttachment(ContextAttributes.SCHEMA, tenantSession.getSchema());
|
|
|
|
|
|
result = new ActionResult(true,"登录成功!");
|
|
@ -64,9 +66,6 @@ public class SystemManager {
|
|
|
String userPassword = userInfo.getPassword();
|
|
|
if(userPassword.equals(DigestUtils.md5Hex(password + saltValue)))
|
|
|
{
|
|
|
if (saasAdmin.equals(user)){
|
|
|
tenantSession.setRole("admin");//标识为管理员账号
|
|
|
}
|
|
|
tenantSession.setUserCode(user);
|
|
|
session.setAttribute(ContextAttributes.TENANT_SESSION, tenantSession);
|
|
|
session.setAttribute("userInfo",userInfo);
|