public async Task Update(NeteaseOrderInfo entity)
 {
     await _repository.UpdateAsync(entity);
 }
        private static List <NeteaseOrderInfo> ConvertToListOrderInfo(DataTable dataTable)
        {
            var orderInfoList = new List <NeteaseOrderInfo>();

            foreach (DataRow row in dataTable.Rows)
            {
                if (row[0] == null || row[0].ToString().IsNullOrWhiteSpace())
                {
                    continue;
                }

                var tmpObj = new NeteaseOrderInfo()
                {
                    OrderNo                    = row[0].ToString(),
                    OrderDate                  = DateTime.Parse(row[1].ToString()),
                    ProductType                = row[2].ToString(),
                    ProductName                = row[3].ToString(),
                    ProductDes                 = row[4]?.ToString(),
                    OriginalPrice              = decimal.Parse(row[5].ToString()),
                    TransactionAmount          = decimal.Parse(row[6].ToString()),
                    BuyerName                  = row[7].ToString(),
                    GeneralizeSource           = row[8].ToString(),
                    GeneralizeName             = row[9]?.ToString(),
                    CardAmount                 = 0m,
                    PlatformHB                 = 0m,
                    PracticalAmount            = 0m,
                    PayType                    = row[13]?.ToString(),
                    ThirdPartyPayServiceCharge = 0m,
                    GeneralizeServiceCharge    = 0m,
                    PlatformServiceCharge      = 0m,
                    RealityAmount              = 0m,
                    TransactionStatus          = row[18].ToString(),
                    TransactionSuccessDate     = null,
                    SettleAccounts             = row[20].ToString(),
                    SettleAccountsDate         = null,
                    Platform                   = platform
                };

                // 学习卡
                if (decimal.TryParse(row[10].ToString(), out decimal tmpDeciaml))
                {
                    tmpObj.CardAmount = tmpDeciaml;
                }

                // 平台红包
                if (decimal.TryParse(row[11].ToString(), out tmpDeciaml))
                {
                    tmpObj.PlatformHB = tmpDeciaml;
                }

                // 实际付款
                if (decimal.TryParse(row[12].ToString(), out tmpDeciaml))
                {
                    tmpObj.PracticalAmount = tmpDeciaml;
                }

                // 第三方支付费用
                if (decimal.TryParse(row[14].ToString(), out tmpDeciaml))
                {
                    tmpObj.ThirdPartyPayServiceCharge = tmpDeciaml;
                }

                // 渠道推广费用
                if (decimal.TryParse(row[15].ToString(), out tmpDeciaml))
                {
                    tmpObj.GeneralizeServiceCharge = tmpDeciaml;
                }

                // 平台服务费用
                if (decimal.TryParse(row[16].ToString(), out tmpDeciaml))
                {
                    tmpObj.PlatformServiceCharge = tmpDeciaml;
                }

                // 商家实际收入
                if (decimal.TryParse(row[17].ToString(), out tmpDeciaml))
                {
                    tmpObj.RealityAmount = tmpDeciaml;
                }

                // 交易成功时间
                if (DateTime.TryParse(row[19].ToString(), out DateTime dateTime))
                {
                    tmpObj.TransactionSuccessDate = dateTime;
                }

                // 结算时间
                if (DateTime.TryParse(row[20].ToString(), out dateTime))
                {
                    tmpObj.SettleAccountsDate = dateTime;
                }

                if (!orderInfoList.Exists(o => o.OrderNo == tmpObj.OrderNo))
                {
                    orderInfoList.Add(tmpObj);
                }
            }


            return(orderInfoList);
        }