解决编译bug

optimize
zhangxiaofeng 12 months ago
parent 4aa3bf5a1a
commit 2eae0d5126

@ -461,12 +461,12 @@ namespace Myshipping.Application
[HttpPost("CancelBooking")]
public async Task<string> CancelBooking(long Id)
{
var order = _orderRep.FirstOrDefault(x => x.Id == Id) ?? throw Oops.Bah("请选择正确数据!");
if (order.CurrentStateCode is "DJY01" or "DJY02")
var oldOrder = _orderRep.FirstOrDefault(x => x.Id == Id) ?? throw Oops.Bah("请选择正确数据!");
if (oldOrder.CurrentStateCode is "DJY01" or "DJY02")
{
throw Oops.Bah("消单失败,原因:尚未下单,无需消单");
}
if (order.CurrentStateCode is "DJY04")
if (oldOrder.CurrentStateCode is "DJY04")
{
throw Oops.Bah("消单失败,原因:已消单,无需再次消单");
}

Loading…
Cancel
Save