From 2ccb8c94fcfe6891b6db60995e83cd7b54e389a6 Mon Sep 17 00:00:00 2001 From: 移动系统liao <liaoxujun@qq.com> Date: 星期日, 29 九月 2024 17:33:23 +0800 Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/cylsg --- cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs index d001701..8aaa90d 100644 --- a/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs +++ b/cylsg/cylsg.Application/Orders/OrderCompanyAppService.cs @@ -739,5 +739,44 @@ return res; } + + + + + + /// <summary> + /// 鑱屼綅鍒犻櫎鍔熻兘 + /// </summary> + /// <returns></returns> + [Authorize] + [HttpPost] + public async Task<bool> deleteOrder(BaoMingDto baoMingDto) + { + + var UserID = App.User?.FindFirstValue("UserID"); + int userid = 0; + string NickName = App.User?.FindFirstValue("NickName"); + if (!string.IsNullOrEmpty(UserID)) + { + userid = int.Parse(UserID); + } + + var orderBiddingRes = new BaseRepository<OrderBidding>(); + var orderRes = new BaseRepository<Order>(); + var userWorkerRes = new BaseRepository<UserWorker>(); + + + var order = await orderRes.GetByIdAsync(baoMingDto.OrderId); + if (order.OrderStatus > 0) + { + throw Oops.Oh("宸茬粡鎷涘伐瀹屾瘯鎴栬�呯粨绠楋紝鏃犳硶鍒犻櫎"); + } + + bool res; + + res = await orderRes.DeleteAsync(order); + + return res; + } } } -- Gitblit v1.9.1