public List <RebateConfigModel> SelectRebateConfig(Status status, string orderId, string phone,
                                                           string wxId, string remarks, string timeType, DateTime?startTime, DateTime?endTime,
                                                           string wxName, string principalPerson, string rebateMoney, string source, int pageIndex, int pageSize)
        {
            var result = new List <RebateConfigModel>();

            try
            {
                dbScopeReadManager.Execute(conn =>
                {
                    result = DALRebateConfig.GetRebateConfig(conn, status, orderId ?? string.Empty, phone, wxId, remarks,
                                                             timeType, startTime, endTime, wxName, principalPerson, rebateMoney, source, pageIndex, pageSize);
                    if (result != null && result.Any() && pageSize != 9999999)
                    {
                        var pay = PayService.QueryWxPayStatus("途虎朋友圈点赞返现", "WX_QIYEFUKUAN", result.Select(x => x.OrderId.ToString()).ToList());
                        foreach (var item in result)
                        {
                            var payInfo      = pay?.Where(x => String.Equals(x.OrderNo, item.OrderId.ToString()))?.FirstOrDefault();
                            item.PayStatus   = payInfo?.PayStatus ?? 0;
                            item.RedOutbizNo = payInfo?.WxPayOrderNo ?? string.Empty;
                            item.Reason      = payInfo?.Reason ?? string.Empty;
                            item.UserPhone   = item.UserPhone.Substring(0, 3) + "****" + item.UserPhone.Substring(item.UserPhone.Length - 4, 4);
                            item.ImgList     = DALRebateConfig.GetRebateApplyImageConfig(conn, item.PKID, ImgSource.UserImg);
                        }
                    }
                });
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }
            return(result);
        }
示例#2
0
        public List <RebateConfigModel> SelectRebateConfig(Status status, string orderId, string phone,
                                                           string wxId, string remarks, string timeType, DateTime?startTime, DateTime?endTime,
                                                           string wxName, string principalPerson, string rebateMoney, int pageIndex, int pageSize)
        {
            var result = new List <RebateConfigModel>();

            try
            {
                dbScopeReadManager.Execute(conn =>
                {
                    result = DALRebateConfig.GetRebateConfig(conn, status, orderId ?? string.Empty, phone, wxId, remarks,
                                                             timeType, startTime, endTime, wxName, principalPerson, rebateMoney, pageIndex, pageSize);
                    if (result != null && result.Any())
                    {
                        foreach (var item in result)
                        {
                            item.ImgList = DALRebateConfig.GetRebateApplyImageConfig(conn, item.PKID, ImgSource.UserImg);
                        }
                    }
                });
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }
            return(result);
        }