<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ``` /** * @author 張躍帥 * @Description: 系統用戶登錄區域-工具 * @date 2020/08/12 */ public class SystemUserLoginAreaUtil { private static final SystemUserLoginAreaMapper systemUserLoginAreaMapper = SpringUtil.getBean(SystemUserLoginAreaMapper.class); /** * 獲取-行政區劃信息 */ public static IpAreaResult getAreaInfo(String ip) { // 判斷 if (StrUtil.isNotBlank(ip)) { // 獲取ip地址 String areaAddress = IpUtil.getAddressByIp(ip); // 判斷 if (!StrUtil.DASHED.equals(areaAddress) && !"內網地址".equals(areaAddress)) { // 查詢 IpAreaResult areaInfo = systemUserLoginAreaMapper.getAreaInfo(areaAddress); // 判斷 if (ObjectUtil.isNotNull(areaInfo)) { // 返回 return areaInfo; } } } // 返回 return null; } /** * 獲取-行政區劃編碼 */ public static String getAreaCode(String ip) { // 判斷 if (StrUtil.isNotBlank(ip)) { // 獲取行政區劃 IpAreaResult areaInfo = SystemUserLoginAreaUtil.getAreaInfo(ip); // 判斷 if (ObjectUtil.isNotNull(areaInfo)) { // 返回 return areaInfo.getAreaCode(); } } // 返回 return null; } /** * 校驗-用戶是否在登錄區域 */ public static Boolean hasUserLoginArea(Long userId, String ip) { // 判斷 if (userId > 0L && StrUtil.isNotBlank(ip)) { // 判斷-是否內網ip if (NetUtil.isInnerIP(ip)) { // 返回 return true; } // 獲取-用戶當前登錄行政區劃編碼 String currLoginUserAreaCode = SystemUserLoginAreaUtil.getAreaCode(ip); // 判斷 if (StrUtil.isNotBlank(currLoginUserAreaCode)) { // 獲取參數 String appCode = SystemContext.me().getAppCode(); // 獲取-設置用戶登錄區劃編碼List List<String> userLoginAreaCodeList = systemUserLoginAreaMapper.getUserLoginAreaCodeList(appCode, userId); // 判斷 if (userLoginAreaCodeList != null && userLoginAreaCodeList.size() > 0) { // 判斷-包含 if (userLoginAreaCodeList.contains(currLoginUserAreaCode)) { // 返回 return true; } } else { // 備注:沒有說明沒有設置-就是放行 return true; } } } // 返回 return false; } }
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看