public JsonModel UsersMatching(JsonModel jsonModel)
        {
            var bj    = jsonModel.BjModel;
            var users = jsonModel.UserModels;

            if (bj == null)
            {
                return(null);
            }

            if (users == null || users.Count <= 0)
            {
                return(null);
            }

            // 여기는 bj 필터 -> jsonModel에 필터할 값 bj아이디 넣기 인증 안된 접근 차단
            var g5Biz     = new BizG5_member();
            var certInfos = g5Biz.GetG5_memberModelsByAbjID(bj.LoginID2);

            if (certInfos == null || certInfos.Count <= 0)
            {
                return(null);
            }

            var certInfo = certInfos.FirstOrDefault();
            var level    = certInfo.mb_level;
            var date     = certInfo.mb_3;

            DateTime.TryParse(date, out DateTime expireDate);
            var days = (DateTime.Now - expireDate).Days;

            if (level < 4)
            {
                return(null);
            }
            if (string.IsNullOrEmpty(date) || days > 0)
            {
                return(null);
            }

            var result = new JsonModel();

            if (false && BjDicModelsCache.Instance.IsCache() && UserDicModelsCache.Instance.IsCache())
            {
                bizAbjLog.SetAbjLog($"{bj.ID} : ActionType1 시작");
                result = ActionType1(users);
                bizAbjLog.SetAbjLog($"{bj.ID} : ActionType1 종료");
            }
            else
            {
                bizAbjLog.SetAbjLog($"{bj.ID} : ActionType2 시작");
                result = ActionType2(bj, users);
                bizAbjLog.SetAbjLog($"{bj.ID} : ActionType2 종료");
            }

            result.UserModels = result.UserModels?.Distinct()?.ToList();
            result.BjModel    = bj;
            return(result);
        }
        public JsonModel CheckVersion(JsonModel jsonModel)
        {
            if (jsonModel == null)
            {
                return(null);
            }

            if (jsonModel.BjModel == null)
            {
                return(null);
            }

            if (string.IsNullOrEmpty(jsonModel.BjModel.LoginID))
            {
                return(null);
            }

            var settingBiz = new BizRankCollectorSettings();
            var setting    = settingBiz.GetSettings();

            var loginIdArray = jsonModel.BjModel.LoginID.Split(new string[] { setting.AbjIDSplitString }, StringSplitOptions.RemoveEmptyEntries);

            if (loginIdArray.Length == 1)
            {
                jsonModel.BjModel.LoginID2 = loginIdArray[0];
                jsonModel.BjModel.ChatID   = loginIdArray[0];
            }
            else if (loginIdArray.Length == 2)
            {
                jsonModel.BjModel.LoginID2 = loginIdArray[1];
                jsonModel.BjModel.ChatID   = loginIdArray[0];
            }

            var g5Biz  = new BizG5_member();
            var result = g5Biz.GetG5_memberModelsByAbjID(jsonModel.BjModel.LoginID2);

            if (result != null && result.Count > 0)
            {
                var member = result.FirstOrDefault();

                var level = member.mb_level;
                var date  = member.mb_3;
                DateTime.TryParse(date, out DateTime expireDate);
                var days = (DateTime.Now - expireDate).Days;

                if (level < 9 && loginIdArray.Length == 2)
                {
                    jsonModel.BjModel.CertificationFlag    = false;
                    jsonModel.BjModel.CertificationMessage = "잘못된 접근입니다.";
                }
                else if (level >= 4)
                {
                    jsonModel.BjModel.CertificationFlag = true;
                }
                else if (level < 4)
                {
                    jsonModel.BjModel.CertificationFlag    = false;
                    jsonModel.BjModel.CertificationMessage = "사용기간이 만료되어 프로그램이 종료 됩니다.";
                }
                if (string.IsNullOrEmpty(date) || days > 0)
                {
                    // 만료
                    jsonModel.BjModel.ExpireFlag    = true;
                    jsonModel.BjModel.ExpireMessage = "사용기간이 만료되어 프로그램이 종료 됩니다.";
                }
                else if (!string.IsNullOrEmpty(setting.ClientVersion) && setting.ClientVersion != jsonModel.BjModel.ClientVersion)
                {
                    jsonModel.BjModel.IsNewUpload    = true;
                    jsonModel.BjModel.VersionMessage = "새 버전이 업로드 되었습니다. \r\n사이트에서 새 버전을 다운받아주세요.";
                }

                jsonModel.BjModel.ExpireDate  = expireDate;
                jsonModel.BjModel.ClientLevel = member.mb_level;
            }
            else
            {
                jsonModel.BjModel.CertificationFlag    = false;
                jsonModel.BjModel.CertificationMessage = "승인되지 않은 아이디 입니다.";
                return(jsonModel);
            }

            return(jsonModel);
        }