Esempio n. 1
0
        internal ResponseBaseDto CheckCustomer(ResponseBaseDto dto, string customerToken, ref TokenCacheProperty tcp)
        {
            UserTokenCache utc = UserTokenCache.GetInstance();

            tcp = utc.FindByCustomerToken(customerToken);
            Customer customer = new Customer();

            if (tcp == null)
            {
                dto.Message = "请求的用户未找到";
                dto.Code    = (int)CodeEnum.NoUser;
                return(dto);
            }
            else if (tcp.IsEnable == 0)
            {
                dto.Message = "此账户已被冻结,无法使用此功能";
                dto.Code    = (int)CodeEnum.NoAuthorization;
                return(dto);
            }//Wait....
            return(dto);
        }