|
|
@@ -1,21 +1,6 @@
|
|
|
package com.goafanti.user.controller;
|
|
|
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.apache.shiro.SecurityUtils;
|
|
|
-import org.apache.shiro.web.util.SavedRequest;
|
|
|
-import org.apache.shiro.web.util.WebUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
-import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
-
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.goafanti.app.bo.UserBasicInfo;
|
|
|
@@ -29,6 +14,19 @@ import com.goafanti.common.utils.TimeUtils;
|
|
|
import com.goafanti.common.utils.VerifyCodeUtils;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.user.service.UserService;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.apache.shiro.SecurityUtils;
|
|
|
+import org.apache.shiro.web.util.SavedRequest;
|
|
|
+import org.apache.shiro.web.util.WebUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.util.Date;
|
|
|
|
|
|
@Controller
|
|
|
public class UserLoginController extends BaseController {
|
|
|
@@ -63,7 +61,7 @@ public class UserLoginController extends BaseController {
|
|
|
jo.put("requestURI", sr.getRequestURI());
|
|
|
jo.put("queryString", sr.getQueryString());
|
|
|
}
|
|
|
- res.setToken(SecurityUtils.getSubject().getSession().getId());
|
|
|
+ res.setToken((String) SecurityUtils.getSubject().getSession().getId());
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
@@ -84,7 +82,7 @@ public class UserLoginController extends BaseController {
|
|
|
UserBasicInfo ubi=userService.selectBaseInfo();
|
|
|
jo.put("easemobName",ubi.getEasemobName());
|
|
|
jo.put("easemobPass",ubi.getEasemobPass());
|
|
|
- res.setToken(SecurityUtils.getSubject().getSession().getId());
|
|
|
+ res.setToken((String) SecurityUtils.getSubject().getSession().getId());
|
|
|
res.setData(jo);
|
|
|
// 发送推送消息
|
|
|
return res;
|