| | |
| | | package com.panzhihua.common.controller; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | |
| | | return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取request对象 |
| | | */ |
| | | public HttpServletResponse getResponse() { |
| | | return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getResponse(); |
| | | } |
| | | |
| | | /** |
| | | * 获取登录对象信息 |
| | | * |
| | |
| | | public Long getCommunityId() { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | Long communityId = loginUserInfo.getCommunityId(); |
| | | if (null == communityId || 0 == communityId) { |
| | | throw new ServiceException("用户未绑定社区"); |
| | | } |
| | | // if (null == communityId) { |
| | | // throw new ServiceException("用户未绑定社区"); |
| | | // } |
| | | return communityId; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public String getAppId(){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | return loginUserInfo.getAppId(); |
| | | String appid = this.getRequest().getHeader("appid"); |
| | | if(StringUtils.isEmpty(appid)){ |
| | | return "wx0cef797390444b75"; |
| | | } |
| | | return appid; |
| | | } |
| | | |
| | | public String getAppSecret(){ |