From fdf88b236ca2f35160b71bc514952f924df3a0cf Mon Sep 17 00:00:00 2001 From: alina <1449359159@qq.com> Date: Thu, 9 Mar 2023 16:43:32 +0800 Subject: [PATCH] =?UTF-8?q?Onsite=E5=86=85=E5=AE=B9APi=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=9C=8D=E5=8B=99=E5=9C=96=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ShowEasy/ONSiteMaintain_QryService.cs | 25 ++++++++++++++++--- .../Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs | 9 +++++-- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_QryService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_QryService.cs index bb8a551..bb263e1 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_QryService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/ONSiteMaintain_QryService.cs @@ -1590,7 +1590,8 @@ namespace EasyBL.WEBAPP.ShowEasy CurrencyName=t3.ArgumentValue, ExpenseDescription ="", SupplierName=t4.CompanyName, - SupplierLogo=t4.LogoFile + SupplierLogo=t4.LogoFile, + PreviewFile=t1.PreviewFile }).Single(); //常見問題 @@ -1703,10 +1704,10 @@ namespace EasyBL.WEBAPP.ShowEasy } objONSiteBaseInfo.ReceivinPlaces = sReceivinPlaces; } - + string requestUrl = Common.ConfigGetValue("", "ida:RedirectUri"); if (!string.IsNullOrEmpty(objONSiteBaseInfo.SupplierLogo)) { - string requestUrl = Common.ConfigGetValue("", "ida:RedirectUri"); + var oFilePath = db.Queryable() .Where(x => x.ParentID == objONSiteBaseInfo.SupplierLogo && x.OrgID == sORIGID) .Select(x => new FileDTO @@ -1725,9 +1726,25 @@ namespace EasyBL.WEBAPP.ShowEasy } } - + if (!string.IsNullOrEmpty(objONSiteBaseInfo.PreviewFile)) + { + var oFilePath = db.Queryable() + .Where(x => x.ParentID == objONSiteBaseInfo.PreviewFile && x.OrgID == sORIGID) + .Select(x => new FileDTO + { + FileID = x.FileID, + FileName = x.FileName, + FilePath = x.FilePath + }) + .Single(); + + if (oFilePath != null) + { + objONSiteBaseInfo.PreviewFile = requestUrl + "/" + oFilePath.FilePath.Replace("\\", "/"); + } + } return objONSiteBaseInfo; diff --git a/EuroTran/Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs b/EuroTran/Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs index 9209534..e7666e7 100644 --- a/EuroTran/Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs +++ b/EuroTran/Entity/ShowEasyDtos/ONSiteBaseInfoDTO.cs @@ -38,13 +38,18 @@ namespace Entity.ShowEasyDtos public string Details { get; set; } //取消政策 public string CancelPolicy { get; set; } + //最小金額 public int? MinPrice { get; set; } - + //幣別 public string CurrencyID { get; set; } + //幣別名稱 public string CurrencyName { get; set; } + //供應商名稱 public string SupplierName { get; set; } + //供應商Logo public string SupplierLogo { get; set; } - + //服務封面圖片 + public string PreviewFile { get; set; } //public string CurrencyID { get; set; } //public DateTime? LaunchDateS { get; set; }