|
@@ -6,6 +6,7 @@ import com.community.huiju.exception.WisdomException;
|
6
|
6
|
import com.community.huiju.model.ToCommunities;
|
7
|
7
|
import com.community.huiju.service.CommunityServiceI;
|
8
|
8
|
import com.community.huiju.vo.TaUserVO;
|
|
9
|
+import lombok.extern.slf4j.Slf4j;
|
9
|
10
|
import org.springframework.beans.BeanUtils;
|
10
|
11
|
import org.springframework.beans.factory.annotation.Autowired;
|
11
|
12
|
|
|
@@ -14,6 +15,7 @@ import javax.servlet.http.HttpSession;
|
14
|
15
|
/**
|
15
|
16
|
* 公共 controller
|
16
|
17
|
*/
|
|
18
|
+@Slf4j
|
17
|
19
|
public class BaseController {
|
18
|
20
|
|
19
|
21
|
@Autowired
|
|
@@ -41,6 +43,7 @@ public class BaseController {
|
41
|
43
|
throw new WisdomException("用户信息不能为空!");
|
42
|
44
|
}
|
43
|
45
|
|
|
46
|
+ log.info("用户当前sessionId:{}", session.getId());
|
44
|
47
|
UserElement userElement = new UserElement();
|
45
|
48
|
BeanUtils.copyProperties(userVO,userElement);
|
46
|
49
|
userElement.setLoginType(Constant.APP_LOGIN_TYPE);
|
|
@@ -54,6 +57,7 @@ public class BaseController {
|
54
|
57
|
* @return
|
55
|
58
|
*/
|
56
|
59
|
protected UserElement getUserElement(HttpSession session) {
|
|
60
|
+ log.info("用户当前sessionId:{}", session.getId());
|
57
|
61
|
UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
|
58
|
62
|
if (null == userElement) {
|
59
|
63
|
throw new WisdomException("用户 session 不存在!");
|