From 245be36d243608e917bb549663d4fe0b27447fec Mon Sep 17 00:00:00 2001 From: Janie <109517022+Janie06@users.noreply.github.com> Date: Thu, 2 Mar 2023 10:10:47 +0800 Subject: [PATCH] =?UTF-8?q?[WHAT]=20fix=20upload=20remittance=20API=20[WHY?= =?UTF-8?q?]=20=E9=96=8B=E7=99=BC=20ShowEasy=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 上傳匯款單API調整: 1. 上傳成功後訂單狀態改為確認付款中(BookingStatus = 02) 2. 寄出使用者已付款通知信至info@showeasy.com --- .../ShowEasy/BookingOnlineService.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingOnlineService.cs b/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingOnlineService.cs index 1b5704d..852d4d1 100644 --- a/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingOnlineService.cs +++ b/EuroTran/EasyBL.WEBAPP/ShowEasy/BookingOnlineService.cs @@ -187,12 +187,40 @@ namespace EasyBL.WEBAPP.SYS .Where(x => x.BookingID == BookingID) .Single(); + var sBookingStatus = db.Updateable() + .UpdateColumns(x => new SETB_SAL_BookingOnline { BookingStatus = "02" }) + .Where(x => x.BookingID == BookingID) + .ExecuteCommand(); + var sFilePath = db.Queryable() .Where(x => x.ParentID == sUser.Remittance) .Single(); + var sbookingID = db.Queryable() + .Where(x => x.BookingID == BookingID) + .Single(); + sUser.Remittance = requestUrl + "/" + sFilePath.FilePath.Replace("\\", "/"); + //開始寄信 + var oEmail = new Emails(); //寄件人 + var toEmail = new List(); //收件人 + var oEmailTo = new EmailTo //收件人資訊 + { + ToUserID = "", + ToUserName = "ShowEasy", + ToEmail = "info@showeasy.com", + Type = "to" + }; + toEmail.Add(oEmailTo); + oEmail.FromUserName = "訂單匯款通知"; //取fonfig + oEmail.Title = "訂單匯款通知"; //取fonfig + oEmail.EmailBody = "請您在系統中確認訂單付款狀態,訂單編號為:" + sbookingID.BookingNo; + oEmail.IsCCSelf = false; + oEmail.Attachments = null; + oEmail.EmailTo = toEmail; + var bSend = new MailService(OrgID, true).MailFactory(oEmail, out sError); + srm = new SuccessResponseMessage(null, null); srm.DATA.Add(BLWording.REL, sUser.Remittance); }