コード例 #1
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, 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);
        }
コード例 #3
0
        public RebateConfigModel SelectRebateConfigByPKID(int pkid)
        {
            RebateConfigModel result = null;

            try
            {
                dbScopeReadManager.Execute(conn =>
                {
                    result         = DALRebateConfig.SelectRebateConfigByPKID(conn, pkid);
                    result.ImgList = DALRebateConfig.GetRebateApplyImageConfig(conn, pkid, ImgSource.UserImg);
                });
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }
            return(result);
        }
コード例 #4
0
        public List <RebateApplyPageConfig> SelectRebateApplyPageConfig(int pageIndex, int pageSize)
        {
            var result = new List <RebateApplyPageConfig>();

            try
            {
                dbScopeReadManager.Execute(conn =>
                {
                    result = DALRebateConfig.GetRebateApplyPageConfig(conn, pageIndex, pageSize);
                    if (result != null && result.Any())
                    {
                        result.ForEach(item => item.ImgList = DALRebateConfig.GetRebateApplyImageConfig(conn, item.PKID, ImgSource.PageImg));
                    }
                });
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }
            return(result);
        }