Example #1
0
        /// <summary>
        /// 查看短信发送记录和发送状态。
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public Task <QuerySendDetailsResponse> QuerySendDetails(AliyunSmsQuerySendDetailsInput input)
        {
            var request = new QuerySendDetailsRequest
            {
                PhoneNumber = input.Mobile,
                SendDate    = input.SendDate.ToString("yyyyMMDD"),
                PageSize    = input.PageSize,
                CurrentPage = input.CurrentPage
            };

            var rsp = AcsClient.GetAcsResponse(request);

            return(Task.FromResult(rsp));
        }
Example #2
0
        public async Task <SmsRsp <QuerySendDetailsResponse.QuerySendDetails_SmsSendDetailDTO> > QuerySendDetails(AliyunSmsQuerySendDetailsInput input)
        {
            var result = new SmsRsp <QuerySendDetailsResponse.QuerySendDetails_SmsSendDetailDTO>();

            try
            {
                var rsp = await _client.QuerySendDetails(input);

                if ("OK".Equals(rsp.Code, StringComparison.CurrentCultureIgnoreCase))
                {
                    result.Success = true;
                    result.Data    = rsp.SmsSendDetailDTOs;
                }
                else
                {
                    result.Success = false;
                    result.RspMsg  = rsp.Message;
                }
            }
            catch (Exception ex)
            {
                result.Success = false;
                result.RspCode = string.Empty;
                result.RspMsg  = ex.Message;
            }

            return(result);
        }