101captain
2022-07-24 67ab614a39fcd33648dcffc2ba2799078f5033e5
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java
@@ -19,6 +19,9 @@
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import static java.util.Objects.isNull;
import static org.apache.commons.lang3.StringUtils.isBlank;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 基础controller
@@ -62,7 +65,7 @@
    public Long getCommunityId() {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        Long communityId = loginUserInfo.getCommunityId();
        if (null == communityId || 0 == communityId) {
        if (null == communityId) {
            throw new ServiceException("用户未绑定社区");
        }
        return communityId;
@@ -91,9 +94,6 @@
    public Long getAreaId() {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        Long areaId = loginUserInfo.getAreaId();
        if (null == areaId) {
            throw new ServiceException("用户未绑定小区");
        }
        return areaId;
    }
    /**
@@ -113,14 +113,13 @@
            else {
                return "510423";
            }
        }
        else {
        } else {
            LoginUserInfoVO loginUserInfoVO=this.getLoginUserInfo();
            ComActVO comActVO=loginUserInfoVO.getComActVO();
            if(comActVO!=null){
                return comActVO.getAreaCode();
            if(isNull(comActVO) || isBlank(comActVO.getAreaCode())){
                return "510423";
            }
            return "510423";
            return comActVO.getAreaCode();
        }
    }
@@ -137,8 +136,11 @@
    }
    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(){