Пример #1
0
        public ServiceResult <UserProfileListOM> GetUserProfileListForL2(UserProfileListIM input)
        {
            UserProfileDAC    dac        = new UserProfileDAC();
            int               totalCount = 0;
            UserProfileListOM output     = new UserProfileListOM();

            output.ResultSet  = dac.GetUserProfileListForL2(input.Cellphone, input.Country, input.OrderByFiled, input.IsDesc, input.VerifyStatus, input.PageSize, input.Index, out totalCount);
            output.TotalCount = totalCount;
            return(ResultHelper.OKResult(output));
        }
Пример #2
0
        public List <UserProfile> GetUserProfileListForL2(string cellphone, int country, string orderByFiled, bool isDesc, int?l2VerifyStatus, int pageSize, int index, out int totalCount)
        {
            UserProfileListIM input = new UserProfileListIM();

            input.Cellphone    = cellphone;
            input.Country      = country;
            input.OrderByFiled = orderByFiled;
            input.IsDesc       = isDesc;
            input.VerifyStatus = l2VerifyStatus;
            input.PageSize     = pageSize;
            input.Index        = index;
            var url = $"{baseAddress}/GetUserProfileListForL2";

            var result = RestUtilities.PostJson(url, headers, JsonConvert.SerializeObject(input));
            var data   = JsonConvert.DeserializeObject <ServiceResult <UserProfileListOM> >(result);

            if (data.Code == 0)
            {
                totalCount = data.Data.TotalCount;
                return(data.Data.ResultSet);
            }
            throw new CommonException(10000, data.Message);
        }