Browse Source

报销开发子报销列表新增字段

anderx 2 years ago
parent
commit
7f62ec4665

+ 5 - 5
src/main/java/com/goafanti/common/bo/Result.java

@@ -1,16 +1,16 @@
 package com.goafanti.common.bo;
 
+import org.apache.shiro.SecurityUtils;
+
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
-
-import org.apache.shiro.SecurityUtils;
 public class Result {
 	private Object		data;
 	private List<Error>	error	= new ArrayList<Error>();
-	private Serializable token;
+	private String token;
 	public Result() {
-		this.token = SecurityUtils.getSubject().getSession().getId();
+		this.token = (String) SecurityUtils.getSubject().getSession().getId();
 	}
 
 	public Result(Object data) {
@@ -63,7 +63,7 @@ public class Result {
 		return token;
 	}
 
-	public void setToken(Serializable token) {
+	public void setToken(String  token) {
 		this.token = token;
 	}
 }

+ 15 - 17
src/main/java/com/goafanti/user/controller/UserLoginController.java

@@ -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;