Ejemplo n.º 1
0
        public ResultModifyAddress IsReg(QueryUserExists query)
        {
            var result = new ResultModifyAddress {
                Exception = new MyException()
            };

            try
            {
                var realSsid = new EncryDecry().Md5Decrypt(query.Ssid);
                var arr      = GetSession(realSsid);
                if (arr.Length < 3)
                {
                    result.Exception.Exmsg   = "not found";
                    result.Exception.Success = true;
                    return(result);
                }
                var findIt = _user.SearchUser(arr.GetValue(2).ToString());
                if (findIt != null)
                {
                    result.Address = _userInfo.GeTbUserInfos($"{findIt.Id}")?[0].Address;
                }
                result.Exception.Success = true;
                return(result);
            }
            catch (Exception ex)
            {
                AppLogger.Error($"{ex.Message} {ex.StackTrace}");
                result.Exception.Success = false;
            }
            return(result);
        }
Ejemplo n.º 2
0
        public string IsReg([FromBody] QueryUserExists query)
        {
            query.Ssid = query.Ssid.Substring(1, query.Ssid.Length - 2);
            var json = new UserLogin().IsReg(query);

            return(JsonConvert.SerializeObject(json));
        }