Browse Source

[WHAT] 查詢訂單API開發

Dev
berlin-tzen 2 years ago
parent
commit
4791dcb9fa
  1. 42
      EuroTran/WebApp/Controllers/BookingController.cs

42
EuroTran/WebApp/Controllers/BookingController.cs

@ -56,8 +56,8 @@ namespace WebApp.Controllers
/// <returns></returns>
[HttpGet]
[SEApiSecurityFilter]
public HttpResponseMessage Bookings(
string Lang,
public HttpResponseMessage Bookings(
string Lang,
string SubCategoryIDs,
string BookingStatuses,
string PaymentStatuses)
@ -69,41 +69,6 @@ namespace WebApp.Controllers
var SEToken = SETokenUtil.GetToken(this.Request);
if (!string.IsNullOrEmpty(SubCategoryIDs)) {
rsSubCategoryIDs = JsonConvert.DeserializeObject<List<string>>(SubCategoryIDs);
}
if (!string.IsNullOrEmpty(BookingStatuses))
{
rsBookingStatuses = JsonConvert.DeserializeObject<List<string>>(BookingStatuses);
}
if (!string.IsNullOrEmpty(PaymentStatuses))
{
rsPaymentStatuses = JsonConvert.DeserializeObject<List<string>>(PaymentStatuses);
}
return new BookingService().GetBookings(SEToken.Account, Lang, rsSubCategoryIDs, rsBookingStatuses, rsPaymentStatuses);
}
/// <summary>
///
/// </summary>
/// <param name=""></param>
/// <returns></returns>
[HttpGet]
public HttpResponseMessage TestBookings(
string Account,
string Lang,
string SubCategoryIDs,
string BookingStatuses,
string PaymentStatuses)
{
List<string> rsSubCategoryIDs = new List<string>();
List<string> rsBookingStatuses = new List<string>();
List<string> rsPaymentStatuses = new List<string>();
if (!string.IsNullOrEmpty(SubCategoryIDs))
{
rsSubCategoryIDs = JsonConvert.DeserializeObject<List<string>>(SubCategoryIDs);
@ -119,9 +84,8 @@ namespace WebApp.Controllers
rsPaymentStatuses = JsonConvert.DeserializeObject<List<string>>(PaymentStatuses);
}
return new BookingService().GetBookings(Account, Lang, rsSubCategoryIDs, rsBookingStatuses, rsPaymentStatuses);
return new BookingService().GetBookings(SEToken.Account, Lang, rsSubCategoryIDs, rsBookingStatuses, rsPaymentStatuses);
}
}
}
Loading…
Cancel
Save